Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
895c3c55
Commit
895c3c55
authored
Aug 05, 2016
by
Adam Niedzielski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Better presentation of member expiration.
parent
671d247e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
app/helpers/members_helper.rb
app/helpers/members_helper.rb
+4
-0
app/views/shared/members/_member.html.haml
app/views/shared/members/_member.html.haml
+3
-2
No files found.
app/helpers/members_helper.rb
View file @
895c3c55
...
...
@@ -42,4 +42,8 @@ module MembersHelper
"Are you sure you want to leave the "
\
"
\"
#{
member_source
.
human_name
}
\"
#{
member_source
.
class
.
to_s
.
humanize
(
capitalize:
false
)
}
?"
end
def
member_expires_soon?
(
member
)
member
.
expires_at
<
7
.
days
.
from_now
end
end
app/views/shared/members/_member.html.haml
View file @
895c3c55
...
...
@@ -60,8 +60,9 @@
-
else
Joined
#{
time_ago_with_tooltip
(
member
.
created_at
)
}
-
if
member
.
expires?
%span
.prepend-left-20
Access expires
#{
member
.
expires_at
.
to_s
(
:medium
)
}
·
%span
{
class:
(
"text-warning"
if
member_expires_soon?
(
member
))
}
Expires in
#{
distance_of_time_in_words_to_now
(
member
.
expires_at
)
}
-
else
=
image_tag
avatar_icon
(
member
.
invite_email
,
40
),
class:
"avatar s40"
,
alt:
''
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment