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