##// END OF EJS Templates
Add missing wiki container for news comments (#21678)....
Jean-Philippe Lang -
r14687:4e979d307366
parent child
Show More
@@ -1,64 +1,66
1 1 <div class="contextual">
2 2 <%= watcher_link(@news, User.current) %>
3 3 <%= link_to(l(:button_edit),
4 4 edit_news_path(@news),
5 5 :class => 'icon icon-edit',
6 6 :accesskey => accesskey(:edit),
7 7 :onclick => '$("#edit-news").show(); return false;') if User.current.allowed_to?(:manage_news, @project) %>
8 8 <%= delete_link news_path(@news) if User.current.allowed_to?(:manage_news, @project) %>
9 9 </div>
10 10
11 11 <h2><%= avatar(@news.author, :size => "24") %><%=h @news.title %></h2>
12 12
13 13 <% if authorize_for('news', 'edit') %>
14 14 <div id="edit-news" style="display:none;">
15 15 <%= labelled_form_for :news, @news, :url => news_path(@news),
16 16 :html => { :id => 'news-form', :multipart => true, :method => :put } do |f| %>
17 17 <%= render :partial => 'form', :locals => { :f => f } %>
18 18 <%= submit_tag l(:button_save) %>
19 19 <%= preview_link preview_news_path(:project_id => @project, :id => @news), 'news-form' %> |
20 20 <%= link_to l(:button_cancel), "#", :onclick => '$("#edit-news").hide(); return false;' %>
21 21 <% end %>
22 22 <div id="preview" class="wiki"></div>
23 23 </div>
24 24 <% end %>
25 25
26 26 <p><% unless @news.summary.blank? %><em><%= @news.summary %></em><br /><% end %>
27 27 <span class="author"><%= authoring @news.created_on, @news.author %></span></p>
28 28 <div class="wiki">
29 29 <%= textilizable(@news, :description) %>
30 30 </div>
31 31 <%= link_to_attachments @news %>
32 32 <br />
33 33
34 34 <div id="comments" style="margin-bottom:16px;">
35 35 <h3 class="comments"><%= l(:label_comment_plural) %></h3>
36 36 <% @comments.each do |comment| %>
37 37 <% next if comment.new_record? %>
38 38 <div class="contextual">
39 39 <%= link_to_if_authorized '', {:controller => 'comments', :action => 'destroy', :id => @news, :comment_id => comment},
40 40 :data => {:confirm => l(:text_are_you_sure)}, :method => :delete,
41 41 :title => l(:button_delete),
42 42 :class => 'icon-only icon-del' %>
43 43 </div>
44 44 <h4><%= avatar(comment.author, :size => "24") %><%= authoring comment.created_on, comment.author %></h4>
45 <div class="wiki">
45 46 <%= textilizable(comment.comments) %>
47 </div>
46 48 <% end if @comments.any? %>
47 49 </div>
48 50
49 51 <% if @news.commentable? %>
50 52 <p><%= toggle_link l(:label_comment_add), "add_comment_form", :focus => "comment_comments" %></p>
51 53 <%= form_tag({:controller => 'comments', :action => 'create', :id => @news}, :id => "add_comment_form", :style => "display:none;") do %>
52 54 <div class="box">
53 55 <%= text_area 'comment', 'comments', :cols => 80, :rows => 15, :class => 'wiki-edit' %>
54 56 <%= wikitoolbar_for 'comment_comments' %>
55 57 </div>
56 58 <p><%= submit_tag l(:button_add) %></p>
57 59 <% end %>
58 60 <% end %>
59 61
60 62 <% html_title @news.title -%>
61 63
62 64 <% content_for :header_tags do %>
63 65 <%= stylesheet_link_tag 'scm' %>
64 66 <% end %>
General Comments 0
You need to be logged in to leave comments. Login now