Chris@1296:
Chris@1296: <%= watcher_tag(@news, User.current) %>
Chris@1296: <%= link_to(l(:button_edit),
Chris@1296: edit_news_path(@news),
Chris@1296: :class => 'icon icon-edit',
Chris@1296: :accesskey => accesskey(:edit),
Chris@1296: :onclick => '$("#edit-news").show(); return false;') if User.current.allowed_to?(:manage_news, @project) %>
Chris@1296: <%= delete_link news_path(@news) if User.current.allowed_to?(:manage_news, @project) %>
Chris@1296:
Chris@1296:
Chris@1296: <%= avatar(@news.author, :size => "24") %><%=h @news.title %>
Chris@1296:
Chris@1296: <% if authorize_for('news', 'edit') %>
Chris@1296:
Chris@1296: <%= labelled_form_for :news, @news, :url => news_path(@news),
Chris@1296: :html => { :id => 'news-form', :multipart => true, :method => :put } do |f| %>
Chris@1296: <%= render :partial => 'form', :locals => { :f => f } %>
Chris@1296: <%= submit_tag l(:button_save) %>
Chris@1296: <%= preview_link preview_news_path(:project_id => @project, :id => @news), 'news-form' %> |
Chris@1296: <%= link_to l(:button_cancel), "#", :onclick => '$("#edit-news").hide(); return false;' %>
Chris@1296: <% end %>
Chris@1296:
Chris@1296:
Chris@1296: <% end %>
Chris@1296:
Chris@1296: <% unless @news.summary.blank? %><%=h @news.summary %>
<% end %>
Chris@1296: <%= authoring @news.created_on, @news.author %>
Chris@1296:
Chris@1296: <%= textilizable(@news, :description) %>
Chris@1296:
Chris@1296: <%= link_to_attachments @news %>
Chris@1296:
Chris@1296:
Chris@1296:
Chris@1296:
Chris@1296: <% if @news.commentable? %>
Chris@1296: <%= toggle_link l(:label_comment_add), "add_comment_form", :focus => "comment_comments" %>
Chris@1296: <%= form_tag({:controller => 'comments', :action => 'create', :id => @news}, :id => "add_comment_form", :style => "display:none;") do %>
Chris@1296:
Chris@1296: <%= text_area 'comment', 'comments', :cols => 80, :rows => 15, :class => 'wiki-edit' %>
Chris@1296: <%= wikitoolbar_for 'comment_comments' %>
Chris@1296:
Chris@1296: <%= submit_tag l(:button_add) %>
Chris@1296: <% end %>
Chris@1296: <% end %>
Chris@1296:
Chris@1296: <% html_title @news.title -%>
Chris@1296:
Chris@1296: <% content_for :header_tags do %>
Chris@1296: <%= stylesheet_link_tag 'scm' %>
Chris@1296: <% end %>
<%= l(:label_comment_plural) %>
Chris@1296: <% @comments.each do |comment| %> Chris@1296: <% next if comment.new_record? %> Chris@1296:<%= avatar(comment.author, :size => "24") %><%= authoring comment.created_on, comment.author %>
Chris@1296: <%= textilizable(comment.comments) %> Chris@1296: <% end if @comments.any? %> Chris@1296: