@@ -1,21 +1,22 | |||
|
1 | 1 | <%= error_messages_for 'message' %> |
|
2 | <% replying ||= false %> | |
|
2 | 3 | |
|
3 | 4 | <div class="box"> |
|
4 | 5 | <!--[form:message]--> |
|
5 | 6 | <p><label><%= l(:field_subject) %></label><br /> |
|
6 | 7 | <%= f.text_field :subject, :required => true, :size => 120 %> |
|
7 | 8 | |
|
8 | <% if User.current.allowed_to?(:edit_messages, @project) %> | |
|
9 | <% if !replying && User.current.allowed_to?(:edit_messages, @project) %> | |
|
9 | 10 | <label><%= f.check_box :sticky %> Sticky</label> |
|
10 | 11 | <label><%= f.check_box :locked %> Locked</label> |
|
11 | 12 | <% end %> |
|
12 | 13 | </p> |
|
13 | 14 | |
|
14 | 15 | <p><%= f.text_area :content, :required => true, :cols => 80, :rows => 15, :class => 'wiki-edit', :id => 'message_content' %></p> |
|
15 | 16 | <%= wikitoolbar_for 'message_content' %> |
|
16 | 17 | <!--[eoform:message]--> |
|
17 | 18 | |
|
18 | 19 | <span class="tabular"> |
|
19 | 20 | <%= render :partial => 'attachments/form' %> |
|
20 | 21 | </span> |
|
21 | 22 | </div> |
@@ -1,39 +1,39 | |||
|
1 | 1 | <div class="contextual"> |
|
2 | 2 | <%= link_to_if_authorized l(:button_edit), {:action => 'edit', :id => @topic}, :class => 'icon icon-edit' %> |
|
3 | 3 | <%= link_to_if_authorized l(:button_delete), {:action => 'destroy', :id => @topic}, :method => :post, :confirm => l(:text_are_you_sure), :class => 'icon icon-del' %> |
|
4 | 4 | </div> |
|
5 | 5 | |
|
6 | 6 | <h2><%= link_to h(@board.name), :controller => 'boards', :action => 'show', :project_id => @project, :id => @board %> » <%=h @topic.subject %></h2> |
|
7 | 7 | |
|
8 | 8 | <div class="message"> |
|
9 | 9 | <p><span class="author"><%= authoring @topic.created_on, @topic.author %></span></p> |
|
10 | 10 | <div class="wiki"> |
|
11 | 11 | <%= textilizable(@topic.content, :attachments => @topic.attachments) %> |
|
12 | 12 | </div> |
|
13 | 13 | <%= link_to_attachments @topic.attachments, :no_author => true %> |
|
14 | 14 | </div> |
|
15 | 15 | <br /> |
|
16 | 16 | |
|
17 | 17 | <h3 class="icon22 icon22-comment"><%= l(:label_reply_plural) %></h3> |
|
18 | 18 | <% @topic.children.each do |message| %> |
|
19 | 19 | <a name="<%= "message-#{message.id}" %>"></a> |
|
20 | 20 | <div class="contextual"> |
|
21 | 21 | <%= link_to_if_authorized l(:button_edit), {:action => 'edit', :id => message}, :class => 'icon icon-edit' %> |
|
22 | 22 | <%= link_to_if_authorized l(:button_delete), {:action => 'destroy', :id => message}, :method => :post, :confirm => l(:text_are_you_sure), :class => 'icon icon-del' %> |
|
23 | 23 | </div> |
|
24 | 24 | <div class="message reply"> |
|
25 | 25 | <h4><%=h message.subject %> - <%= authoring message.created_on, message.author %></h4> |
|
26 | 26 | <div class="wiki"><%= textilizable message.content %></div> |
|
27 | 27 | <%= link_to_attachments message.attachments, :no_author => true %> |
|
28 | 28 | </div> |
|
29 | 29 | <% end %> |
|
30 | 30 | |
|
31 | 31 | <% if !@topic.locked? && authorize_for('messages', 'reply') %> |
|
32 | 32 | <p><%= toggle_link l(:button_reply), "reply", :focus => 'message_content' %></p> |
|
33 | 33 | <div id="reply" style="display:none;"> |
|
34 | 34 | <% form_for :reply, @reply, :url => {:action => 'reply', :id => @topic}, :html => {:multipart => true} do |f| %> |
|
35 | <%= render :partial => 'form', :locals => {:f => f} %> | |
|
35 | <%= render :partial => 'form', :locals => {:f => f, :replying => true} %> | |
|
36 | 36 | <%= submit_tag l(:button_submit) %> |
|
37 | 37 | <% end %> |
|
38 | 38 | </div> |
|
39 | 39 | <% end %> |
General Comments 0
You need to be logged in to leave comments.
Login now