@@ -1,94 +1,94 | |||||
1 | <%= breadcrumb link_to(l(:label_board_plural), project_boards_path(@project)), |
|
1 | <%= breadcrumb link_to(l(:label_board_plural), project_boards_path(@project)), | |
2 | link_to(h(@board.name), project_board_path(@project, @board)) %> |
|
2 | link_to(h(@board.name), project_board_path(@project, @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( |
|
6 | <%= link_to_remote_if_authorized( | |
7 | l(:button_quote), |
|
7 | l(:button_quote), | |
8 | { :url => {:action => 'quote', :id => @topic} }, |
|
8 | { :url => {:action => 'quote', :id => @topic} }, | |
9 | :class => 'icon icon-comment' |
|
9 | :class => 'icon icon-comment' | |
10 | ) unless @topic.locked? %> |
|
10 | ) unless @topic.locked? %> | |
11 | <%= link_to( |
|
11 | <%= link_to( | |
12 | l(:button_edit), |
|
12 | l(:button_edit), | |
13 | {:action => 'edit', :id => @topic}, |
|
13 | {:action => 'edit', :id => @topic}, | |
14 | :class => 'icon icon-edit' |
|
14 | :class => 'icon icon-edit' | |
15 | ) if @message.editable_by?(User.current) %> |
|
15 | ) if @message.editable_by?(User.current) %> | |
16 | <%= link_to( |
|
16 | <%= link_to( | |
17 | l(:button_delete), |
|
17 | l(:button_delete), | |
18 | {:action => 'destroy', :id => @topic}, |
|
18 | {:action => 'destroy', :id => @topic}, | |
19 | :method => :post, |
|
19 | :method => :post, | |
20 | :confirm => l(:text_are_you_sure), |
|
20 | :confirm => l(:text_are_you_sure), | |
21 | :class => 'icon icon-del' |
|
21 | :class => 'icon icon-del' | |
22 | ) if @message.destroyable_by?(User.current) %> |
|
22 | ) if @message.destroyable_by?(User.current) %> | |
23 | </div> |
|
23 | </div> | |
24 |
|
24 | |||
25 | <h2><%= avatar(@topic.author, :size => "24") %><%=h @topic.subject %></h2> |
|
25 | <h2><%= avatar(@topic.author, :size => "24") %><%=h @topic.subject %></h2> | |
26 |
|
26 | |||
27 | <div class="message"> |
|
27 | <div class="message"> | |
28 | <p><span class="author"><%= authoring @topic.created_on, @topic.author %></span></p> |
|
28 | <p><span class="author"><%= authoring @topic.created_on, @topic.author %></span></p> | |
29 | <div class="wiki"> |
|
29 | <div class="wiki"> | |
30 |
<%= textilizable(@topic |
|
30 | <%= textilizable(@topic, :content) %> | |
31 | </div> |
|
31 | </div> | |
32 | <%= link_to_attachments @topic, :author => false %> |
|
32 | <%= link_to_attachments @topic, :author => false %> | |
33 | </div> |
|
33 | </div> | |
34 | <br /> |
|
34 | <br /> | |
35 |
|
35 | |||
36 | <% unless @replies.empty? %> |
|
36 | <% unless @replies.empty? %> | |
37 | <h3 class="comments"><%= l(:label_reply_plural) %> (<%= @reply_count %>)</h3> |
|
37 | <h3 class="comments"><%= l(:label_reply_plural) %> (<%= @reply_count %>)</h3> | |
38 | <% @replies.each do |message| %> |
|
38 | <% @replies.each do |message| %> | |
39 | <div class="message reply" id="<%= "message-#{message.id}" %>"> |
|
39 | <div class="message reply" id="<%= "message-#{message.id}" %>"> | |
40 | <div class="contextual"> |
|
40 | <div class="contextual"> | |
41 | <%= link_to_remote_if_authorized( |
|
41 | <%= link_to_remote_if_authorized( | |
42 | image_tag('comment.png'), |
|
42 | image_tag('comment.png'), | |
43 | { :url => {:action => 'quote', :id => message} }, |
|
43 | { :url => {:action => 'quote', :id => message} }, | |
44 | :title => l(:button_quote) |
|
44 | :title => l(:button_quote) | |
45 | ) unless @topic.locked? %> |
|
45 | ) unless @topic.locked? %> | |
46 | <%= link_to( |
|
46 | <%= link_to( | |
47 | image_tag('edit.png'), |
|
47 | image_tag('edit.png'), | |
48 | {:action => 'edit', :id => message}, |
|
48 | {:action => 'edit', :id => message}, | |
49 | :title => l(:button_edit) |
|
49 | :title => l(:button_edit) | |
50 | ) if message.editable_by?(User.current) %> |
|
50 | ) if message.editable_by?(User.current) %> | |
51 | <%= link_to( |
|
51 | <%= link_to( | |
52 | image_tag('delete.png'), |
|
52 | image_tag('delete.png'), | |
53 | {:action => 'destroy', :id => message}, |
|
53 | {:action => 'destroy', :id => message}, | |
54 | :method => :post, |
|
54 | :method => :post, | |
55 | :confirm => l(:text_are_you_sure), |
|
55 | :confirm => l(:text_are_you_sure), | |
56 | :title => l(:button_delete) |
|
56 | :title => l(:button_delete) | |
57 | ) if message.destroyable_by?(User.current) %> |
|
57 | ) if message.destroyable_by?(User.current) %> | |
58 | </div> |
|
58 | </div> | |
59 | <h4> |
|
59 | <h4> | |
60 | <%= avatar(message.author, :size => "24") %> |
|
60 | <%= avatar(message.author, :size => "24") %> | |
61 | <%= link_to h(message.subject), { :controller => 'messages', :action => 'show', :board_id => @board, :id => @topic, :r => message, :anchor => "message-#{message.id}" } %> |
|
61 | <%= link_to h(message.subject), { :controller => 'messages', :action => 'show', :board_id => @board, :id => @topic, :r => message, :anchor => "message-#{message.id}" } %> | |
62 | - |
|
62 | - | |
63 | <%= authoring message.created_on, message.author %> |
|
63 | <%= authoring message.created_on, message.author %> | |
64 | </h4> |
|
64 | </h4> | |
65 | <div class="wiki"><%= textilizable message, :content, :attachments => message.attachments %></div> |
|
65 | <div class="wiki"><%= textilizable message, :content, :attachments => message.attachments %></div> | |
66 | <%= link_to_attachments message, :author => false %> |
|
66 | <%= link_to_attachments message, :author => false %> | |
67 | </div> |
|
67 | </div> | |
68 | <% end %> |
|
68 | <% end %> | |
69 | <p class="pagination"><%= pagination_links_full @reply_pages, @reply_count, :per_page_links => false %></p> |
|
69 | <p class="pagination"><%= pagination_links_full @reply_pages, @reply_count, :per_page_links => false %></p> | |
70 | <% end %> |
|
70 | <% end %> | |
71 |
|
71 | |||
72 | <% if !@topic.locked? && authorize_for('messages', 'reply') %> |
|
72 | <% if !@topic.locked? && authorize_for('messages', 'reply') %> | |
73 | <p><%= toggle_link l(:button_reply), "reply", :focus => 'message_content' %></p> |
|
73 | <p><%= toggle_link l(:button_reply), "reply", :focus => 'message_content' %></p> | |
74 | <div id="reply" style="display:none;"> |
|
74 | <div id="reply" style="display:none;"> | |
75 | <% form_for :reply, @reply, :url => {:action => 'reply', :id => @topic}, :html => {:multipart => true, :id => 'message-form'} do |f| %> |
|
75 | <% form_for :reply, @reply, :url => {:action => 'reply', :id => @topic}, :html => {:multipart => true, :id => 'message-form'} do |f| %> | |
76 | <%= render :partial => 'form', :locals => {:f => f, :replying => true} %> |
|
76 | <%= render :partial => 'form', :locals => {:f => f, :replying => true} %> | |
77 | <%= submit_tag l(:button_submit) %> |
|
77 | <%= submit_tag l(:button_submit) %> | |
78 | <%= link_to_remote l(:label_preview), |
|
78 | <%= link_to_remote l(:label_preview), | |
79 | { :url => { :controller => 'messages', :action => 'preview', :board_id => @board }, |
|
79 | { :url => { :controller => 'messages', :action => 'preview', :board_id => @board }, | |
80 | :method => 'post', |
|
80 | :method => 'post', | |
81 | :update => 'preview', |
|
81 | :update => 'preview', | |
82 | :with => "Form.serialize('message-form')", |
|
82 | :with => "Form.serialize('message-form')", | |
83 | :complete => "Element.scrollTo('preview')" |
|
83 | :complete => "Element.scrollTo('preview')" | |
84 | }, :accesskey => accesskey(:preview) %> |
|
84 | }, :accesskey => accesskey(:preview) %> | |
85 | <% end %> |
|
85 | <% end %> | |
86 | <div id="preview" class="wiki"></div> |
|
86 | <div id="preview" class="wiki"></div> | |
87 | </div> |
|
87 | </div> | |
88 | <% end %> |
|
88 | <% end %> | |
89 |
|
89 | |||
90 | <% content_for :header_tags do %> |
|
90 | <% content_for :header_tags do %> | |
91 | <%= stylesheet_link_tag 'scm' %> |
|
91 | <%= stylesheet_link_tag 'scm' %> | |
92 | <% end %> |
|
92 | <% end %> | |
93 |
|
93 | |||
94 | <% html_title @topic.subject %> |
|
94 | <% html_title @topic.subject %> |
General Comments 0
You need to be logged in to leave comments.
Login now