Mercurial > hg > soundsoftware-site
comparison .svn/pristine/43/435d200d5b8e7f06b0e465d23cb053a76fc8f49e.svn-base @ 1298:4f746d8966dd redmine_2.3_integration
Merge from redmine-2.3 branch to create new branch redmine-2.3-integration
author | Chris Cannam |
---|---|
date | Fri, 14 Jun 2013 09:28:30 +0100 |
parents | 622f24f53b42 |
children |
comparison
equal
deleted
inserted
replaced
1297:0a574315af3e | 1298:4f746d8966dd |
---|---|
1 <div class="contextual"> | |
2 <%= watcher_link(@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 %> |