2016-03-11 12:37:46 -05:00
|
|
|
- page_title "Groups"
|
2016-04-25 09:42:17 -04:00
|
|
|
.row.prepend-top-default
|
|
|
|
.col-lg-3.settings-sidebar
|
|
|
|
%h4.prepend-top-0
|
|
|
|
Share project with other groups
|
|
|
|
%p
|
|
|
|
Projects can be stored in only one group at once. However you can share a project with other groups here.
|
|
|
|
.col-lg-9
|
|
|
|
%h5.prepend-top-0
|
|
|
|
Set a group to share
|
2017-01-03 13:55:36 -05:00
|
|
|
= form_tag namespace_project_group_links_path(@project.namespace, @project), class: 'js-requires-input', method: :post do
|
2016-03-11 12:37:46 -05:00
|
|
|
.form-group
|
2016-04-25 09:42:17 -04:00
|
|
|
= label_tag :link_group_id, "Group", class: "label-light"
|
2016-09-01 13:23:39 -04:00
|
|
|
= groups_select_tag(:link_group_id, data: { skip_groups: @skip_groups }, required: true)
|
2016-03-11 12:37:46 -05:00
|
|
|
.form-group
|
2016-04-25 09:42:17 -04:00
|
|
|
= label_tag :link_group_access, "Max access level", class: "label-light"
|
2016-04-25 09:55:03 -04:00
|
|
|
.select-wrapper
|
|
|
|
= select_tag :link_group_access, options_for_select(ProjectGroupLink.access_options, ProjectGroupLink.default_access), class: "form-control select-control"
|
2016-08-23 12:02:52 -04:00
|
|
|
= icon('caret-down')
|
2016-08-18 17:45:41 -04:00
|
|
|
.form-group
|
|
|
|
= label_tag :expires_at, 'Access expiration date', class: 'label-light'
|
|
|
|
.clearable-input
|
2016-12-28 13:54:40 -05:00
|
|
|
= text_field_tag :expires_at, nil, class: 'form-control js-access-expiration-date-groups', placeholder: 'Select access expiration date', id: 'expires_at_groups'
|
2016-08-18 17:45:41 -04:00
|
|
|
%i.clear-icon.js-clear-input
|
2016-08-18 20:44:09 -04:00
|
|
|
.help-block
|
2016-12-28 13:54:40 -05:00
|
|
|
On this date, all members in the group will automatically lose access to this project.
|
2016-04-25 09:42:17 -04:00
|
|
|
= submit_tag "Share", class: "btn btn-create"
|
2016-04-25 11:56:17 -04:00
|
|
|
.col-lg-9.col-lg-offset-3
|
2016-04-25 09:42:17 -04:00
|
|
|
%hr
|
2016-04-25 11:56:17 -04:00
|
|
|
.col-lg-9.col-lg-offset-3.append-bottom-default.enabled-groups
|
2016-04-25 09:42:17 -04:00
|
|
|
%h5.prepend-top-0
|
|
|
|
Groups you share with (#{@group_links.size})
|
|
|
|
- if @group_links.present?
|
|
|
|
%ul.well-list
|
|
|
|
- @group_links.each do |group_link|
|
|
|
|
- group = group_link.group
|
|
|
|
%li
|
|
|
|
.pull-left.append-right-10.hidden-xs
|
|
|
|
= icon("folder-open-o", class: "settings-list-icon")
|
|
|
|
.pull-left
|
|
|
|
= link_to group do
|
2017-02-14 09:03:24 -05:00
|
|
|
= group.full_name
|
2016-04-25 09:42:17 -04:00
|
|
|
%br
|
|
|
|
up to #{group_link.human_access}
|
2016-08-18 17:45:41 -04:00
|
|
|
- if group_link.expires?
|
|
|
|
·
|
|
|
|
%span{ class: ('text-warning' if group_link.expires_soon?) }
|
|
|
|
expires in #{distance_of_time_in_words_to_now(group_link.expires_at)}
|
2016-04-25 09:42:17 -04:00
|
|
|
.pull-right
|
|
|
|
= link_to namespace_project_group_link_path(@project.namespace, @project, group_link), method: :delete, class: "btn btn-transparent" do
|
|
|
|
%span.sr-only disable sharing
|
|
|
|
= icon("trash")
|
|
|
|
- else
|
|
|
|
.settings-message.text-center
|
|
|
|
There are no groups with access to your project, add one in the form above
|