index.html.erb
51 lines
| 2.1 KiB
| text/plain
|
TextLexer
|
r90 | <div class="contextual"> | ||
|
r4153 | <%= link_to(l(:label_news_new), | ||
new_project_news_path(@project), | ||||
:class => 'icon icon-add', | ||||
:onclick => 'Element.show("add-news"); Form.Element.focus("news_title"); return false;') if @project && User.current.allowed_to?(:manage_news, @project) %> | ||||
|
r739 | </div> | ||
<div id="add-news" style="display:none;"> | ||||
<h2><%=l(:label_news_new)%></h2> | ||||
|
r8021 | <% labelled_form_for @news, :url => project_news_index_path(@project), | ||
|
r1097 | :html => { :id => 'news-form' } do |f| %> | ||
|
r739 | <%= render :partial => 'news/form', :locals => { :f => f } %> | ||
<%= submit_tag l(:button_create) %> | ||||
|
r7154 | <%= link_to_remote l(:label_preview), | ||
|
r4100 | { :url => preview_news_path(:project_id => @project), | ||
|
r4060 | :method => 'get', | ||
|
r1097 | :update => 'preview', | ||
:with => "Form.serialize('news-form')" | ||||
}, :accesskey => accesskey(:preview) %> | | ||||
|
r739 | <%= link_to l(:button_cancel), "#", :onclick => 'Element.hide("add-news")' %> | ||
|
r875 | <% end if @project %> | ||
|
r1097 | <div id="preview" class="wiki"></div> | ||
|
r90 | </div> | ||
|
r12 | <h2><%=l(:label_news_plural)%></h2> | ||
|
r2 | |||
|
r739 | <% if @newss.empty? %> | ||
|
r736 | <p class="nodata"><%= l(:label_no_data) %></p> | ||
|
r739 | <% else %> | ||
<% @newss.each do |news| %> | ||||
|
r7535 | <h3><%= avatar(news.author, :size => "24") %><%= link_to_project(news.project) + ': ' unless news.project == @project %> | ||
|
r4100 | <%= link_to h(news.title), news_path(news) %> | ||
|
r2430 | <%= "(#{l(:label_x_comments, :count => news.comments_count)})" if news.comments_count > 0 %></h3> | ||
|
r786 | <p class="author"><%= authoring news.created_on, news.author %></p> | ||
|
r1045 | <div class="wiki"> | ||
|
r739 | <%= textilizable(news.description) %> | ||
|
r1045 | </div> | ||
|
r739 | <% end %> | ||
|
r736 | <% end %> | ||
|
r1013 | <p class="pagination"><%= pagination_links_full @news_pages %></p> | ||
|
r663 | |||
|
r2331 | <% other_formats_links do |f| %> | ||
|
r7230 | <%= f.link_to 'Atom', :url => {:project_id => @project, :key => User.current.rss_key} %> | ||
|
r2331 | <% end %> | ||
|
r1171 | |||
|
r663 | <% content_for :header_tags do %> | ||
<%= auto_discovery_link_tag(:atom, params.merge({:format => 'atom', :page => nil, :key => User.current.rss_key})) %> | ||||
|
r3993 | <%= stylesheet_link_tag 'scm' %> | ||
|
r663 | <% end %> | ||
|
r951 | |||
|
r1019 | <% html_title(l(:label_news_plural)) -%> | ||