annotate app/views/news/index.html.erb @ 1516:b450a9d58aed redmine-2.4

Update to Redmine SVN revision 13356 on 2.4-stable branch
author Chris Cannam
date Tue, 09 Sep 2014 09:28:31 +0100
parents 433d4f72a19b
children dffacf8a6908
rev   line source
Chris@0 1 <div class="contextual">
chris@37 2 <%= link_to(l(:label_news_new),
chris@37 3 new_project_news_path(@project),
chris@37 4 :class => 'icon icon-add',
Chris@1115 5 :onclick => 'showAndScrollTo("add-news", "news_title"); return false;') if @project && User.current.allowed_to?(:manage_news, @project) %>
Chris@0 6 </div>
Chris@0 7
Chris@0 8 <div id="add-news" style="display:none;">
Chris@0 9 <h2><%=l(:label_news_new)%></h2>
Chris@1115 10 <%= labelled_form_for @news, :url => project_news_index_path(@project),
Chris@1115 11 :html => { :id => 'news-form', :multipart => true } do |f| %>
Chris@0 12 <%= render :partial => 'news/form', :locals => { :f => f } %>
Chris@0 13 <%= submit_tag l(:button_create) %>
Chris@1115 14 <%= preview_link preview_news_path(:project_id => @project), 'news-form' %> |
Chris@1115 15 <%= link_to l(:button_cancel), "#", :onclick => '$("#add-news").hide()' %>
Chris@0 16 <% end if @project %>
Chris@0 17 <div id="preview" class="wiki"></div>
Chris@0 18 </div>
Chris@0 19
Chris@0 20 <h2><%=l(:label_news_plural)%></h2>
Chris@0 21
Chris@0 22 <% if @newss.empty? %>
Chris@0 23 <p class="nodata"><%= l(:label_no_data) %></p>
Chris@0 24 <% else %>
Chris@0 25 <% @newss.each do |news| %>
Chris@909 26 <h3><%= avatar(news.author, :size => "24") %><%= link_to_project(news.project) + ': ' unless news.project == @project %>
chris@37 27 <%= link_to h(news.title), news_path(news) %>
Chris@0 28 <%= "(#{l(:label_x_comments, :count => news.comments_count)})" if news.comments_count > 0 %></h3>
Chris@0 29 <p class="author"><%= authoring news.created_on, news.author %></p>
Chris@0 30 <div class="wiki">
Chris@1115 31 <%= textilizable(news, :description) %>
Chris@0 32 </div>
Chris@0 33 <% end %>
Chris@0 34 <% end %>
Chris@0 35 <p class="pagination"><%= pagination_links_full @news_pages %></p>
Chris@0 36
Chris@0 37 <% other_formats_links do |f| %>
Chris@909 38 <%= f.link_to 'Atom', :url => {:project_id => @project, :key => User.current.rss_key} %>
Chris@0 39 <% end %>
Chris@0 40
Chris@0 41 <% content_for :header_tags do %>
Chris@0 42 <%= auto_discovery_link_tag(:atom, params.merge({:format => 'atom', :page => nil, :key => User.current.rss_key})) %>
chris@22 43 <%= stylesheet_link_tag 'scm' %>
Chris@0 44 <% end %>
Chris@0 45
Chris@0 46 <% html_title(l(:label_news_plural)) -%>