2021-04-18 23:19:16 +08:00
|
|
|
<% # frozen_string_literal: true %>
|
|
|
|
|
2021-11-09 23:16:10 +08:00
|
|
|
<div class="modal fade project-assignments-modal" tabindex="-1" role="dialog" data-action="modal-close">
|
2021-05-16 17:04:04 +08:00
|
|
|
<div class="modal-dialog modal-lg" role="document">
|
2021-04-18 23:19:16 +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>
|
|
|
|
<h4 class="modal-title"><%= t '.title', resource_name: resource.name %></h4>
|
|
|
|
</div>
|
|
|
|
<div class="modal-body">
|
2022-01-10 21:55:11 +08:00
|
|
|
<% resource.user_assignments.joins(:user).order('users.full_name ASC').each do |user_assignment| %>
|
2021-10-22 16:03:52 +08:00
|
|
|
<%= render partial: 'access_permissions/partials/user_assignment', locals: { user_assignment: user_assignment, user: user_assignment.user, resource: resource } %>
|
2021-05-09 00:06:07 +08:00
|
|
|
<% end %>
|
2021-04-18 23:19:16 +08:00
|
|
|
</div>
|
|
|
|
<div class="modal-footer">
|
2021-04-25 00:43:28 +08:00
|
|
|
<% if can_manage_resource %>
|
2021-06-19 23:17:57 +08:00
|
|
|
<%= link_to new_access_permissions_project_path, class: 'btn btn-default pull-left', data: { action: 'swap-remote-container', target: '#user_assignments_modal' } do %>
|
2021-04-25 00:43:28 +08:00
|
|
|
<i class="fas fa-plus"></i>
|
|
|
|
<%= t '.new_resource_assignments', resource: resource.model_name.human.downcase %>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
2021-04-18 23:19:16 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|