##// END OF EJS Templates
Added missing parentheses on news/show and removed useless call to auto_link...
Jean-Philippe Lang -
r452:5d8200b9fc55
parent child
Show More
@@ -1,32 +1,32
1 <div class="contextual">
1 <div class="contextual">
2 <%= link_to_if_authorized l(:button_edit), {:controller => 'news', :action => 'edit', :id => @news}, :class => 'icon icon-edit' %>
2 <%= link_to_if_authorized l(:button_edit), {:controller => 'news', :action => 'edit', :id => @news}, :class => 'icon icon-edit' %>
3 <%= link_to_if_authorized l(:button_delete), {:controller => 'news', :action => 'destroy', :id => @news}, :confirm => l(:text_are_you_sure), :method => :post, :class => 'icon icon-del' %>
3 <%= link_to_if_authorized l(:button_delete), {:controller => 'news', :action => 'destroy', :id => @news}, :confirm => l(:text_are_you_sure), :method => :post, :class => 'icon icon-del' %>
4 </div>
4 </div>
5
5
6 <h2><%=h @news.title %></h2>
6 <h2><%=h @news.title %></h2>
7
7
8 <p><em><% unless @news.summary.empty? %><%=h @news.summary %><br /><% end %>
8 <p><em><% unless @news.summary.empty? %><%=h @news.summary %><br /><% end %>
9 <%= @news.author.display_name %>, <%= format_time(@news.created_on) %></em></p>
9 <%= @news.author.display_name %>, <%= format_time(@news.created_on) %></em></p>
10 <br />
10 <br />
11 <%= textilizable auto_link @news.description %>
11 <%= textilizable(@news.description) %>
12 <br />
12 <br />
13
13
14 <div id="comments" style="margin-bottom:16px;">
14 <div id="comments" style="margin-bottom:16px;">
15 <h3 class="icon22 icon22-comment"><%= l(:label_comment_plural) %></h3>
15 <h3 class="icon22 icon22-comment"><%= l(:label_comment_plural) %></h3>
16 <% @news.comments.each do |comment| %>
16 <% @news.comments.each do |comment| %>
17 <% next if comment.new_record? %>
17 <% next if comment.new_record? %>
18 <h4><%= format_time(comment.created_on) %> - <%= comment.author.name %></h4>
18 <h4><%= format_time(comment.created_on) %> - <%= comment.author.name %></h4>
19 <div class="contextual">
19 <div class="contextual">
20 <%= link_to_if_authorized l(:button_delete), {:controller => 'news', :action => 'destroy_comment', :id => @news, :comment_id => comment}, :confirm => l(:text_are_you_sure), :method => :post, :class => 'icon icon-del' %>
20 <%= link_to_if_authorized l(:button_delete), {:controller => 'news', :action => 'destroy_comment', :id => @news, :comment_id => comment}, :confirm => l(:text_are_you_sure), :method => :post, :class => 'icon icon-del' %>
21 </div>
21 </div>
22 <%= simple_format(auto_link(h comment.comment))%>
22 <%= simple_format(auto_link(h comment.comment))%>
23 <% end if @news.comments_count > 0 %>
23 <% end if @news.comments_count > 0 %>
24 </div>
24 </div>
25
25
26 <% if authorize_for 'news', 'add_comment' %>
26 <% if authorize_for 'news', 'add_comment' %>
27 <p><%= toggle_link l(:label_comment_add), "add_comment_form", :focus => "comment_comment" %></p>
27 <p><%= toggle_link l(:label_comment_add), "add_comment_form", :focus => "comment_comment" %></p>
28 <% form_tag({:action => 'add_comment', :id => @news}, :id => "add_comment_form", :style => "display:none;") do %>
28 <% form_tag({:action => 'add_comment', :id => @news}, :id => "add_comment_form", :style => "display:none;") do %>
29 <%= text_area 'comment', 'comment', :cols => 60, :rows => 6 %>
29 <%= text_area 'comment', 'comment', :cols => 60, :rows => 6 %>
30 <p><%= submit_tag l(:button_add) %></p>
30 <p><%= submit_tag l(:button_add) %></p>
31 <% end %>
31 <% end %>
32 <% end %> No newline at end of file
32 <% end %>
General Comments 0
You need to be logged in to leave comments. Login now