From 868bb5baa076019a71441f235fc4c664abd1529d Mon Sep 17 00:00:00 2001 From: huangjingquan Date: Fri, 2 Aug 2013 11:03:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86new=E9=87=8C?= =?UTF-8?q?=E9=9D=A2=E5=B8=83=E5=B1=80=E4=BB=A5=E5=8F=8A=E9=93=BE=E6=8E=A5?= =?UTF-8?q?=20=E4=BF=AE=E6=94=B9=E4=BA=86base=5Fproject?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/news/index.html.erb | 6 ++-- app/views/news/show.html.erb | 53 +++++++++++++++--------------- public/stylesheets/application.css | 8 +++++ 3 files changed, 38 insertions(+), 29 deletions(-) diff --git a/app/views/news/index.html.erb b/app/views/news/index.html.erb index 8381fb99d..d40c287df 100644 --- a/app/views/news/index.html.erb +++ b/app/views/news/index.html.erb @@ -43,17 +43,17 @@ <% @newss.each do |news| %> - + diff --git a/app/views/news/show.html.erb b/app/views/news/show.html.erb index a73447a86..f8aa85713 100644 --- a/app/views/news/show.html.erb +++ b/app/views/news/show.html.erb @@ -22,32 +22,7 @@
<% end %> - - - -
<%= link_to image_tag(url_to_avatar(@user), :class => 'avatar2'), :class => "avatar" %><%= image_tag(url_to_avatar(news.author), :class => "avatar") %> - + - +
<%=link_to news.author%> 分享了 <%= link_to h(news.title), news_path(news) %><%=link_to_user(news.author)if news.respond_to?(:author) %> 分享了 <%= link_to h(news.title), news_path(news) %>

<%= textilizable(news, :description) %>

<%= news.created_on %><%= link_to"查看其他评论",news_path(news)%><%= "(#{l(:label_x_comments, :count => news.comments_count)})" if news.comments_count > 0 %><%= link_to"查看其他评论",news_path(news)%><%= "(#{l(:label_x_comments, :count => news.comments_count)})" if news.comments_count >= 0 %>
- - - - -
<%= link_to image_tag(url_to_avatar(@user), :class => 'avatar2'), :class => "avatar" %> - - - - - - - - - - -
<%=link_to @news.author%> 分享了

<% unless @news.summary.blank? %><%=h @news.summary %>
<% end %>

<%= textilizable(@news, :description) %>

<%= @news.created_on %>dd
- - - - - -
+ + +
+

<%= l(:label_comment_plural) %>

+<% @comments.each do |comment| %> + <% next if comment.new_record? %> + + + + + +
<%= image_tag(url_to_avatar(comment.author), :class => "avatar")%> + + + + + + + + + + +
<%=link_to_user(comment.author) if comment.respond_to?(:author) %> 添加了<%= l(:label_comment_plural) %>

<%= textilizable(comment.comments) %>

<%= @news.created_on %><%= link_to_if_authorized image_tag('delete.png'), {:controller => 'comments', :action => 'destroy', :id => @news, :comment_id => comment}, + :data => {:confirm => l(:text_are_you_sure)}, :method => :delete, :title => l(:button_delete) %>
+<% end if @comments.any? %>
+ <% if @news.commentable? %>

<%= toggle_link l(:label_comment_add), "add_comment_form", :focus => "comment_comments" %>

<%= form_tag({:controller => 'comments', :action => 'create', :id => @news}, :id => "add_comment_form", :style => "display:none;") do %> diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index fbc30bd05..22d337d58 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -184,6 +184,14 @@ ul.tool li{list-style-type:none; background-color:#03a7dd; overflow:hidden } +.user_underline2{ + margin:1; + padding:1; + width:240px; + height:2px; + background-color:#ebebeb; + overflow:hidden +} .line_under{ border-bottom: 1px dashed rgb(204, 204, 204); }