##// END OF EJS Templates
Added missing wiki div on news/index and news/show....
Jean-Philippe Lang -
r1045:df30e18a8cfc
parent child
Show More
@@ -1,36 +1,38
1 1 <div class="contextual">
2 2 <%= link_to_if_authorized(l(:label_news_new),
3 3 {:controller => 'projects', :action => 'add_news', :id => @project},
4 4 :class => 'icon icon-add',
5 5 :onclick => 'Element.show("add-news"); return false;') if @project %>
6 6 </div>
7 7
8 8 <div id="add-news" style="display:none;">
9 9 <h2><%=l(:label_news_new)%></h2>
10 10 <% labelled_tabular_form_for :news, @news, :url => { :controller => 'projects', :action => "add_news", :id => @project } do |f| %>
11 11 <%= render :partial => 'news/form', :locals => { :f => f } %>
12 12 <%= submit_tag l(:button_create) %>
13 13 <%= link_to l(:button_cancel), "#", :onclick => 'Element.hide("add-news")' %>
14 14 <% end if @project %>
15 15 </div>
16 16
17 17 <h2><%=l(:label_news_plural)%></h2>
18 18
19 19 <% if @newss.empty? %>
20 20 <p class="nodata"><%= l(:label_no_data) %></p>
21 21 <% else %>
22 22 <% @newss.each do |news| %>
23 23 <h3><%= link_to(h(news.project.name), :controller => 'projects', :action => 'show', :id => news.project) + ': ' unless news.project == @project %>
24 24 <%= link_to h(news.title), :controller => 'news', :action => 'show', :id => news %>
25 25 <%= "(#{news.comments_count} #{lwr(:label_comment, news.comments_count).downcase})" if news.comments_count > 0 %></h3>
26 26 <p class="author"><%= authoring news.created_on, news.author %></p>
27 <div class="wiki">
27 28 <%= textilizable(news.description) %>
29 </div>
28 30 <% end %>
29 31 <% end %>
30 32 <p class="pagination"><%= pagination_links_full @news_pages %></p>
31 33
32 34 <% content_for :header_tags do %>
33 35 <%= auto_discovery_link_tag(:atom, params.merge({:format => 'atom', :page => nil, :key => User.current.rss_key})) %>
34 36 <% end %>
35 37
36 38 <% html_title(l(:label_news_plural)) -%>
@@ -1,46 +1,48
1 1 <div class="contextual">
2 2 <%= link_to_if_authorized l(:button_edit),
3 3 {:controller => 'news', :action => 'edit', :id => @news},
4 4 :class => 'icon icon-edit',
5 5 :accesskey => accesskey(:edit),
6 6 :onclick => 'Element.show("edit-news"); return false;' %>
7 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 8 </div>
9 9
10 10 <h2><%=h @news.title %></h2>
11 11
12 12 <div id="edit-news" style="display:none;">
13 13 <% labelled_tabular_form_for :news, @news, :url => { :action => "edit", :id => @news } do |f| %>
14 14 <%= render :partial => 'form', :locals => { :f => f } %>
15 15 <%= submit_tag l(:button_save) %>
16 16 <%= link_to l(:button_cancel), "#", :onclick => 'Element.hide("edit-news")' %>
17 17 <% end %>
18 18 </div>
19 19
20 20 <p><em><% unless @news.summary.empty? %><%=h @news.summary %><br /><% end %>
21 21 <span class="author"><%= authoring @news.created_on, @news.author %></span></em></p>
22 <div class="wiki">
22 23 <%= textilizable(@news.description) %>
24 </div>
23 25 <br />
24 26
25 27 <div id="comments" style="margin-bottom:16px;">
26 28 <h3 class="icon22 icon22-comment"><%= l(:label_comment_plural) %></h3>
27 29 <% @news.comments.each do |comment| %>
28 30 <% next if comment.new_record? %>
29 31 <h4><%= authoring comment.created_on, comment.author %></h4>
30 32 <div class="contextual">
31 33 <%= 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 34 </div>
33 35 <%= textilizable(comment.comments) %>
34 36 <% end if @news.comments_count > 0 %>
35 37 </div>
36 38
37 39 <% if authorize_for 'news', 'add_comment' %>
38 40 <p><%= toggle_link l(:label_comment_add), "add_comment_form", :focus => "comment_comments" %></p>
39 41 <% form_tag({:action => 'add_comment', :id => @news}, :id => "add_comment_form", :style => "display:none;") do %>
40 42 <%= text_area 'comment', 'comments', :cols => 80, :rows => 15, :class => 'wiki-edit' %>
41 43 <%= wikitoolbar_for 'comment_comments' %>
42 44 <p><%= submit_tag l(:button_add) %></p>
43 45 <% end %>
44 46 <% end %>
45 47
46 48 <% html_title @news.title -%>
General Comments 0
You need to be logged in to leave comments. Login now