mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-09 17:09:45 +08:00
55 lines
2.6 KiB
Text
55 lines
2.6 KiB
Text
<div class="modal share-repo-modal" tabindex="-1" role="dialog" >
|
|
<%= form_for :shares, url: multiple_update_team_repository_team_repositories_path(current_team, @repository), remote: :true do |f| %>
|
|
<div class="modal-dialog" role="document">
|
|
<div class="modal-content">
|
|
<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" id="create-repo-modal-label">
|
|
<%= t("repositories.index.modal_share.title") %>
|
|
</h4>
|
|
</div>
|
|
<div class="modal-body share-repo-container">
|
|
<div class="header">
|
|
<span class="team-selector">Share with Team</span>
|
|
<span class="permission-selector">Can Edit</span>
|
|
</div>
|
|
<div class="data-list">
|
|
<div class="all-teams">
|
|
<span class="team-selector">
|
|
<%= check_box_tag 'select_all_teams', 0, false, {class: "simple-checkbox"} %>
|
|
<span class="checkbox-label"></span>
|
|
All teams in the organization
|
|
</span>
|
|
<span class="permission-selector">
|
|
<%= check_box_tag 'select_all_write_permission', 0, false, {class: 'hidden trigger-checkbox'}%>
|
|
<span class="checkbox-label"></span>
|
|
</span>
|
|
</div>
|
|
<div class="teams-list">
|
|
<% (current_user.teams - [@repository.team]).each do |t| %>
|
|
<div class="team-container">
|
|
<div class="team-selector">
|
|
<%= check_box_tag 'share_team_ids[]', t.id, @repository.shared_with?(t), {id: "shared_#{t.id}", class: "simple-checkbox"} %>
|
|
<span class="checkbox-label"></span>
|
|
<%= t.name %>
|
|
</div>
|
|
<div class="permission-selector">
|
|
<%= check_box_tag 'write_permissions[]', t.id, @repository.shared_with_write?(t), {
|
|
id: "editable_#{t.id}",
|
|
class: (@repository.shared_with?(t) ? 'trigger-checkbox' : 'trigger-checkbox hidden')
|
|
}.compact %>
|
|
<span class="checkbox-label"></span>
|
|
</div>
|
|
</div>
|
|
<% end %>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<%= hidden_field_tag 'permission_changes', {}%>
|
|
<div class="modal-footer">
|
|
<%= f.submit t("repositories.index.modal_share.submit"), class: "btn btn-primary" %>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<% end %>
|
|
</div>
|