Chris@0:
Chris@0: <%= link_to_if_authorized l(:button_edit),
chris@37: edit_news_path(@news),
Chris@0: :class => 'icon icon-edit',
Chris@0: :accesskey => accesskey(:edit),
Chris@0: :onclick => 'Element.show("edit-news"); return false;' %>
chris@37: <%= link_to_if_authorized l(:button_delete), news_path(@news), :confirm => l(:text_are_you_sure), :method => :delete, :class => 'icon icon-del' %>
Chris@0:
Chris@0:
Chris@0: <%= avatar(@news.author, :size => "24") %><%=h @news.title %>
Chris@0:
Chris@0: <% if authorize_for('news', 'edit') %>
Chris@0:
chris@37: <% labelled_tabular_form_for :news, @news, :url => news_path(@news),
chris@22: :html => { :id => 'news-form', :method => :put } do |f| %>
Chris@0: <%= render :partial => 'form', :locals => { :f => f } %>
Chris@0: <%= submit_tag l(:button_save) %>
Chris@0: <%= link_to_remote l(:label_preview),
chris@37: { :url => preview_news_path(:project_id => @project),
chris@37: :method => 'get',
Chris@0: :update => 'preview',
Chris@0: :with => "Form.serialize('news-form')"
Chris@0: }, :accesskey => accesskey(:preview) %> |
Chris@0: <%= link_to l(:button_cancel), "#", :onclick => 'Element.hide("edit-news"); return false;' %>
Chris@0: <% end %>
Chris@0:
Chris@0:
Chris@0: <% end %>
Chris@0:
Chris@0: <% unless @news.summary.blank? %><%=h @news.summary %>
<% end %>
Chris@0: <%= authoring @news.created_on, @news.author %>
Chris@0:
Chris@0: <%= textilizable(@news.description) %>
Chris@0:
Chris@0:
Chris@0:
Chris@0:
Chris@0:
chris@22: <% if authorize_for 'comments', 'create' %>
Chris@0: <%= toggle_link l(:label_comment_add), "add_comment_form", :focus => "comment_comments" %>
chris@22: <% form_tag({:controller => 'comments', :action => 'create', :id => @news}, :id => "add_comment_form", :style => "display:none;") do %>
Chris@0:
Chris@0: <%= text_area 'comment', 'comments', :cols => 80, :rows => 15, :class => 'wiki-edit' %>
Chris@0: <%= wikitoolbar_for 'comment_comments' %>
Chris@0:
Chris@0: <%= submit_tag l(:button_add) %>
Chris@0: <% end %>
Chris@0: <% end %>
Chris@0:
Chris@0: <% html_title @news.title -%>
Chris@0:
Chris@0: <% content_for :header_tags do %>
Chris@0: <%= stylesheet_link_tag 'scm' %>
Chris@0: <% end %>
<%= l(:label_comment_plural) %>
Chris@0: <% @comments.each do |comment| %> Chris@0: <% next if comment.new_record? %> Chris@0:<%= avatar(comment.author, :size => "24") %><%= authoring comment.created_on, comment.author %>
Chris@0: <%= textilizable(comment.comments) %> Chris@0: <% end if @comments.any? %> Chris@0: