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