show.rhtml
39 lines
| 1.9 KiB
| text/html+ruby
|
RhtmlLexer
|
r913 | <div class="contextual"> | ||
<%= link_to_if_authorized l(:button_edit), {:action => 'edit', :id => @topic}, :class => 'icon icon-edit' %> | ||||
<%= link_to_if_authorized l(:button_delete), {:action => 'destroy', :id => @topic}, :method => :post, :confirm => l(:text_are_you_sure), :class => 'icon icon-del' %> | ||||
</div> | ||||
<h2><%= link_to h(@board.name), :controller => 'boards', :action => 'show', :project_id => @project, :id => @board %> » <%=h @topic.subject %></h2> | ||||
|
r526 | |||
|
r910 | <div class="message"> | ||
|
r913 | <p><span class="author"><%= authoring @topic.created_on, @topic.author %></span></p> | ||
|
r526 | <div class="wiki"> | ||
|
r913 | <%= textilizable(@topic.content, :attachments => @topic.attachments) %> | ||
|
r526 | </div> | ||
|
r913 | <%= link_to_attachments @topic.attachments, :no_author => true %> | ||
|
r910 | </div> | ||
|
r752 | <br /> | ||
|
r538 | |||
|
r526 | <h3 class="icon22 icon22-comment"><%= l(:label_reply_plural) %></h3> | ||
|
r913 | <% @topic.children.each do |message| %> | ||
|
r526 | <a name="<%= "message-#{message.id}" %>"></a> | ||
|
r913 | <div class="contextual"> | ||
<%= link_to_if_authorized l(:button_edit), {:action => 'edit', :id => message}, :class => 'icon icon-edit' %> | ||||
<%= link_to_if_authorized l(:button_delete), {:action => 'destroy', :id => message}, :method => :post, :confirm => l(:text_are_you_sure), :class => 'icon icon-del' %> | ||||
</div> | ||||
<div class="message reply"> | ||||
|
r910 | <h4><%=h message.subject %> - <%= authoring message.created_on, message.author %></h4> | ||
|
r752 | <div class="wiki"><%= textilizable message.content %></div> | ||
|
r910 | <%= link_to_attachments message.attachments, :no_author => true %> | ||
|
r913 | </div> | ||
|
r526 | <% end %> | ||
|
r913 | <% if !@topic.locked? && authorize_for('messages', 'reply') %> | ||
|
r910 | <p><%= toggle_link l(:button_reply), "reply", :focus => 'message_content' %></p> | ||
|
r526 | <div id="reply" style="display:none;"> | ||
|
r913 | <% form_for :reply, @reply, :url => {:action => 'reply', :id => @topic}, :html => {:multipart => true} do |f| %> | ||
|
r1048 | <%= render :partial => 'form', :locals => {:f => f, :replying => true} %> | ||
|
r910 | <%= submit_tag l(:button_submit) %> | ||
|
r526 | <% end %> | ||
</div> | ||||
|
r538 | <% end %> | ||