##// END OF EJS Templates
Do not show 'Quote' links on locked topics (#4749)....
Jean-Philippe Lang -
r3263:88339fd98b82
parent child
Show More
@@ -1,66 +1,66
1 1 <%= breadcrumb link_to(l(:label_board_plural), {:controller => 'boards', :action => 'index', :project_id => @project}),
2 2 link_to(h(@board.name), {:controller => 'boards', :action => 'show', :project_id => @project, :id => @board}) %>
3 3
4 4 <div class="contextual">
5 5 <%= watcher_tag(@topic, User.current) %>
6 <%= link_to_remote_if_authorized l(:button_quote), { :url => {:action => 'quote', :id => @topic} }, :class => 'icon icon-comment' %>
6 <%= link_to_remote_if_authorized(l(:button_quote), { :url => {:action => 'quote', :id => @topic} }, :class => 'icon icon-comment') unless @topic.locked? %>
7 7 <%= link_to(l(:button_edit), {:action => 'edit', :id => @topic}, :class => 'icon icon-edit') if @message.editable_by?(User.current) %>
8 8 <%= link_to(l(:button_delete), {:action => 'destroy', :id => @topic}, :method => :post, :confirm => l(:text_are_you_sure), :class => 'icon icon-del') if @message.destroyable_by?(User.current) %>
9 9 </div>
10 10
11 11 <h2><%= avatar(@topic.author, :size => "24") %><%=h @topic.subject %></h2>
12 12
13 13 <div class="message">
14 14 <p><span class="author"><%= authoring @topic.created_on, @topic.author %></span></p>
15 15 <div class="wiki">
16 16 <%= textilizable(@topic.content, :attachments => @topic.attachments) %>
17 17 </div>
18 18 <%= link_to_attachments @topic, :author => false %>
19 19 </div>
20 20 <br />
21 21
22 22 <% unless @replies.empty? %>
23 23 <h3 class="comments"><%= l(:label_reply_plural) %> (<%= @reply_count %>)</h3>
24 24 <% @replies.each do |message| %>
25 25 <div class="message reply" id="<%= "message-#{message.id}" %>">
26 26 <div class="contextual">
27 <%= link_to_remote_if_authorized image_tag('comment.png'), { :url => {:action => 'quote', :id => message} }, :title => l(:button_quote) %>
27 <%= link_to_remote_if_authorized(image_tag('comment.png'), { :url => {:action => 'quote', :id => message} }, :title => l(:button_quote)) unless @topic.locked? %>
28 28 <%= link_to(image_tag('edit.png'), {:action => 'edit', :id => message}, :title => l(:button_edit)) if message.editable_by?(User.current) %>
29 29 <%= link_to(image_tag('delete.png'), {:action => 'destroy', :id => message}, :method => :post, :confirm => l(:text_are_you_sure), :title => l(:button_delete)) if message.destroyable_by?(User.current) %>
30 30 </div>
31 31 <h4>
32 32 <%= avatar(message.author, :size => "24") %>
33 33 <%= link_to h(message.subject), { :controller => 'messages', :action => 'show', :board_id => @board, :id => @topic, :anchor => "message-#{message.id}" } %>
34 34 -
35 35 <%= authoring message.created_on, message.author %>
36 36 </h4>
37 37 <div class="wiki"><%= textilizable message, :content, :attachments => message.attachments %></div>
38 38 <%= link_to_attachments message, :author => false %>
39 39 </div>
40 40 <% end %>
41 41 <p class="pagination"><%= pagination_links_full @reply_pages, @reply_count, :per_page_links => false %></p>
42 42 <% end %>
43 43
44 44 <% if !@topic.locked? && authorize_for('messages', 'reply') %>
45 45 <p><%= toggle_link l(:button_reply), "reply", :focus => 'message_content' %></p>
46 46 <div id="reply" style="display:none;">
47 47 <% form_for :reply, @reply, :url => {:action => 'reply', :id => @topic}, :html => {:multipart => true, :id => 'message-form'} do |f| %>
48 48 <%= render :partial => 'form', :locals => {:f => f, :replying => true} %>
49 49 <%= submit_tag l(:button_submit) %>
50 50 <%= link_to_remote l(:label_preview),
51 51 { :url => { :controller => 'messages', :action => 'preview', :board_id => @board },
52 52 :method => 'post',
53 53 :update => 'preview',
54 54 :with => "Form.serialize('message-form')",
55 55 :complete => "Element.scrollTo('preview')"
56 56 }, :accesskey => accesskey(:preview) %>
57 57 <% end %>
58 58 <div id="preview" class="wiki"></div>
59 59 </div>
60 60 <% end %>
61 61
62 62 <% content_for :header_tags do %>
63 63 <%= stylesheet_link_tag 'scm' %>
64 64 <% end %>
65 65
66 66 <% html_title h(@topic.subject) %>
General Comments 0
You need to be logged in to leave comments. Login now