scinote-web/app/views/access_permissions/partials/_edit_assignments_content.html.erb
Alex Kriuchykhin 4a86a0ee45
Merge pull request #3771 from aignatov-bio/ai-sci-6325-user-sorting-in-assign-modals
Add A-Z sort for assignment modals [SCI-6325]
2022-01-25 12:59:15 +01:00

21 lines
1 KiB
Text

<% # frozen_string_literal: true %>
<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">&times;</span></button>
<h4 class="modal-title"><%= t '.title', resource_name: project.name %></h4>
</div>
<div class="modal-body">
<% project.manually_assigned_users.order(full_name: :asc).each do |user| %>
<%= render('access_permissions/partials/project_member_field', user: user, project: project, update_path: update_path) %>
<% end %>
<%= render('access_permissions/partials/default_public_user_role_form', project: project, editable: true) if project.visible? %>
</div>
<div class="modal-footer">
<%= 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: project.model_name.human.downcase %>
<% end %>
</div>
</div>