Skip to content

Commit

Permalink
Use badges to show roles
Browse files Browse the repository at this point in the history
We only have three global roles so we can use badges which look nicer and also
remove one conditional and saves space.
  • Loading branch information
ChrisBr committed Dec 11, 2018
1 parent e6fb2f5 commit 1ead6b0
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions src/api/app/views/webui2/webui/user/_info.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@
.card-body
= webui2_user_image_tag(user, 'home-avatar')

%h4.home-usertitle.mt-4.mb-3
%h4.home-usertitle.mt-4
#home-realname
= user.realname
.mt-2#home-login
= user.login
%h4.d-inline-block#home-login
= user.login
- role_titles.each do |title|
%span.badge.badge-secondary.align-top
= title.upcase

- unless user.is_nobody?
%p
Expand All @@ -24,12 +27,6 @@
%span.badge.badge-primary
#{group.tasks} #{'task'.pluralize(group.tasks)}

- if role_titles.any?
Has the #{'role'.pluralize(role_titles.size)}
%ul
- role_titles.each do |title|
%li= title

- if is_user
- if user.in_beta?
%p
Expand Down

0 comments on commit 1ead6b0

Please sign in to comment.