Skip to content

Commit 894135d

Browse files
refactor(Users): Shows user's name on show/edit pages (#483)
Co-authored-by: Peter Kos <[email protected]>
1 parent bd9e804 commit 894135d

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

app/views/manage/users/edit.html.haml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
= render "layouts/manage/page_title", title: t(:title, scope: "pages.manage.users.edit", user_name: @user.full_name), subtitle: @user.full_name do
1+
= render "layouts/manage/page_title", title: @user.full_name, subtitle: t(:subtitle, scope: 'pages.manage.users.edit') do
2+
23
.btn-group
34
= link_to t(:cancel, scope: "pages.manage.users.edit"), manage_user_path(@user), class: 'btn btn-sm btn-outline-secondary'
45
= link_to t(:delete, scope: "pages.manage.users.edit"), manage_user_path(@user), method: :delete, data: { confirm: "Are you sure? #{@user.email} will be permanently deleted. This action is irreversible." }, class: 'btn btn-sm btn-outline-secondary'

app/views/manage/users/show.html.haml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
= render "layouts/manage/page_title", title: t(:title, scope: "pages.manage.users.show", user_name: @user.full_name) do
1+
= render "layouts/manage/page_title", title: @user.full_name, subtitle: t(:subtitle, scope: 'pages.manage.users.show') do
2+
23
.btn-group
34
= link_to t(:edit, scope: "pages.manage.users.show"), edit_manage_user_path(@user), class: 'btn btn-sm btn-outline-secondary'
45
= link_to t(:delete, scope: "pages.manage.users.show"), manage_user_path(@user), method: :delete, data: { confirm: "Are you sure? #{@user.email} along with their questionnaire will be permanently deleted. This action is irreversible." }, class: 'btn btn-sm btn-outline-secondary'

config/locales/en.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ en:
156156
previous_signed_in_ip: Previous signed-in IP
157157
sign_in_count: Sign-in count
158158
show:
159-
title: "%{user_name}"
159+
subtitle: "User"
160160
edit: Edit
161161
reset_password: Reset Password
162162
delete: Delete
@@ -180,8 +180,7 @@ en:
180180
sign_in_count: Sign-in count
181181
change_history: Change History
182182
edit:
183-
title: Edit User
184-
subtitle: "%{user_name}"
183+
subtitle: Edit User
185184
cancel: Cancel
186185
delete: Delete
187186
form:

0 commit comments

Comments
 (0)