|
|
|
@ -62,8 +62,8 @@ See docs/COPYRIGHT.rdoc for more details. |
|
|
|
|
</li> |
|
|
|
|
<% end %> |
|
|
|
|
|
|
|
|
|
<div class="message"> |
|
|
|
|
<p><span class="author"><%= authoring @topic.created_on, @topic.author %></span></p> |
|
|
|
|
<div class="forum-message"> |
|
|
|
|
<p class="author additional-information"><%= authoring @topic.created_on, @topic.author %></p> |
|
|
|
|
<div class="wiki"> |
|
|
|
|
<%= format_text(@topic.content, object: @topic, attachments: @topic.attachments) %> |
|
|
|
|
</div> |
|
|
|
@ -73,70 +73,74 @@ See docs/COPYRIGHT.rdoc for more details. |
|
|
|
|
|
|
|
|
|
</div> |
|
|
|
|
<br /> |
|
|
|
|
<% unless @replies.empty? %> |
|
|
|
|
<h3 class="icon-context icon-quote"><%= t(:label_reply_plural) %> (<%= @replies.count %>)</h3> |
|
|
|
|
<% @replies.each do |message| %> |
|
|
|
|
<div class="message reply" id="<%= "message-#{message.id}" %>"> |
|
|
|
|
<h3> |
|
|
|
|
<%= avatar(message.author) %> |
|
|
|
|
<%= link_to h(message.subject), topic_path(@topic, |
|
|
|
|
r: message, |
|
|
|
|
anchor: "message-#{message.id}") %> |
|
|
|
|
- |
|
|
|
|
<%= authoring message.created_on, message.author %> |
|
|
|
|
</h3> |
|
|
|
|
<div class="message-reply-menu"> |
|
|
|
|
<%= link_to(icon_wrapper('icon-quote', t(:button_quote)), |
|
|
|
|
{ action: 'quote', id: message }, |
|
|
|
|
title: t(:button_quote), |
|
|
|
|
class: 'button boards--quote-button -small', |
|
|
|
|
alt: t(:button_quote)) if !@topic.locked? && authorize_for('messages', 'reply') %> |
|
|
|
|
<%= link_to(icon_wrapper('icon-edit', t(:button_edit)), |
|
|
|
|
{ action: 'edit', id: message }, |
|
|
|
|
title: t(:button_edit), |
|
|
|
|
class: 'button -small', |
|
|
|
|
alt: t(:button_edit)) if message.editable_by?(User.current) %> |
|
|
|
|
<%= link_to(icon_wrapper('icon-delete', t(:button_delete)), |
|
|
|
|
{ action: 'destroy', id: message}, |
|
|
|
|
method: :delete, |
|
|
|
|
data: { confirm: t(:text_are_you_sure) }, |
|
|
|
|
title: t(:button_delete), |
|
|
|
|
class: 'button -small', |
|
|
|
|
alt: t(:button_delete)) if message.destroyable_by?(User.current) %> |
|
|
|
|
</div> |
|
|
|
|
<div class="wiki"> |
|
|
|
|
<%= format_text message, :content, attachments: message.attachments %> |
|
|
|
|
|
|
|
|
|
<div class="forum-message--comments comments"> |
|
|
|
|
<% unless @replies.empty? %> |
|
|
|
|
<h3 class="icon-context icon-quote"><%= t(:label_reply_plural) %> (<%= @replies.count %>)</h3> |
|
|
|
|
<% @replies.each do |message| %> |
|
|
|
|
<div class="comment" id="<%= "message-#{message.id}" %>"> |
|
|
|
|
<div class="contextual"> |
|
|
|
|
<%= link_to(icon_wrapper('icon-context icon-quote', t(:button_quote)), |
|
|
|
|
{ action: 'quote', id: message }, |
|
|
|
|
title: t(:button_quote), |
|
|
|
|
class: 'boards--quote-button no-decoration-on-hover', |
|
|
|
|
alt: t(:button_quote)) if !@topic.locked? && authorize_for('messages', 'reply') %> |
|
|
|
|
<%= link_to(icon_wrapper('icon-context icon-edit', t(:button_edit)), |
|
|
|
|
{ action: 'edit', id: message }, |
|
|
|
|
title: t(:button_edit), |
|
|
|
|
class: 'no-decoration-on-hover', |
|
|
|
|
alt: t(:button_edit)) if message.editable_by?(User.current) %> |
|
|
|
|
<%= link_to(icon_wrapper('icon-context icon-delete', t(:button_delete)), |
|
|
|
|
{ action: 'destroy', id: message}, |
|
|
|
|
method: :delete, |
|
|
|
|
data: { confirm: t(:text_are_you_sure) }, |
|
|
|
|
title: t(:button_delete), |
|
|
|
|
class: 'no-decoration-on-hover', |
|
|
|
|
alt: t(:button_delete)) if message.destroyable_by?(User.current) %> |
|
|
|
|
</div> |
|
|
|
|
<h4 class="author additional-information"> |
|
|
|
|
<%= avatar(message.author) %> |
|
|
|
|
<%= link_to h(message.subject), topic_path(@topic, |
|
|
|
|
r: message, |
|
|
|
|
anchor: "message-#{message.id}") %> |
|
|
|
|
- |
|
|
|
|
<%= authoring message.created_on, message.author %> |
|
|
|
|
</h4> |
|
|
|
|
<div class="wiki"> |
|
|
|
|
<%= format_text message, :content, attachments: message.attachments %> |
|
|
|
|
</div> |
|
|
|
|
<% resource = message_attachment_representer(message) %> |
|
|
|
|
<%= list_attachments(resource) %> |
|
|
|
|
</div> |
|
|
|
|
<% resource = message_attachment_representer(message) %> |
|
|
|
|
<%= list_attachments(resource) %> |
|
|
|
|
</div> |
|
|
|
|
<% end %> |
|
|
|
|
<%= pagination_links_full @replies, per_page_links: false %> |
|
|
|
|
<% end %> |
|
|
|
|
<%= pagination_links_full @replies, per_page_links: false %> |
|
|
|
|
<% end %> |
|
|
|
|
|
|
|
|
|
<% if !@topic.locked? && authorize_for('messages', 'reply') %> |
|
|
|
|
<div class="form--space"> |
|
|
|
|
<%= toggle_link t(:button_reply), "reply", {focus: 'reply_content'}, {class: 'button -highlight'} %> |
|
|
|
|
</div> |
|
|
|
|
<% if !@topic.locked? && authorize_for('messages', 'reply') %> |
|
|
|
|
<div class="form--space"> |
|
|
|
|
<%= toggle_link t(:button_reply), "reply", {focus: 'reply_content'}, {class: 'button -highlight'} %> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<div id="reply" style="display:none;"> |
|
|
|
|
<div id="reply" style="display:none;"> |
|
|
|
|
|
|
|
|
|
<hr class="form--separator" /> |
|
|
|
|
<hr class="form--separator" /> |
|
|
|
|
|
|
|
|
|
<%= labelled_tabular_form_for @reply, |
|
|
|
|
as: :reply, |
|
|
|
|
url: reply_to_topic_path(@topic), |
|
|
|
|
html: { multipart: true, |
|
|
|
|
id: 'message-form', |
|
|
|
|
class: 'form' } do |f| %> |
|
|
|
|
<%= render partial: 'form', locals: {f: f, replying: true} %> |
|
|
|
|
<%= labelled_tabular_form_for @reply, |
|
|
|
|
as: :reply, |
|
|
|
|
url: reply_to_topic_path(@topic), |
|
|
|
|
html: { multipart: true, |
|
|
|
|
id: 'message-form', |
|
|
|
|
class: 'form' } do |f| %> |
|
|
|
|
<%= render partial: 'form', locals: {f: f, replying: true} %> |
|
|
|
|
|
|
|
|
|
<hr class="form--separator" /> |
|
|
|
|
<hr class="form--separator" /> |
|
|
|
|
|
|
|
|
|
<%= f.button t(:button_submit), class: 'button -highlight -highlight -with-icon icon-checkmark' %> |
|
|
|
|
<% end %> |
|
|
|
|
<div id="preview"></div> |
|
|
|
|
</div> |
|
|
|
|
<% end %> |
|
|
|
|
<%= f.button t(:button_submit), class: 'button -highlight -highlight -with-icon icon-checkmark' %> |
|
|
|
|
<% end %> |
|
|
|
|
<div id="preview"></div> |
|
|
|
|
</div> |
|
|
|
|
<% end %> |
|
|
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<% html_title h(@topic.subject) %> |
|
|
|
|