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 / 9a / 9ac63e5e929a03c7b0bb70dd2dff7c8190cd753b.svn-base @ 1297:0a574315af3e
History | View | Annotate | Download (2.59 KB)
| 1 | 1296:038ba2d95de8 | Chris | <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 => '$("#edit-news").show(); return false;') if User.current.allowed_to?(:manage_news, @project) %>
|
||
| 8 | <%= delete_link news_path(@news) if User.current.allowed_to?(:manage_news, @project) %> |
||
| 9 | </div> |
||
| 10 | |||
| 11 | <h2><%= avatar(@news.author, :size => "24") %><%=h @news.title %></h2> |
||
| 12 | |||
| 13 | <% if authorize_for('news', 'edit') %>
|
||
| 14 | <div id="edit-news" style="display:none;"> |
||
| 15 | <%= labelled_form_for :news, @news, :url => news_path(@news), |
||
| 16 | :html => { :id => 'news-form', :multipart => true, :method => :put } do |f| %>
|
||
| 17 | <%= render :partial => 'form', :locals => { :f => f } %>
|
||
| 18 | <%= submit_tag l(:button_save) %> |
||
| 19 | <%= preview_link preview_news_path(:project_id => @project, :id => @news), 'news-form' %> | |
||
| 20 | <%= link_to l(:button_cancel), "#", :onclick => '$("#edit-news").hide(); return false;' %>
|
||
| 21 | <% end %> |
||
| 22 | <div id="preview" class="wiki"></div> |
||
| 23 | </div> |
||
| 24 | <% end %> |
||
| 25 | |||
| 26 | <p><% unless @news.summary.blank? %><em><%=h @news.summary %></em><br /><% end %> |
||
| 27 | <span class="author"><%= authoring @news.created_on, @news.author %></span></p> |
||
| 28 | <div class="wiki"> |
||
| 29 | <%= textilizable(@news, :description) %> |
||
| 30 | </div> |
||
| 31 | <%= link_to_attachments @news %> |
||
| 32 | <br /> |
||
| 33 | |||
| 34 | <div id="comments" style="margin-bottom:16px;"> |
||
| 35 | <h3 class="comments"><%= l(:label_comment_plural) %></h3> |
||
| 36 | <% @comments.each do |comment| %> |
||
| 37 | <% next if comment.new_record? %> |
||
| 38 | <div class="contextual"> |
||
| 39 | <%= link_to_if_authorized image_tag('delete.png'), {:controller => 'comments', :action => 'destroy', :id => @news, :comment_id => comment},
|
||
| 40 | :data => {:confirm => l(:text_are_you_sure)}, :method => :delete, :title => l(:button_delete) %>
|
||
| 41 | </div> |
||
| 42 | <h4><%= avatar(comment.author, :size => "24") %><%= authoring comment.created_on, comment.author %></h4> |
||
| 43 | <%= textilizable(comment.comments) %> |
||
| 44 | <% end if @comments.any? %> |
||
| 45 | </div> |
||
| 46 | |||
| 47 | <% if @news.commentable? %> |
||
| 48 | <p><%= toggle_link l(:label_comment_add), "add_comment_form", :focus => "comment_comments" %></p> |
||
| 49 | <%= form_tag({:controller => 'comments', :action => 'create', :id => @news}, :id => "add_comment_form", :style => "display:none;") do %>
|
||
| 50 | <div class="box"> |
||
| 51 | <%= text_area 'comment', 'comments', :cols => 80, :rows => 15, :class => 'wiki-edit' %> |
||
| 52 | <%= wikitoolbar_for 'comment_comments' %> |
||
| 53 | </div> |
||
| 54 | <p><%= submit_tag l(:button_add) %></p> |
||
| 55 | <% end %> |
||
| 56 | <% end %> |
||
| 57 | |||
| 58 | <% html_title @news.title -%> |
||
| 59 | |||
| 60 | <% content_for :header_tags do %> |
||
| 61 | <%= stylesheet_link_tag 'scm' %> |
||
| 62 | <% end %> |