show.rhtml
61 lines
| 3.1 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) %> | ||
|
r1771 | <%= link_to_remote_if_authorized l(:button_quote), { :url => {:action => 'quote', :id => @topic} }, :class => 'icon icon-comment' %> | ||
|
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> | ||
|
r1284 | <h2><%=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? %> | ||
|
r526 | <h3 class="icon22 icon22-comment"><%= l(:label_reply_plural) %></h3> | ||
|
r1183 | <% @replies.each do |message| %> | ||
|
r526 | <a name="<%= "message-#{message.id}" %>"></a> | ||
|
r913 | <div class="contextual"> | ||
|
r1771 | <%= link_to_remote_if_authorized image_tag('comment.png'), { :url => {:action => 'quote', :id => message} }, :title => l(:button_quote) %> | ||
|
r2017 | <%= 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) %> | ||||
|
r913 | </div> | ||
<div class="message reply"> | ||||
|
r910 | <h4><%=h message.subject %> - <%= 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 %> | ||
|
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) %> | ||||