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
d0aa98bc
Commit
d0aa98bc
authored
Aug 04, 2016
by
Adam Niedzielski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add Member#expires? method.
parent
28fc9088
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
app/models/member.rb
app/models/member.rb
+4
-0
app/views/shared/members/_member.html.haml
app/views/shared/members/_member.html.haml
+1
-1
No files found.
app/models/member.rb
View file @
d0aa98bc
...
@@ -125,6 +125,10 @@ class Member < ActiveRecord::Base
...
@@ -125,6 +125,10 @@ class Member < ActiveRecord::Base
invite?
||
request?
invite?
||
request?
end
end
def
expires?
expires_at
.
present?
end
def
accept_request
def
accept_request
return
false
unless
request?
return
false
unless
request?
...
...
app/views/shared/members/_member.html.haml
View file @
d0aa98bc
...
@@ -59,7 +59,7 @@
...
@@ -59,7 +59,7 @@
=
time_ago_with_tooltip
(
member
.
requested_at
)
=
time_ago_with_tooltip
(
member
.
requested_at
)
-
else
-
else
Joined
#{
time_ago_with_tooltip
(
member
.
created_at
)
}
Joined
#{
time_ago_with_tooltip
(
member
.
created_at
)
}
-
if
member
.
expires
_at
.
present
?
-
if
member
.
expires?
%span
.prepend-left-20
%span
.prepend-left-20
Access expires
#{
member
.
expires_at
.
to_s
(
:medium
)
}
Access expires
#{
member
.
expires_at
.
to_s
(
:medium
)
}
...
...
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