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