show.html.erb
85 lines
| 3.3 KiB
| text/plain
|
TextLexer
|
r9959 | <%= board_breadcrumb(@message) %> | ||
|
r1284 | |||
|
r913 | <div class="contextual"> | ||
|
r11104 | <%= watcher_link(@topic, User.current) %> | ||
|
r9849 | <%= link_to( | ||
|
r8481 | l(:button_quote), | ||
|
r9849 | {:action => 'quote', :id => @topic}, | ||
:method => 'get', | ||||
:class => 'icon icon-comment', | ||||
:remote => true) if !@topic.locked? && authorize_for('messages', 'reply') %> | ||||
|
r8481 | <%= link_to( | ||
l(:button_edit), | ||||
{:action => 'edit', :id => @topic}, | ||||
:class => 'icon icon-edit' | ||||
) if @message.editable_by?(User.current) %> | ||||
<%= link_to( | ||||
l(:button_delete), | ||||
{:action => 'destroy', :id => @topic}, | ||||
:method => :post, | ||||
|
r9754 | :data => {:confirm => l(:text_are_you_sure)}, | ||
|
r8481 | :class => 'icon icon-del' | ||
) if @message.destroyable_by?(User.current) %> | ||||
|
r913 | </div> | ||
|
r13661 | <h2><%= avatar(@topic.author, :size => "24") %><%= @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"> | ||
|
r8829 | <%= textilizable(@topic, :content) %> | ||
|
r526 | </div> | ||
|
r2114 | <%= link_to_attachments @topic, :author => false %> | ||
|
r910 | </div> | ||
|
r752 | <br /> | ||
|
r538 | |||
|
r1481 | <% unless @replies.empty? %> | ||
|
r3259 | <h3 class="comments"><%= l(:label_reply_plural) %> (<%= @reply_count %>)</h3> | ||
|
r1183 | <% @replies.each do |message| %> | ||
|
r2710 | <div class="message reply" id="<%= "message-#{message.id}" %>"> | ||
|
r2343 | <div class="contextual"> | ||
|
r9849 | <%= link_to( | ||
|
r8481 | image_tag('comment.png'), | ||
|
r9849 | {:action => 'quote', :id => message}, | ||
:remote => true, | ||||
:method => 'get', | ||||
:title => l(:button_quote)) if !@topic.locked? && authorize_for('messages', 'reply') %> | ||||
|
r8481 | <%= link_to( | ||
image_tag('edit.png'), | ||||
{:action => 'edit', :id => message}, | ||||
:title => l(:button_edit) | ||||
) if message.editable_by?(User.current) %> | ||||
<%= link_to( | ||||
image_tag('delete.png'), | ||||
{:action => 'destroy', :id => message}, | ||||
:method => :post, | ||||
|
r9754 | :data => {:confirm => l(:text_are_you_sure)}, | ||
|
r8481 | :title => l(:button_delete) | ||
) if message.destroyable_by?(User.current) %> | ||||
|
r2343 | </div> | ||
|
r2710 | <h4> | ||
|
r7273 | <%= avatar(message.author, :size => "24") %> | ||
|
r13661 | <%= link_to message.subject, { :controller => 'messages', :action => 'show', :board_id => @board, :id => @topic, :r => message, :anchor => "message-#{message.id}" } %> | ||
|
r2710 | - | ||
<%= authoring message.created_on, message.author %> | ||||
</h4> | ||||
|
r1293 | <div class="wiki"><%= textilizable message, :content, :attachments => message.attachments %></div> | ||
|
r2114 | <%= link_to_attachments message, :author => false %> | ||
|
r913 | </div> | ||
|
r526 | <% end %> | ||
|
r3259 | <p class="pagination"><%= pagination_links_full @reply_pages, @reply_count, :per_page_links => false %></p> | ||
|
r1481 | <% end %> | ||
|
r526 | |||
|
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;"> | ||
|
r9346 | <%= form_for @reply, :as => :reply, :url => {:action => 'reply', :id => @topic}, :html => {:multipart => true, :id => 'message-form'} do |f| %> | ||
|
r1191 | <%= render :partial => 'form', :locals => {:f => f, :replying => true} %> | ||
<%= submit_tag l(:button_submit) %> | ||||
|
r9848 | <%= preview_link({:controller => 'messages', :action => 'preview', :board_id => @board}, 'message-form') %> | ||
|
r526 | <% end %> | ||
|
r1191 | <div id="preview" class="wiki"></div> | ||
|
r526 | </div> | ||
|
r538 | <% end %> | ||
|
r1548 | |||
|
r7445 | <% html_title @topic.subject %> | ||