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