annotate app/views/news/index.html.erb @ 1517:dffacf8a6908 redmine-2.5

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