diff --git a/app/views/news/index.html.erb b/app/views/news/index.html.erb index 8381fb99..d40c287d 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 a73447a8..f8aa8571 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 fbc30bd0..22d337d5 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); }