2021-04-18 23:19:16 +08:00
|
|
|
<% # frozen_string_literal: true %>
|
|
|
|
|
2021-05-02 17:22:59 +08:00
|
|
|
<div class="modal fade" tabindex="-1" role="dialog" data-action="modal-close" data-target="<%= projects_path %>">
|
2021-04-30 19:26:06 +08:00
|
|
|
<div class="modal-dialog modal-md" 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">
|
2021-05-09 00:06:07 +08:00
|
|
|
<% resource.user_assignments.each do |user_assignment| %>
|
|
|
|
<% cache [user_assignment, resource, current_user, user_assignment.user] do %>
|
|
|
|
<%= render partial: 'access_permissions/partials/user_assignment', locals: { user_assignment: user_assignment, user: user_assignment.user, resource: resource } %>
|
|
|
|
<% end %>
|
|
|
|
<% 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 %>
|
|
|
|
<%= link_to new_resource_path, class: 'btn btn-default pull-left', data: { action: 'swap-remote-container', target: '#user_assignments_modal' } do %>
|
|
|
|
<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>
|