You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
73 lines
2.6 KiB
73 lines
2.6 KiB
<% content_for :title, current_user == @user ? "Your account" : "#{@user.name}’s account" %> |
|
|
|
<div class="govuk-grid-row"> |
|
<div class="govuk-grid-column-two-thirds"> |
|
<h1 class="govuk-heading-l"> |
|
<%= content_for(:title) %> |
|
</h1> |
|
|
|
<h2 class="govuk-heading-m"> |
|
Personal details |
|
</h2> |
|
|
|
<%= govuk_summary_list do |summary_list| %> |
|
<%= summary_list.row do |row| |
|
row.key { 'Name' } |
|
row.value { @user.name } |
|
row.action(visually_hidden_text: 'name', href: edit_user_path, html_attributes: { 'data-qa': 'change-name' }) |
|
end %> |
|
|
|
<%= summary_list.row() do |row| |
|
row.key { 'Email address' } |
|
row.value { @user.email } |
|
row.action(visually_hidden_text: 'email address', href: edit_user_path, html_attributes: { 'data-qa': 'change-email' }) |
|
end %> |
|
|
|
<%= summary_list.row do |row| |
|
row.key { 'Password' } |
|
row.value { '••••••••' } |
|
if current_user == @user |
|
row.action(visually_hidden_text: 'password', href: password_edit_user_path, html_attributes: { 'data-qa': 'change-password' }) |
|
else |
|
row.action() |
|
end |
|
end %> |
|
|
|
<%= summary_list.row do |row| |
|
row.key { 'Organisation' } |
|
row.value { @user.organisation.name } |
|
row.action() |
|
end %> |
|
|
|
<%= summary_list.row do |row| |
|
row.key { 'Role' } |
|
row.value { @user.role.humanize } |
|
if current_user.data_coordinator? |
|
row.action(visually_hidden_text: "role", href: edit_user_path, html_attributes: { "data-qa": "role" }) |
|
else |
|
row.action() |
|
end |
|
end %> |
|
|
|
<%= summary_list.row do |row| |
|
row.key { 'Data protection officer' } |
|
row.value { @user.is_data_protection_officer? ? "Yes" : "No" } |
|
if current_user.data_coordinator? |
|
row.action(visually_hidden_text: "are #{current_user == @user ? "you" : "they"} a data protection officer?", href: edit_user_path, html_attributes: { "data-qa": "change-are-#{current_user == @user ? "you" : "they"}-a-data-protection-officer" }) |
|
else |
|
row.action() |
|
end |
|
end %> |
|
|
|
<%= summary_list.row do |row| |
|
row.key { 'Key contact' } |
|
row.value { @user.is_key_contact? ? "Yes" : "No" } |
|
if current_user.data_coordinator? |
|
row.action(visually_hidden_text: "are #{current_user == @user ? "you" : "they"} a key contact?", href: edit_user_path, html_attributes: { "data-qa": "change-are-#{current_user == @user ? "you" : "they"}-a-key-contact" }) |
|
else |
|
row.action() |
|
end |
|
end %> |
|
<% end %> |
|
</div> |
|
</div>
|
|
|