Commit 895c3c55 authored by Adam Niedzielski's avatar Adam Niedzielski

Better presentation of member expiration.

parent 671d247e
...@@ -42,4 +42,8 @@ module MembersHelper ...@@ -42,4 +42,8 @@ module MembersHelper
"Are you sure you want to leave the " \ "Are you sure you want to leave the " \
"\"#{member_source.human_name}\" #{member_source.class.to_s.humanize(capitalize: false)}?" "\"#{member_source.human_name}\" #{member_source.class.to_s.humanize(capitalize: false)}?"
end end
def member_expires_soon?(member)
member.expires_at < 7.days.from_now
end
end end
...@@ -60,8 +60,9 @@ ...@@ -60,8 +60,9 @@
- else - else
Joined #{time_ago_with_tooltip(member.created_at)} Joined #{time_ago_with_tooltip(member.created_at)}
- if member.expires? - 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 - else
= image_tag avatar_icon(member.invite_email, 40), class: "avatar s40", alt: '' = image_tag avatar_icon(member.invite_email, 40), class: "avatar s40", alt: ''
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment