show.rhtml
66 lines
| 3.5 KiB
| text/html+ruby
|
RhtmlLexer
|
r1284 | <%= breadcrumb link_to(l(:label_board_plural), {:controller => 'boards', :action => 'index', :project_id => @project}), | ||
link_to(h(@board.name), {:controller => 'boards', :action => 'show', :project_id => @project, :id => @board}) %> | ||||
|
r913 | <div class="contextual"> | ||
|
r1876 | <%= watcher_tag(@topic, User.current) %> | ||
|
r3263 | <%= link_to_remote_if_authorized(l(:button_quote), { :url => {:action => 'quote', :id => @topic} }, :class => 'icon icon-comment') unless @topic.locked? %> | ||
|
r2017 | <%= 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, :confirm => l(:text_are_you_sure), :class => 'icon icon-del') if @message.destroyable_by?(User.current) %> | ||||
|
r913 | </div> | ||
|
r3170 | <h2><%= avatar(@topic.author, :size => "24") %><%=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> | ||
|
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"> | ||
|
r3263 | <%= link_to_remote_if_authorized(image_tag('comment.png'), { :url => {:action => 'quote', :id => message} }, :title => l(:button_quote)) unless @topic.locked? %> | ||
|
r2343 | <%= 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, :confirm => l(:text_are_you_sure), :title => l(:button_delete)) if message.destroyable_by?(User.current) %> | ||||
</div> | ||||
|
r2710 | <h4> | ||
|
r3170 | <%= avatar(message.author, :size => "24") %> | ||
|
r3763 | <%= link_to h(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;"> | ||
|
r1191 | <% form_for :reply, @reply, :url => {:action => 'reply', :id => @topic}, :html => {:multipart => true, :id => 'message-form'} do |f| %> | ||
<%= render :partial => 'form', :locals => {:f => f, :replying => true} %> | ||||
<%= submit_tag l(:button_submit) %> | ||||
<%= link_to_remote l(:label_preview), | ||||
{ :url => { :controller => 'messages', :action => 'preview', :board_id => @board }, | ||||
:method => 'post', | ||||
:update => 'preview', | ||||
:with => "Form.serialize('message-form')", | ||||
:complete => "Element.scrollTo('preview')" | ||||
}, :accesskey => accesskey(:preview) %> | ||||
|
r526 | <% end %> | ||
|
r1191 | <div id="preview" class="wiki"></div> | ||
|
r526 | </div> | ||
|
r538 | <% end %> | ||
|
r1548 | |||
<% content_for :header_tags do %> | ||||
<%= stylesheet_link_tag 'scm' %> | ||||
<% end %> | ||||
|
r1584 | |||
<% html_title h(@topic.subject) %> | ||||