##// END OF EJS Templates
Put news articles into <article> tags (#19339)....
Jean-Philippe Lang -
r13926:b39ed081142a
parent child
Show More
@@ -1,47 +1,51
1 1 <div class="contextual">
2 2 <%= link_to(l(:label_news_new),
3 3 new_project_news_path(@project),
4 4 :class => 'icon icon-add',
5 5 :onclick => 'showAndScrollTo("add-news", "news_title"); return false;') if @project && User.current.allowed_to?(:manage_news, @project) %>
6 6 <%= watcher_link(@project.enabled_module('news'), User.current) if @project && User.current.logged? %>
7 7 </div>
8 8
9 9 <div id="add-news" style="display:none;">
10 10 <h2><%=l(:label_news_new)%></h2>
11 11 <%= labelled_form_for @news, :url => project_news_index_path(@project),
12 12 :html => { :id => 'news-form', :multipart => true } do |f| %>
13 13 <%= render :partial => 'news/form', :locals => { :f => f } %>
14 14 <%= submit_tag l(:button_create) %>
15 15 <%= preview_link preview_news_path(:project_id => @project), 'news-form' %> |
16 16 <%= link_to l(:button_cancel), "#", :onclick => '$("#add-news").hide()' %>
17 17 <% end if @project %>
18 18 <div id="preview" class="wiki"></div>
19 19 </div>
20 20
21 21 <h2><%=l(:label_news_plural)%></h2>
22 22
23 23 <% if @newss.empty? %>
24 24 <p class="nodata"><%= l(:label_no_data) %></p>
25 25 <% else %>
26 26 <% @newss.each do |news| %>
27 <article class="news-article">
28 <header>
27 29 <h3><%= avatar(news.author, :size => "24") %><%= link_to_project(news.project) + ': ' unless news.project == @project %>
28 <%= link_to news.title, news_path(news) %>
30 <%= link_to h(news.title), news_path(news) %>
29 31 <%= "(#{l(:label_x_comments, :count => news.comments_count)})" if news.comments_count > 0 %></h3>
30 32 <p class="author"><%= authoring news.created_on, news.author %></p>
33 </header>
31 34 <div class="wiki">
32 35 <%= textilizable(news, :description) %>
33 36 </div>
37 </article>
34 38 <% end %>
35 39 <% end %>
36 40 <p class="pagination"><%= pagination_links_full @news_pages %></p>
37 41
38 42 <% other_formats_links do |f| %>
39 43 <%= f.link_to 'Atom', :url => {:project_id => @project, :key => User.current.rss_key} %>
40 44 <% end %>
41 45
42 46 <% content_for :header_tags do %>
43 47 <%= auto_discovery_link_tag(:atom, params.merge({:format => 'atom', :page => nil, :key => User.current.rss_key})) %>
44 48 <%= stylesheet_link_tag 'scm' %>
45 49 <% end %>
46 50
47 51 <% html_title(l(:label_news_plural)) -%>
General Comments 0
You need to be logged in to leave comments. Login now