better-news-structure.diff

An Phan, 2015-03-11 07:18

Download (1.34 KB)

View differences:

app/views/news/index.html.erb (working copy)
24 24
<p class="nodata"><%= l(:label_no_data) %></p>
25 25
<% else %>
26 26
<% @newss.each do |news| %>
27
    <h3><%= avatar(news.author, :size => "24") %><%= link_to_project(news.project) + ': ' unless news.project == @project %>
28
    <%= link_to news.title, news_path(news) %>
29
    <%= "(#{l(:label_x_comments, :count => news.comments_count)})" if news.comments_count > 0 %></h3>
30
    <p class="author"><%= authoring news.created_on, news.author %></p>
31
    <div class="wiki">
32
    <%= textilizable(news, :description) %>
33
    </div>
27
    <article class="news-article">
28
      <header>
29
        <h3><%= avatar(news.author, :size => "24") %><%= link_to_project(news.project) + ': ' unless news.project == @project %>
30
        <%= link_to h(news.title), news_path(news) %>
31
        <%= "(#{l(:label_x_comments, :count => news.comments_count)})" if news.comments_count > 0 %></h3>
32
        <p class="author"><%= authoring news.created_on, news.author %></p>
33
      </header>
34
      <div class="wiki">
35
      <%= textilizable(news, :description) %>
36
      </div>
37
    </article>
34 38
<% end %>
35 39
<% end %>
36 40
<p class="pagination"><%= pagination_links_full @news_pages %></p>