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