2019-06-04 03:40:48 +00:00
|
|
|
<main class="main main--article"
|
2019-09-18 17:25:04 +00:00
|
|
|
data-base-path='<%= custom_path_if_needed help_answer_path(@category, @object, locale: '{locale}'), @knowledge_base %>'
|
2019-06-04 03:40:48 +00:00
|
|
|
data-available-locales='<%= @object_locales.map(&:locale).join(',') %>'>
|
|
|
|
<article class="article">
|
|
|
|
<div class="container">
|
|
|
|
<h1>
|
2019-06-06 01:23:45 +00:00
|
|
|
<%= @object.translation.title %>
|
2019-06-04 03:40:48 +00:00
|
|
|
</h1>
|
|
|
|
|
|
|
|
<div class="article-content">
|
2020-02-19 17:07:52 +00:00
|
|
|
<%= prepare_rich_text(@object.translation.content.body_with_urls).html_safe %>
|
2019-06-04 03:40:48 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<% if (attachments = @object.attachments_sorted) && attachments.present? %>
|
2021-08-16 08:20:07 +00:00
|
|
|
<div class="attachments article-accessories">
|
2019-06-04 03:40:48 +00:00
|
|
|
<%= icon 'paperclip' %>
|
2021-08-16 08:20:07 +00:00
|
|
|
<div class="article-accessories-title"><%= zt('Attached Files') %></div>
|
2019-06-04 03:40:48 +00:00
|
|
|
<% attachments.each do |attachment| %>
|
2019-09-18 17:25:04 +00:00
|
|
|
<%= link_to custom_path_if_needed(attachment_path(attachment), @knowledge_base), class: 'attachment', download: true do %>
|
2019-06-04 03:40:48 +00:00
|
|
|
<span class="attachment-name u-highlight"><%= attachment.filename %></span>
|
|
|
|
<div class="attachment-size">404kb</div>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
2021-08-16 08:20:07 +00:00
|
|
|
|
|
|
|
<% if (tags = @object.tag_list) && tags.present? %>
|
|
|
|
<div class="tags article-accessories">
|
|
|
|
<%= icon 'hashtag' %>
|
|
|
|
<div class="article-accessories-title"><%= zt('Tags') %></div>
|
|
|
|
<div class="tags-content">
|
|
|
|
<% tags.each do |tag| %>
|
|
|
|
<%= link_to tag, custom_path_if_needed(help_tag_path(tag, locale: params[:locale]), @knowledge_base), class: 'tag' %>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
2019-06-04 03:40:48 +00:00
|
|
|
</div>
|
|
|
|
</article>
|
|
|
|
</main>
|