To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.
root / .svn / pristine / d9 / d99d005bc4c66e06d02d4fede2fc4aa27612b15b.svn-base @ 1297:0a574315af3e
History | View | Annotate | Download (2.89 KB)
| 1 |
<div class="contextual"> |
|---|---|
| 2 |
<%= watcher_tag(@news, User.current) %> |
| 3 |
<%= link_to(l(:button_edit), |
| 4 |
edit_news_path(@news), |
| 5 |
:class => 'icon icon-edit', |
| 6 |
:accesskey => accesskey(:edit), |
| 7 |
:onclick => 'Element.show("edit-news"); return false;') if User.current.allowed_to?(:manage_news, @project) %>
|
| 8 |
<%= link_to(l(:button_delete), |
| 9 |
news_path(@news), |
| 10 |
:confirm => l(:text_are_you_sure), |
| 11 |
:method => :delete, |
| 12 |
:class => 'icon icon-del') if User.current.allowed_to?(:manage_news, @project) %> |
| 13 |
</div> |
| 14 |
|
| 15 |
<h2><%= avatar(@news.author, :size => "24") %><%=h @news.title %></h2> |
| 16 |
|
| 17 |
<% if authorize_for('news', 'edit') %>
|
| 18 |
<div id="edit-news" style="display:none;"> |
| 19 |
<% labelled_tabular_form_for :news, @news, :url => news_path(@news), |
| 20 |
:html => { :id => 'news-form', :method => :put } do |f| %>
|
| 21 |
<%= render :partial => 'form', :locals => { :f => f } %>
|
| 22 |
<%= submit_tag l(:button_save) %> |
| 23 |
<%= link_to_remote l(:label_preview), |
| 24 |
{ :url => preview_news_path(:project_id => @project),
|
| 25 |
:method => 'get', |
| 26 |
:update => 'preview', |
| 27 |
:with => "Form.serialize('news-form')"
|
| 28 |
}, :accesskey => accesskey(:preview) %> | |
| 29 |
<%= link_to l(:button_cancel), "#", :onclick => 'Element.hide("edit-news"); return false;' %>
|
| 30 |
<% end %> |
| 31 |
<div id="preview" class="wiki"></div> |
| 32 |
</div> |
| 33 |
<% end %> |
| 34 |
|
| 35 |
<p><% unless @news.summary.blank? %><em><%=h @news.summary %></em><br /><% end %> |
| 36 |
<span class="author"><%= authoring @news.created_on, @news.author %></span></p> |
| 37 |
<div class="wiki"> |
| 38 |
<%= textilizable(@news.description) %> |
| 39 |
</div> |
| 40 |
<br /> |
| 41 |
|
| 42 |
<div id="comments" style="margin-bottom:16px;"> |
| 43 |
<h3 class="comments"><%= l(:label_comment_plural) %></h3> |
| 44 |
<% @comments.each do |comment| %> |
| 45 |
<% next if comment.new_record? %> |
| 46 |
<div class="contextual"> |
| 47 |
<%= link_to_if_authorized image_tag('delete.png'), {:controller => 'comments', :action => 'destroy', :id => @news, :comment_id => comment},
|
| 48 |
:confirm => l(:text_are_you_sure), :method => :delete, :title => l(:button_delete) %> |
| 49 |
</div> |
| 50 |
<h4><%= avatar(comment.author, :size => "24") %><%= authoring comment.created_on, comment.author %></h4> |
| 51 |
<%= textilizable(comment.comments) %> |
| 52 |
<% end if @comments.any? %> |
| 53 |
</div> |
| 54 |
|
| 55 |
<% if authorize_for 'comments', 'create' %> |
| 56 |
<p><%= toggle_link l(:label_comment_add), "add_comment_form", :focus => "comment_comments" %></p> |
| 57 |
<% form_tag({:controller => 'comments', :action => 'create', :id => @news}, :id => "add_comment_form", :style => "display:none;") do %>
|
| 58 |
<div class="box"> |
| 59 |
<%= text_area 'comment', 'comments', :cols => 80, :rows => 15, :class => 'wiki-edit' %> |
| 60 |
<%= wikitoolbar_for 'comment_comments' %> |
| 61 |
</div> |
| 62 |
<p><%= submit_tag l(:button_add) %></p> |
| 63 |
<% end %> |
| 64 |
<% end %> |
| 65 |
|
| 66 |
<% html_title @news.title -%> |
| 67 |
|
| 68 |
<% content_for :header_tags do %> |
| 69 |
<%= stylesheet_link_tag 'scm' %> |
| 70 |
<% end %> |