To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.
root / app / views / messages / show.html.erb @ 1298:4f746d8966dd
History | View | Annotate | Download (3.32 KB)
| 1 | 1115:433d4f72a19b | Chris | <%= board_breadcrumb(@message) %>
|
|---|---|---|---|
| 2 | 0:513646585e45 | Chris | |
| 3 | <div class="contextual"> |
||
| 4 | 1295:622f24f53b42 | Chris | <%= watcher_link(@topic, User.current) %>
|
| 5 | 1115:433d4f72a19b | Chris | <%= link_to(
|
| 6 | l(:button_quote),
|
||
| 7 | {:action => 'quote', :id => @topic},
|
||
| 8 | :remote => true,
|
||
| 9 | :method => 'get',
|
||
| 10 | :class => 'icon icon-comment',
|
||
| 11 | :remote => true) if !@topic.locked? && authorize_for('messages', 'reply') %>
|
||
| 12 | <%= link_to(
|
||
| 13 | l(:button_edit),
|
||
| 14 | {:action => 'edit', :id => @topic},
|
||
| 15 | :class => 'icon icon-edit'
|
||
| 16 | ) if @message.editable_by?(User.current) %>
|
||
| 17 | <%= link_to(
|
||
| 18 | l(:button_delete),
|
||
| 19 | {:action => 'destroy', :id => @topic},
|
||
| 20 | :method => :post,
|
||
| 21 | :data => {:confirm => l(:text_are_you_sure)},
|
||
| 22 | :class => 'icon icon-del'
|
||
| 23 | ) if @message.destroyable_by?(User.current) %>
|
||
| 24 | 0:513646585e45 | Chris | </div>
|
| 25 | |||
| 26 | <h2><%= avatar(@topic.author, :size => "24") %><%=h @topic.subject %></h2> |
||
| 27 | |||
| 28 | <div class="message"> |
||
| 29 | <p><span class="author"><%= authoring @topic.created_on, @topic.author %></span></p> |
||
| 30 | <div class="wiki"> |
||
| 31 | 1115:433d4f72a19b | Chris | <%= textilizable(@topic, :content) %>
|
| 32 | 0:513646585e45 | Chris | </div>
|
| 33 | <%= link_to_attachments @topic, :author => false %>
|
||
| 34 | </div>
|
||
| 35 | <br /> |
||
| 36 | |||
| 37 | <% unless @replies.empty? %>
|
||
| 38 | <h3 class="comments"><%= l(:label_reply_plural) %> (<%= @reply_count %>)</h3> |
||
| 39 | <% @replies.each do |message| %>
|
||
| 40 | <div class="message reply" id="<%= "message-#{message.id}" %>"> |
||
| 41 | <div class="contextual"> |
||
| 42 | 1115:433d4f72a19b | Chris | <%= link_to(
|
| 43 | image_tag('comment.png'),
|
||
| 44 | {:action => 'quote', :id => message},
|
||
| 45 | :remote => true,
|
||
| 46 | :method => 'get',
|
||
| 47 | :title => l(:button_quote)) if !@topic.locked? && authorize_for('messages', 'reply') %>
|
||
| 48 | <%= link_to(
|
||
| 49 | image_tag('edit.png'),
|
||
| 50 | {:action => 'edit', :id => message},
|
||
| 51 | :title => l(:button_edit)
|
||
| 52 | ) if message.editable_by?(User.current) %>
|
||
| 53 | <%= link_to(
|
||
| 54 | image_tag('delete.png'),
|
||
| 55 | {:action => 'destroy', :id => message},
|
||
| 56 | :method => :post,
|
||
| 57 | :data => {:confirm => l(:text_are_you_sure)},
|
||
| 58 | :title => l(:button_delete)
|
||
| 59 | ) if message.destroyable_by?(User.current) %>
|
||
| 60 | 0:513646585e45 | Chris | </div>
|
| 61 | <h4>
|
||
| 62 | 909:cbb26bc654de | Chris | <%= avatar(message.author, :size => "24") %>
|
| 63 | 1:cca12e1c1fd4 | Chris | <%= link_to h(message.subject), { :controller => 'messages', :action => 'show', :board_id => @board, :id => @topic, :r => message, :anchor => "message-#{message.id}" } %>
|
| 64 | 0:513646585e45 | Chris | - |
| 65 | <%= authoring message.created_on, message.author %>
|
||
| 66 | </h4>
|
||
| 67 | <div class="wiki"><%= textilizable message, :content, :attachments => message.attachments %></div> |
||
| 68 | <%= link_to_attachments message, :author => false %>
|
||
| 69 | </div>
|
||
| 70 | <% end %>
|
||
| 71 | <p class="pagination"><%= pagination_links_full @reply_pages, @reply_count, :per_page_links => false %></p> |
||
| 72 | <% end %>
|
||
| 73 | |||
| 74 | <% if !@topic.locked? && authorize_for('messages', 'reply') %>
|
||
| 75 | <p><%= toggle_link l(:button_reply), "reply", :focus => 'message_content' %></p> |
||
| 76 | <div id="reply" style="display:none;"> |
||
| 77 | 1115:433d4f72a19b | Chris | <%= form_for @reply, :as => :reply, :url => {:action => 'reply', :id => @topic}, :html => {:multipart => true, :id => 'message-form'} do |f| %>
|
| 78 | 0:513646585e45 | Chris | <%= render :partial => 'form', :locals => {:f => f, :replying => true} %>
|
| 79 | <%= submit_tag l(:button_submit) %>
|
||
| 80 | 1115:433d4f72a19b | Chris | <%= preview_link({:controller => 'messages', :action => 'preview', :board_id => @board}, 'message-form') %>
|
| 81 | 0:513646585e45 | Chris | <% end %>
|
| 82 | <div id="preview" class="wiki"></div> |
||
| 83 | </div>
|
||
| 84 | <% end %>
|
||
| 85 | |||
| 86 | 909:cbb26bc654de | Chris | <% html_title @topic.subject %> |