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