You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

show.rhtml 3.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <%= breadcrumb link_to(l(:label_board_plural), {:controller => 'boards', :action => 'index', :project_id => @project}),
  2. link_to(h(@board.name), {:controller => 'boards', :action => 'show', :project_id => @project, :id => @board}) %>
  3. <div class="contextual">
  4. <%= watcher_tag(@topic, User.current) %>
  5. <%= link_to_remote_if_authorized l(:button_quote), { :url => {:action => 'quote', :id => @topic} }, :class => 'icon icon-comment' %>
  6. <%= link_to(l(:button_edit), {:action => 'edit', :id => @topic}, :class => 'icon icon-edit') if @message.editable_by?(User.current) %>
  7. <%= 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) %>
  8. </div>
  9. <h2><%= avatar(@topic.author, :size => "24") %><%=h @topic.subject %></h2>
  10. <div class="message">
  11. <p><span class="author"><%= authoring @topic.created_on, @topic.author %></span></p>
  12. <div class="wiki">
  13. <%= textilizable(@topic.content, :attachments => @topic.attachments) %>
  14. </div>
  15. <%= link_to_attachments @topic, :author => false %>
  16. </div>
  17. <br />
  18. <% unless @replies.empty? %>
  19. <h3 class="comments"><%= l(:label_reply_plural) %></h3>
  20. <% @replies.each do |message| %>
  21. <div class="message reply" id="<%= "message-#{message.id}" %>">
  22. <div class="contextual">
  23. <%= link_to_remote_if_authorized image_tag('comment.png'), { :url => {:action => 'quote', :id => message} }, :title => l(:button_quote) %>
  24. <%= link_to(image_tag('edit.png'), {:action => 'edit', :id => message}, :title => l(:button_edit)) if message.editable_by?(User.current) %>
  25. <%= 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) %>
  26. </div>
  27. <h4>
  28. <%= avatar(message.author, :size => "24") %>
  29. <%= link_to h(message.subject), { :controller => 'messages', :action => 'show', :board_id => @board, :id => @topic, :anchor => "message-#{message.id}" } %>
  30. -
  31. <%= authoring message.created_on, message.author %>
  32. </h4>
  33. <div class="wiki"><%= textilizable message, :content, :attachments => message.attachments %></div>
  34. <%= link_to_attachments message, :author => false %>
  35. </div>
  36. <% end %>
  37. <% end %>
  38. <% if !@topic.locked? && authorize_for('messages', 'reply') %>
  39. <p><%= toggle_link l(:button_reply), "reply", :focus => 'message_content' %></p>
  40. <div id="reply" style="display:none;">
  41. <% form_for :reply, @reply, :url => {:action => 'reply', :id => @topic}, :html => {:multipart => true, :id => 'message-form'} do |f| %>
  42. <%= render :partial => 'form', :locals => {:f => f, :replying => true} %>
  43. <%= submit_tag l(:button_submit) %>
  44. <%= link_to_remote l(:label_preview),
  45. { :url => { :controller => 'messages', :action => 'preview', :board_id => @board },
  46. :method => 'post',
  47. :update => 'preview',
  48. :with => "Form.serialize('message-form')",
  49. :complete => "Element.scrollTo('preview')"
  50. }, :accesskey => accesskey(:preview) %>
  51. <% end %>
  52. <div id="preview" class="wiki"></div>
  53. </div>
  54. <% end %>
  55. <% content_for :header_tags do %>
  56. <%= stylesheet_link_tag 'scm' %>
  57. <% end %>
  58. <% html_title h(@topic.subject) %>