##// END OF EJS Templates
Show thumbnails on messages (#22941)....
Jean-Philippe Lang -
r15224:974d6db6dbcb
parent child
Show More
@@ -1,89 +1,89
1 <%= board_breadcrumb(@message) %>
1 <%= board_breadcrumb(@message) %>
2
2
3 <div class="contextual">
3 <div class="contextual">
4 <%= watcher_link(@topic, User.current) %>
4 <%= watcher_link(@topic, User.current) %>
5 <%= link_to(
5 <%= link_to(
6 l(:button_quote),
6 l(:button_quote),
7 {:action => 'quote', :id => @topic},
7 {:action => 'quote', :id => @topic},
8 :method => 'get',
8 :method => 'get',
9 :class => 'icon icon-comment',
9 :class => 'icon icon-comment',
10 :remote => true) if !@topic.locked? && authorize_for('messages', 'reply') %>
10 :remote => true) if !@topic.locked? && authorize_for('messages', 'reply') %>
11 <%= link_to(
11 <%= link_to(
12 l(:button_edit),
12 l(:button_edit),
13 {:action => 'edit', :id => @topic},
13 {:action => 'edit', :id => @topic},
14 :class => 'icon icon-edit'
14 :class => 'icon icon-edit'
15 ) if @message.editable_by?(User.current) %>
15 ) if @message.editable_by?(User.current) %>
16 <%= link_to(
16 <%= link_to(
17 l(:button_delete),
17 l(:button_delete),
18 {:action => 'destroy', :id => @topic},
18 {:action => 'destroy', :id => @topic},
19 :method => :post,
19 :method => :post,
20 :data => {:confirm => l(:text_are_you_sure)},
20 :data => {:confirm => l(:text_are_you_sure)},
21 :class => 'icon icon-del'
21 :class => 'icon icon-del'
22 ) if @message.destroyable_by?(User.current) %>
22 ) if @message.destroyable_by?(User.current) %>
23 </div>
23 </div>
24
24
25 <h2><%= avatar(@topic.author, :size => "24") %><%= @topic.subject %></h2>
25 <h2><%= avatar(@topic.author, :size => "24") %><%= @topic.subject %></h2>
26
26
27 <div class="message">
27 <div class="message">
28 <p><span class="author"><%= authoring @topic.created_on, @topic.author %></span></p>
28 <p><span class="author"><%= authoring @topic.created_on, @topic.author %></span></p>
29 <div class="wiki">
29 <div class="wiki">
30 <%= textilizable(@topic, :content) %>
30 <%= textilizable(@topic, :content) %>
31 </div>
31 </div>
32 <%= link_to_attachments @topic, :author => false %>
32 <%= link_to_attachments @topic, :author => false, :thumbnails => true %>
33 </div>
33 </div>
34 <br />
34 <br />
35
35
36 <% unless @replies.empty? %>
36 <% unless @replies.empty? %>
37 <h3 class="comments"><%= l(:label_reply_plural) %> (<%= @reply_count %>)</h3>
37 <h3 class="comments"><%= l(:label_reply_plural) %> (<%= @reply_count %>)</h3>
38 <% @replies.each do |message| %>
38 <% @replies.each do |message| %>
39 <div class="message reply" id="<%= "message-#{message.id}" %>">
39 <div class="message reply" id="<%= "message-#{message.id}" %>">
40 <div class="contextual">
40 <div class="contextual">
41 <%= link_to(
41 <%= link_to(
42 '',
42 '',
43 {:action => 'quote', :id => message},
43 {:action => 'quote', :id => message},
44 :remote => true,
44 :remote => true,
45 :method => 'get',
45 :method => 'get',
46 :title => l(:button_quote),
46 :title => l(:button_quote),
47 :class => 'icon icon-comment'
47 :class => 'icon icon-comment'
48 ) if !@topic.locked? && authorize_for('messages', 'reply') %>
48 ) if !@topic.locked? && authorize_for('messages', 'reply') %>
49 <%= link_to(
49 <%= link_to(
50 '',
50 '',
51 {:action => 'edit', :id => message},
51 {:action => 'edit', :id => message},
52 :title => l(:button_edit),
52 :title => l(:button_edit),
53 :class => 'icon icon-edit'
53 :class => 'icon icon-edit'
54 ) if message.editable_by?(User.current) %>
54 ) if message.editable_by?(User.current) %>
55 <%= link_to(
55 <%= link_to(
56 '',
56 '',
57 {:action => 'destroy', :id => message},
57 {:action => 'destroy', :id => message},
58 :method => :post,
58 :method => :post,
59 :data => {:confirm => l(:text_are_you_sure)},
59 :data => {:confirm => l(:text_are_you_sure)},
60 :title => l(:button_delete),
60 :title => l(:button_delete),
61 :class => 'icon icon-del'
61 :class => 'icon icon-del'
62 ) if message.destroyable_by?(User.current) %>
62 ) if message.destroyable_by?(User.current) %>
63 </div>
63 </div>
64 <h4>
64 <h4>
65 <%= avatar(message.author, :size => "24") %>
65 <%= avatar(message.author, :size => "24") %>
66 <%= link_to message.subject, { :controller => 'messages', :action => 'show', :board_id => @board, :id => @topic, :r => message, :anchor => "message-#{message.id}" } %>
66 <%= link_to message.subject, { :controller => 'messages', :action => 'show', :board_id => @board, :id => @topic, :r => message, :anchor => "message-#{message.id}" } %>
67 -
67 -
68 <%= authoring message.created_on, message.author %>
68 <%= authoring message.created_on, message.author %>
69 </h4>
69 </h4>
70 <div class="wiki"><%= textilizable message, :content, :attachments => message.attachments %></div>
70 <div class="wiki"><%= textilizable message, :content, :attachments => message.attachments %></div>
71 <%= link_to_attachments message, :author => false %>
71 <%= link_to_attachments message, :author => false, :thumbnails => true %>
72 </div>
72 </div>
73 <% end %>
73 <% end %>
74 <span class="pagination"><%= pagination_links_full @reply_pages, @reply_count, :per_page_links => false %></span>
74 <span class="pagination"><%= pagination_links_full @reply_pages, @reply_count, :per_page_links => false %></span>
75 <% end %>
75 <% end %>
76
76
77 <% if !@topic.locked? && authorize_for('messages', 'reply') %>
77 <% if !@topic.locked? && authorize_for('messages', 'reply') %>
78 <p><%= toggle_link l(:button_reply), "reply", :focus => 'message_content' %></p>
78 <p><%= toggle_link l(:button_reply), "reply", :focus => 'message_content' %></p>
79 <div id="reply" style="display:none;">
79 <div id="reply" style="display:none;">
80 <%= form_for @reply, :as => :reply, :url => {:action => 'reply', :id => @topic}, :html => {:multipart => true, :id => 'message-form'} do |f| %>
80 <%= form_for @reply, :as => :reply, :url => {:action => 'reply', :id => @topic}, :html => {:multipart => true, :id => 'message-form'} do |f| %>
81 <%= render :partial => 'form', :locals => {:f => f, :replying => true} %>
81 <%= render :partial => 'form', :locals => {:f => f, :replying => true} %>
82 <%= submit_tag l(:button_submit) %>
82 <%= submit_tag l(:button_submit) %>
83 <%= preview_link({:controller => 'messages', :action => 'preview', :board_id => @board}, 'message-form') %>
83 <%= preview_link({:controller => 'messages', :action => 'preview', :board_id => @board}, 'message-form') %>
84 <% end %>
84 <% end %>
85 <div id="preview" class="wiki"></div>
85 <div id="preview" class="wiki"></div>
86 </div>
86 </div>
87 <% end %>
87 <% end %>
88
88
89 <% html_title @topic.subject %>
89 <% html_title @topic.subject %>
General Comments 0
You need to be logged in to leave comments. Login now