2019-07-15 17:56:27 -04:00
|
|
|
<div class="container">
|
|
|
|
<%= render partial: 'staffs/people/nav_tabs',
|
|
|
|
locals: { person: @person, tab: :person_comments } %>
|
|
|
|
|
2019-07-16 19:33:17 -04:00
|
|
|
<% @person_comments&.each_with_index do |person_comment, index| %>
|
2019-07-15 17:56:27 -04:00
|
|
|
<% unless index.zero? %>
|
|
|
|
<hr class="my-0"/>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<div class="card border-light">
|
|
|
|
<div class="card-body">
|
|
|
|
<p class="card-text">
|
2019-07-22 14:00:39 -04:00
|
|
|
<% if person_comment.origin %>
|
|
|
|
<strong>
|
|
|
|
<%= translate person_comment.origin,
|
|
|
|
scope: %i[enums person_comment_origin] %>
|
|
|
|
</strong>
|
|
|
|
|
|
|
|
<br/>
|
|
|
|
<% end %>
|
|
|
|
|
2019-07-15 17:56:27 -04:00
|
|
|
<%= person_comment.text %>
|
2019-07-17 04:34:51 -04:00
|
|
|
|
|
|
|
<% if person_comment.attachment.attached? %>
|
|
|
|
<br/>
|
|
|
|
|
|
|
|
<small>
|
|
|
|
<i class="fas fa-paperclip"></i>
|
|
|
|
<%= link_to person_comment.attachment.blob.filename.to_s,
|
|
|
|
rails_blob_path(person_comment.attachment.blob,
|
|
|
|
disposition: 'download') %>
|
|
|
|
</small>
|
|
|
|
<% end %>
|
2019-07-15 17:56:27 -04:00
|
|
|
</p>
|
|
|
|
|
|
|
|
<p class="card-text">
|
|
|
|
<small class="text-muted">
|
|
|
|
<%= localize person_comment.created_at, format: :long %>
|
|
|
|
<% if person_comment.account %>
|
|
|
|
•
|
|
|
|
<%= link_to person_comment.account.nickname,
|
|
|
|
person_comment.account %>
|
|
|
|
<% end %>
|
|
|
|
</small>
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
2019-07-15 19:04:49 -04:00
|
|
|
|
|
|
|
<div class="mt-2">
|
|
|
|
<%= simple_form_for [:staff, @person, @person_comment] do |f| %>
|
2019-07-16 19:33:17 -04:00
|
|
|
<%= f.error_notification %>
|
|
|
|
|
2019-07-15 19:04:49 -04:00
|
|
|
<div class="form-inputs">
|
2019-07-16 19:33:17 -04:00
|
|
|
<%= f.input :text %>
|
2019-07-17 04:34:51 -04:00
|
|
|
<%= f.input :attachment, direct_upload: true %>
|
2019-07-15 19:04:49 -04:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="form-actions">
|
|
|
|
<%= f.button :submit %>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
2019-07-15 17:56:27 -04:00
|
|
|
</div>
|