parent
c4b4460df9
commit
868bb5baa0
|
@ -43,17 +43,17 @@
|
||||||
<% @newss.each do |news| %>
|
<% @newss.each do |news| %>
|
||||||
<table width="660px" border="0" align="center">
|
<table width="660px" border="0" align="center">
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2" valign="top" width="50" ><%= link_to image_tag(url_to_avatar(@user), :class => 'avatar2'), :class => "avatar" %></td>
|
<td colspan="2" valign="top" width="50" ><%= image_tag(url_to_avatar(news.author), :class => "avatar") %></td>
|
||||||
<td><table width="580px" border="0">
|
<td><table width="580px" border="0">
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2" valign="top"><strong><%=link_to news.author%></strong> <a class="font_lighter">分享了</a> <%= link_to h(news.title), news_path(news) %></td>
|
<td colspan="2" valign="top"><strong><%=link_to_user(news.author)if news.respond_to?(:author) %></strong> <a class="font_lighter">分享了</a> <%= link_to h(news.title), news_path(news) %></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2" width="580px" ><p class="font_description"><%= textilizable(news, :description) %></p></td>
|
<td colspan="2" width="580px" ><p class="font_description"><%= textilizable(news, :description) %></p></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td align="left"><a class="font_lighter"> <%= news.created_on %></a></td>
|
<td align="left"><a class="font_lighter"> <%= news.created_on %></a></td>
|
||||||
<td width="200" align="right" class="a"><%= link_to"查看其他评论",news_path(news)%><%= "(#{l(:label_x_comments, :count => news.comments_count)})" if news.comments_count > 0 %></td>
|
<td width="200" align="right" class="a"><%= link_to"查看其他评论",news_path(news)%><%= "(#{l(:label_x_comments, :count => news.comments_count)})" if news.comments_count >= 0 %></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table></td>
|
</table></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -22,32 +22,7 @@
|
||||||
<div id="preview" class="wiki"></div>
|
<div id="preview" class="wiki"></div>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
<!-- <div id="comments" style="margin-bottom:16px;">
|
||||||
|
|
||||||
<!--add by huang-->
|
|
||||||
<table width="660px" border="0" align="center">
|
|
||||||
<tr>
|
|
||||||
<td colspan="2" valign="top" width="50" ><%= link_to image_tag(url_to_avatar(@user), :class => 'avatar2'), :class => "avatar" %></td>
|
|
||||||
<td><table width="580px" border="0">
|
|
||||||
<tr>
|
|
||||||
<td colspan="2" valign="top"><strong><%=link_to @news.author%></strong> <a class="font_lighter">分享了</a> <p><% unless @news.summary.blank? %><em><%=h @news.summary %></em><br /><% end %></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td colspan="2" width="580px" ><p class="font_description"><%= textilizable(@news, :description) %></p></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td align="left"><a class="font_lighter"> <%= @news.created_on %></a></td>
|
|
||||||
<td width="200" align="right" class="a">dd</td>
|
|
||||||
</tr>
|
|
||||||
</table></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div id="comments" style="margin-bottom:16px;">
|
|
||||||
<h3 class="comments"><%= l(:label_comment_plural) %></h3>
|
<h3 class="comments"><%= l(:label_comment_plural) %></h3>
|
||||||
<% @comments.each do |comment| %>
|
<% @comments.each do |comment| %>
|
||||||
<% next if comment.new_record? %>
|
<% next if comment.new_record? %>
|
||||||
|
@ -58,8 +33,34 @@
|
||||||
<h4><%= avatar(comment.author, :size => "24") %><%= authoring comment.created_on, comment.author %></h4>
|
<h4><%= avatar(comment.author, :size => "24") %><%= authoring comment.created_on, comment.author %></h4>
|
||||||
<%= textilizable(comment.comments) %>
|
<%= textilizable(comment.comments) %>
|
||||||
<% end if @comments.any? %>
|
<% end if @comments.any? %>
|
||||||
|
</div> -->
|
||||||
|
<!--add by huang-->
|
||||||
|
<div id="comments" style="margin-bottom:16px;">
|
||||||
|
<h3 class="comments"><%= l(:label_comment_plural) %></h3>
|
||||||
|
<% @comments.each do |comment| %>
|
||||||
|
<% next if comment.new_record? %>
|
||||||
|
<table width="660px" border="0" align="center">
|
||||||
|
<tr>
|
||||||
|
<td colspan="2" valign="top" width="50" ><%= image_tag(url_to_avatar(comment.author), :class => "avatar")%></td>
|
||||||
|
<td><table width="580px" border="0">
|
||||||
|
<tr>
|
||||||
|
<td colspan="2" valign="top"><strong><%=link_to_user(comment.author) if comment.respond_to?(:author) %></strong> <a class="font_lighter">添加了</a><%= l(:label_comment_plural) %></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2" width="580px" ><p class="font_description"> <%= textilizable(comment.comments) %></p></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="left"><a class="font_lighter"> <%= @news.created_on %></a></td>
|
||||||
|
<td width="200" align="right" class="a"><%= 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) %></td>
|
||||||
|
</tr>
|
||||||
|
</table></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<% end if @comments.any? %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<% if @news.commentable? %>
|
<% if @news.commentable? %>
|
||||||
<p><%= toggle_link l(:label_comment_add), "add_comment_form", :focus => "comment_comments" %></p>
|
<p><%= toggle_link l(:label_comment_add), "add_comment_form", :focus => "comment_comments" %></p>
|
||||||
<%= form_tag({:controller => 'comments', :action => 'create', :id => @news}, :id => "add_comment_form", :style => "display:none;") do %>
|
<%= form_tag({:controller => 'comments', :action => 'create', :id => @news}, :id => "add_comment_form", :style => "display:none;") do %>
|
||||||
|
|
|
@ -184,6 +184,14 @@ ul.tool li{list-style-type:none;
|
||||||
background-color:#03a7dd;
|
background-color:#03a7dd;
|
||||||
overflow:hidden
|
overflow:hidden
|
||||||
}
|
}
|
||||||
|
.user_underline2{
|
||||||
|
margin:1;
|
||||||
|
padding:1;
|
||||||
|
width:240px;
|
||||||
|
height:2px;
|
||||||
|
background-color:#ebebeb;
|
||||||
|
overflow:hidden
|
||||||
|
}
|
||||||
.line_under{
|
.line_under{
|
||||||
border-bottom: 1px dashed rgb(204, 204, 204);
|
border-bottom: 1px dashed rgb(204, 204, 204);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue