scinote-web/app/views/user_projects/_index.html.erb
2021-02-22 22:37:32 +01:00

47 lines
1.9 KiB
Text

<div class="modal" id="viewProjectUsersModal" tabindex="-1" role="dialog" aria-labelledby="viewProjectUsersModalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="<%= t('general.close') %>"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="viewProjectUsersModalLabel">
<%= t('user_projects.view_users.modal_title', name: @project.name) %>
</h4>
</div>
<div class="modal-body">
<ul class="no-style project-users-list">
<% if @user_projects.blank? %>
<li>
<em><%= t('user_projects.view_users.no_users') %></em>
</li>
<% else %>
<% @user_projects.each do |user_project| %>
<li>
<div class="row">
<div class="col-xs-1">
<span class='global-avatar-container'>
<%= image_tag avatar_path(user_project.user, :icon_small), class: 'img-circle pull-left' %>
</span>
</div>
<div class="col-xs-11">
<span><%= user_project.user.full_name %></span>
<% if user_project.user == current_user %>
<%= t('user_projects.view_users.current_user_label') %>
<% end %>
<br>
<small class="text-muted"><%= t('user_projects.enums.role.'<< user_project.role) %></small>
</div>
</div>
<hr>
</li>
<% end %>
<% end %>
</ul>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" data-dismiss="modal">
<%= t('general.close') %>
</button>
</div>
</div>
</div>
</div>