scinote-web/app/views/access_permissions/experiments/modals/_edit_modal.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

28 lines
1.3 KiB
Text

<% # frozen_string_literal: true %>
<div class="modal fade user-assignments-modal experiment-assignments-modal" tabindex="-1" role="dialog" data-action="modal-close">
<div class="modal-dialog modal-lg" role="document">
<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: experiment.name %></h4>
</div>
<div class="modal-body">
<p class="user-assignments-description">
<%= t '.description' %>
</p>
<hr />
<% users.order(full_name: :asc).each do |user| %>
<%= render partial: 'access_permissions/partials/experiment_member_field',
locals: {
user: user,
project: project,
experiment: experiment,
update_path: access_permissions_project_experiment_path(project, experiment)
} %>
<% end %>
<%= render('access_permissions/partials/default_public_user_role_form', project: project, editable: false) if project.visible? %>
</div>
</div>
</div>
</div>