1
0
Fork 0
This repository has been archived on 2023-03-27. You can view files and clone it, but cannot push or open issues or pull requests.
lpr-partynest/app/views/staffs/people/person_comments/index.html.erb

66 lines
1.8 KiB
Text
Raw Normal View History

2019-07-15 17:56:27 -04:00
<div class="container">
2019-08-15 03:57:17 -04:00
<%= nav_breadcrumb(
[translate(:staff_services), staff_root_path],
[Person.model_name.human(count: 0), staff_people_path],
@person.full_name,
) %>
2019-07-26 00:46:01 -04:00
2019-07-15 17:56:27 -04:00
<%= 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_enum :person_comment_origin, person_comment.origin %>
2019-07-22 14:00:39 -04:00
</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 %>
&bull;
<%= 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-09-03 01:37:22 -04:00
<%= f.input :text %>
<%= f.input :attachment, direct_upload: true %>
2019-07-15 19:04:49 -04:00
2019-09-03 01:37:22 -04:00
<%= f.button :submit %>
2019-07-15 19:04:49 -04:00
<% end %>
</div>
2019-07-15 17:56:27 -04:00
</div>