##// END OF EJS Templates
Fixed a parenthesis warning in news/show....
Jean-Philippe Lang -
r943:a79cf8d574d1
parent child
Show More
@@ -1,43 +1,43
1 <div class="contextual">
1 <div class="contextual">
2 <%= link_to_if_authorized l(:button_edit),
2 <%= link_to_if_authorized l(:button_edit),
3 {:controller => 'news', :action => 'edit', :id => @news},
3 {:controller => 'news', :action => 'edit', :id => @news},
4 :class => 'icon icon-edit',
4 :class => 'icon icon-edit',
5 :accesskey => accesskey(:edit),
5 :accesskey => accesskey(:edit),
6 :onclick => 'Element.show("edit-news"); return false;' %>
6 :onclick => 'Element.show("edit-news"); return false;' %>
7 <%= 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' %>
7 <%= 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' %>
8 </div>
8 </div>
9
9
10 <h2><%=h @news.title %></h2>
10 <h2><%=h @news.title %></h2>
11
11
12 <div id="edit-news" style="display:none;">
12 <div id="edit-news" style="display:none;">
13 <% labelled_tabular_form_for :news, @news, :url => { :action => "edit", :id => @news } do |f| %>
13 <% labelled_tabular_form_for :news, @news, :url => { :action => "edit", :id => @news } do |f| %>
14 <%= render :partial => 'form', :locals => { :f => f } %>
14 <%= render :partial => 'form', :locals => { :f => f } %>
15 <%= submit_tag l(:button_save) %>
15 <%= submit_tag l(:button_save) %>
16 <%= link_to l(:button_cancel), "#", :onclick => 'Element.hide("edit-news")' %>
16 <%= link_to l(:button_cancel), "#", :onclick => 'Element.hide("edit-news")' %>
17 <% end %>
17 <% end %>
18 </div>
18 </div>
19
19
20 <p><em><% unless @news.summary.empty? %><%=h @news.summary %><br /><% end %>
20 <p><em><% unless @news.summary.empty? %><%=h @news.summary %><br /><% end %>
21 <span class="author"><%= authoring @news.created_on, @news.author %></span></em></p>
21 <span class="author"><%= authoring @news.created_on, @news.author %></span></em></p>
22 <%= textilizable(@news.description) %>
22 <%= textilizable(@news.description) %>
23 <br />
23 <br />
24
24
25 <div id="comments" style="margin-bottom:16px;">
25 <div id="comments" style="margin-bottom:16px;">
26 <h3 class="icon22 icon22-comment"><%= l(:label_comment_plural) %></h3>
26 <h3 class="icon22 icon22-comment"><%= l(:label_comment_plural) %></h3>
27 <% @news.comments.each do |comment| %>
27 <% @news.comments.each do |comment| %>
28 <% next if comment.new_record? %>
28 <% next if comment.new_record? %>
29 <h4><%= authoring comment.created_on, comment.author %></h4>
29 <h4><%= authoring comment.created_on, comment.author %></h4>
30 <div class="contextual">
30 <div class="contextual">
31 <%= 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' %>
31 <%= 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' %>
32 </div>
32 </div>
33 <%= simple_format(auto_link(h comment.comments))%>
33 <%= simple_format(auto_link(h(comment.comments)))%>
34 <% end if @news.comments_count > 0 %>
34 <% end if @news.comments_count > 0 %>
35 </div>
35 </div>
36
36
37 <% if authorize_for 'news', 'add_comment' %>
37 <% if authorize_for 'news', 'add_comment' %>
38 <p><%= toggle_link l(:label_comment_add), "add_comment_form", :focus => "comment_comments" %></p>
38 <p><%= toggle_link l(:label_comment_add), "add_comment_form", :focus => "comment_comments" %></p>
39 <% form_tag({:action => 'add_comment', :id => @news}, :id => "add_comment_form", :style => "display:none;") do %>
39 <% form_tag({:action => 'add_comment', :id => @news}, :id => "add_comment_form", :style => "display:none;") do %>
40 <%= text_area 'comment', 'comments', :cols => 60, :rows => 6 %>
40 <%= text_area 'comment', 'comments', :cols => 60, :rows => 6 %>
41 <p><%= submit_tag l(:button_add) %></p>
41 <p><%= submit_tag l(:button_add) %></p>
42 <% end %>
42 <% end %>
43 <% end %>
43 <% end %>
General Comments 0
You need to be logged in to leave comments. Login now