|
|
@ -8,7 +8,8 @@
|
|
|
|
<%= delete_link news_path(@news) if User.current.allowed_to?(:manage_news, @project) %>
|
|
|
|
<%= delete_link news_path(@news) if User.current.allowed_to?(:manage_news, @project) %>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<h3><%=h @news.title %></h3>
|
|
|
|
<h3><%=h @news.title %></h3>
|
|
|
|
|
|
|
|
|
|
|
|
<% if authorize_for('news', 'edit') %>
|
|
|
|
<% if authorize_for('news', 'edit') %>
|
|
|
|
<div id="edit-news" style="display:none;">
|
|
|
|
<div id="edit-news" style="display:none;">
|
|
|
|
<%= labelled_form_for :news, @news, :url => news_path(@news),
|
|
|
|
<%= labelled_form_for :news, @news, :url => news_path(@news),
|
|
|
@ -34,19 +35,8 @@
|
|
|
|
<% end if @comments.any? %>
|
|
|
|
<% end if @comments.any? %>
|
|
|
|
</div> -->
|
|
|
|
</div> -->
|
|
|
|
<!--add by huang-->
|
|
|
|
<!--add by huang-->
|
|
|
|
<% if @news.commentable? %>
|
|
|
|
|
|
|
|
<div id="comments" style="margin-bottom:16px;">
|
|
|
|
<div id="comments" style="margin-bottom:16px;">
|
|
|
|
<h3 class="comments"><%= toggle_link l(:label_comment_add), "add_comment_form", :focus => "comment_comments" %></h3>
|
|
|
|
<h3 class="comments"><%= l(:label_comment_plural) %></h3>
|
|
|
|
<%= form_tag({:controller => 'comments', :action => 'create', :id => @news}, :id => "add_comment_form", :style => "display:none;") do %>
|
|
|
|
|
|
|
|
<div class="box">
|
|
|
|
|
|
|
|
<%= text_area 'comment', 'comments', :cols => 80, :rows => 15, :class => 'wiki-edit' %>
|
|
|
|
|
|
|
|
<%= wikitoolbar_for 'comment_comments' %>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<p><%= submit_tag l(:button_add) %></p>
|
|
|
|
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<h3><%= l(:label_comment_plural) %></h3>
|
|
|
|
|
|
|
|
<% @comments.each do |comment| %>
|
|
|
|
<% @comments.each do |comment| %>
|
|
|
|
<% next if comment.new_record? %>
|
|
|
|
<% next if comment.new_record? %>
|
|
|
|
<table width="660px" border="0" align="center">
|
|
|
|
<table width="660px" border="0" align="center">
|
|
|
@ -54,7 +44,7 @@
|
|
|
|
<td colspan="2" valign="top" width="50" ><%= image_tag(url_to_avatar(comment.author), :class => "avatar")%></td>
|
|
|
|
<td colspan="2" valign="top" width="50" ><%= image_tag(url_to_avatar(comment.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_user(comment.author) if comment.respond_to?(:author) %></strong> <span class="font_lighter">发表了<%= l(:label_comment_plural) %></span></td>
|
|
|
|
<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>
|
|
|
|
<tr>
|
|
|
|
<tr>
|
|
|
|
<td colspan="2" width="580px" ><p class="font_description"> <%= textilizable(comment.comments) %></p></td>
|
|
|
|
<td colspan="2" width="580px" ><p class="font_description"> <%= textilizable(comment.comments) %></p></td>
|
|
|
@ -71,7 +61,7 @@
|
|
|
|
</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 %>
|
|
|
|
<div class="box">
|
|
|
|
<div class="box">
|
|
|
@ -80,10 +70,10 @@
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<p><%= submit_tag l(:button_add) %></p>
|
|
|
|
<p><%= submit_tag l(:button_add) %></p>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<% end %> -->
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
|
|
|
|
<% html_title @news.title -%>
|
|
|
|
<% html_title @news.title -%>
|
|
|
|
|
|
|
|
|
|
|
|
<% content_for :header_tags do %>
|
|
|
|
<% content_for :header_tags do %>
|
|
|
|
<%= stylesheet_link_tag 'scm' %>
|
|
|
|
<%= stylesheet_link_tag 'scm' %>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|