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}) %>
|
3
|
|
4
|
<div class="contextual">
|
5
|
<%= watcher_tag(@topic, User.current) %>
|
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) %>
|
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>
|
10
|
|
11
|
<h2><%=h @topic.subject %></h2>
|
12
|
|
13
|
<div class="message">
|
14
|
<%= avatar(@topic.author, :size => "64") %>
|
15
|
<p><span class="author"><%= authoring @topic.created_on, @topic.author %></span></p>
|
16
|
<div class="wiki">
|
17
|
<%= textilizable(@topic.content, :attachments => @topic.attachments) %>
|
18
|
</div>
|
19
|
<%= link_to_attachments @topic.attachments, :no_author => true %>
|
20
|
</div>
|
21
|
<br />
|
22
|
|
23
|
<% unless @replies.empty? %>
|
24
|
<h3 class="icon22 icon22-comment"><%= l(:label_reply_plural) %></h3>
|
25
|
<% @replies.each do |message| %>
|
26
|
<div class="message reply">
|
27
|
<a name="<%= "message-#{message.id}" %>"></a>
|
28
|
<div class="contextual">
|
29
|
<%= link_to_remote_if_authorized image_tag('comment.png'), { :url => {:action => 'quote', :id => message} }, :title => l(:button_quote) %>
|
30
|
<%= link_to(image_tag('edit.png'), {:action => 'edit', :id => message}, :title => l(:button_edit)) if message.editable_by?(User.current) %>
|
31
|
<%= 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) %>
|
32
|
</div>
|
33
|
<h4><%=h message.subject %> - <%= authoring message.created_on, message.author %></h4>
|
34
|
<%= avatar(message.author, :size => "32") %>
|
35
|
<div class="wiki"><%= textilizable message, :content, :attachments => message.attachments %></div>
|
36
|
<%= link_to_attachments message.attachments, :no_author => true %>
|
37
|
</div>
|
38
|
<% end %>
|
39
|
<% end %>
|
40
|
|
41
|
<% if !@topic.locked? && authorize_for('messages', 'reply') %>
|
42
|
<p><%= toggle_link l(:button_reply), "reply", :focus => 'message_content' %></p>
|
43
|
<div id="reply" style="display:none;">
|
44
|
<% form_for :reply, @reply, :url => {:action => 'reply', :id => @topic}, :html => {:multipart => true, :id => 'message-form'} do |f| %>
|
45
|
<%= render :partial => 'form', :locals => {:f => f, :replying => true} %>
|
46
|
<%= submit_tag l(:button_submit) %>
|
47
|
<%= link_to_remote l(:label_preview),
|
48
|
{ :url => { :controller => 'messages', :action => 'preview', :board_id => @board },
|
49
|
:method => 'post',
|
50
|
:update => 'preview',
|
51
|
:with => "Form.serialize('message-form')",
|
52
|
:complete => "Element.scrollTo('preview')"
|
53
|
}, :accesskey => accesskey(:preview) %>
|
54
|
<% end %>
|
55
|
<div id="preview" class="wiki"></div>
|
56
|
</div>
|
57
|
<% end %>
|
58
|
|
59
|
<% content_for :header_tags do %>
|
60
|
<%= stylesheet_link_tag 'scm' %>
|
61
|
<% end %>
|
62
|
|
63
|
<% html_title h(@topic.subject) %>
|