2021-05-09 00:06:07 +08:00
|
|
|
<% # frozen_string_literal: true %>
|
|
|
|
|
2023-02-23 21:57:38 +08:00
|
|
|
<div class="modal fade <%= assignable.class.name.parameterize(separator: '-') %>-assignments-modal" tabindex="-1" role="dialog" data-action="modal-close">
|
2023-03-06 23:43:46 +08:00
|
|
|
<div class="modal-dialog" role="document">
|
2021-05-09 00:06:07 +08:00
|
|
|
<div class="modal-content" id="user_assignments_modal">
|
|
|
|
<div class="modal-header">
|
|
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
2023-03-07 18:17:56 +08:00
|
|
|
<h4 class="modal-title"><%= t("access_permissions.#{assignable.class.name.pluralize.underscore}.modals.show_modal.title", resource_name: assignable.name) %></h4>
|
2021-05-09 00:06:07 +08:00
|
|
|
</div>
|
|
|
|
<div class="modal-body">
|
2023-02-23 21:57:38 +08:00
|
|
|
<% manually_assigned_users.order(full_name: :asc).each do |user| %>
|
|
|
|
<% user_assignment = assignable.user_assignments.find_by(user: user) %>
|
|
|
|
<%= render partial: 'access_permissions/partials/user_assignment', locals: { user_assignment: user_assignment, user: user, assignable: assignable } %>
|
2021-05-09 00:06:07 +08:00
|
|
|
<% end %>
|
2023-03-17 18:30:51 +08:00
|
|
|
<%= render('access_permissions/partials/default_public_user_role_form', assignable: top_level_assignable, editable: false) if top_level_assignable.respond_to?(:visible?) && top_level_assignable.visible? %>
|
2021-05-09 00:06:07 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|