summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorSean McGivern <sean@gitlab.com>2016-08-18 22:45:41 +0100
committerSean McGivern <sean@gitlab.com>2016-08-18 22:45:41 +0100
commit883b96ab6a77175d9bac7f03c325428327359cdd (patch)
tree82a9af364b06994820b975cef45d98adf3255523 /app/views
parentd2cd9d96965722cca06792c63d76d2704366d7a5 (diff)
downloadgitlab-ce-883b96ab6a77175d9bac7f03c325428327359cdd.tar.gz
Allow project group links to be expired
Diffstat (limited to 'app/views')
-rw-r--r--app/views/projects/group_links/index.html.haml9
-rw-r--r--app/views/shared/members/_member.html.haml2
2 files changed, 10 insertions, 1 deletions
diff --git a/app/views/projects/group_links/index.html.haml b/app/views/projects/group_links/index.html.haml
index 2b904544f28..7a93b87df1c 100644
--- a/app/views/projects/group_links/index.html.haml
+++ b/app/views/projects/group_links/index.html.haml
@@ -17,6 +17,11 @@
.select-wrapper
= select_tag :link_group_access, options_for_select(ProjectGroupLink.access_options, ProjectGroupLink.default_access), class: "form-control select-control"
%span.caret
+ .form-group
+ = label_tag :expires_at, 'Access expiration date', class: 'label-light'
+ .clearable-input
+ = text_field_tag :expires_at, nil, class: 'form-control js-access-expiration-date', placeholder: 'Select access expiration date'
+ %i.clear-icon.js-clear-input
= submit_tag "Share", class: "btn btn-create"
.col-lg-9.col-lg-offset-3
%hr
@@ -35,6 +40,10 @@
= group.name
%br
up to #{group_link.human_access}
+ - 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)}
.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
diff --git a/app/views/shared/members/_member.html.haml b/app/views/shared/members/_member.html.haml
index 09f53268747..5f20e4bd42a 100644
--- a/app/views/shared/members/_member.html.haml
+++ b/app/views/shared/members/_member.html.haml
@@ -61,7 +61,7 @@
Joined #{time_ago_with_tooltip(member.created_at)}
- if member.expires?
·
- %span{ class: ('text-warning' if member_expires_soon?(member)) }
+ %span{ class: ('text-warning' if member.expires_soon?) }
Expires in #{distance_of_time_in_words_to_now(member.expires_at)}
- else