2006-12-16 15:15:31 +03:00
|
|
|
<div class="contextual">
|
2007-09-22 21:52:43 +04:00
|
|
|
<%= link_to_if_authorized l(:label_news_new),
|
|
|
|
{:controller => 'projects', :action => 'add_news', :id => @project},
|
|
|
|
:class => 'icon icon-add',
|
|
|
|
:onclick => 'Element.show("add-news"); return false;' %>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div id="add-news" style="display:none;">
|
|
|
|
<h2><%=l(:label_news_new)%></h2>
|
|
|
|
<% labelled_tabular_form_for :news, @news, :url => { :action => "add_news", :id => @project } do |f| %>
|
|
|
|
<%= render :partial => 'news/form', :locals => { :f => f } %>
|
|
|
|
<%= submit_tag l(:button_create) %>
|
|
|
|
<%= link_to l(:button_cancel), "#", :onclick => 'Element.hide("add-news")' %>
|
|
|
|
<% end %>
|
2006-12-16 15:15:31 +03:00
|
|
|
</div>
|
|
|
|
|
2006-07-29 23:54:22 +04:00
|
|
|
<h2><%=l(:label_news_plural)%></h2>
|
2006-06-28 22:11:03 +04:00
|
|
|
|
2007-09-22 21:52:43 +04:00
|
|
|
<% if @newss.empty? %>
|
2007-09-22 17:17:49 +04:00
|
|
|
<p class="nodata"><%= l(:label_no_data) %></p>
|
2007-09-22 21:52:43 +04:00
|
|
|
<% else %>
|
|
|
|
<% @newss.each do |news| %>
|
|
|
|
<h3><%= link_to h(news.title), :controller => 'news', :action => 'show', :id => news %>
|
|
|
|
<%= "(#{news.comments_count} #{lwr(:label_comment, news.comments_count).downcase})" if news.comments_count > 0 %></h3>
|
2007-10-03 22:43:38 +04:00
|
|
|
<p class="author"><%= authoring news.created_on, news.author %></p>
|
2007-09-22 21:52:43 +04:00
|
|
|
<%= textilizable(news.description) %>
|
|
|
|
<% end %>
|
2007-09-22 17:17:49 +04:00
|
|
|
<% end %>
|
2007-03-12 20:59:02 +03:00
|
|
|
<%= pagination_links_full @news_pages %>
|
2007-08-29 20:52:35 +04:00
|
|
|
|
|
|
|
<% content_for :header_tags do %>
|
|
|
|
<%= auto_discovery_link_tag(:atom, params.merge({:format => 'atom', :page => nil, :key => User.current.rss_key})) %>
|
|
|
|
<% end %>
|