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