Skip to content

Commit

Permalink
Merge pull request #15683 from saraycp/badge_for_user_state
Browse files Browse the repository at this point in the history
Badge for user state
  • Loading branch information
saraycp authored Feb 26, 2024
2 parents 3dc0c37 + 9d98489 commit 6560440
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/api/app/views/webui/user/_basic_info.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
locals: { displayed_user: user, role_titles: role_titles, account_edit_link: account_edit_link }

.basic-info
.d-flex.flex-row-reverse
.d-flex.flex-row-reverse.mb-3
= render ReportsNoticeComponent.new(reportable: user, user: User.session)
- if policy(Report.new(reportable: user)).create?
= link_to('#', id: "js-user-#{user.id}", class: 'ps-2',
Expand All @@ -29,18 +29,17 @@
= link_to('javascript:void(0);', id: 'toggle-in-place-editing', remote: true, title: 'Edit Your Account') do
%i.fas.fa-user-edit
%span.nav-item-name Edit
.row.mb-3.mb-md-0
.row.mb-3
.col-4.col-sm-2.col-md-12.text-center
= render(AvatarComponent.new(name: user.name, email: user.email, size: 200))
.col-8.col-sm-10.col-md-12.ps-0.p-md-3
- if User.possibly_nobody.is_admin? && user.state != 'confirmed'
.border.rounded-2.my-2.px-1
= user.state.camelcase
.col-8.col-sm-10.col-md-12
%h4#home-realname
= user.realname
%h5.text-reset#home-login
= user.login
- if User.possibly_nobody.is_admin?
.text-reset
State:
= user.state

- role_titles.each do |title|
%span.badge.text-bg-secondary
Expand Down

0 comments on commit 6560440

Please sign in to comment.