|
|
@ -53,7 +53,7 @@ |
|
|
|
<%= summary_list.with_row do |row| |
|
|
|
<%= summary_list.with_row do |row| |
|
|
|
row.with_key { "Telephone number" } |
|
|
|
row.with_key { "Telephone number" } |
|
|
|
row.with_value { user_details_html(@user, current_user, "phone") } |
|
|
|
row.with_value { user_details_html(@user, current_user, "phone") } |
|
|
|
if UserPolicy.new(current_user, @user).edit_telephone_numbers? |
|
|
|
if UserPolicy.new(current_user, @user).edit_telephone_numbers? && @user.phone.present? |
|
|
|
row.with_action( |
|
|
|
row.with_action( |
|
|
|
text: user_action_text(@user, "phone"), |
|
|
|
text: user_action_text(@user, "phone"), |
|
|
|
visually_hidden_text: "telephone number", |
|
|
|
visually_hidden_text: "telephone number", |
|
|
@ -96,7 +96,7 @@ |
|
|
|
<%= summary_list.with_row do |row| |
|
|
|
<%= summary_list.with_row do |row| |
|
|
|
row.with_key { "Role" } |
|
|
|
row.with_key { "Role" } |
|
|
|
row.with_value { user_details_html(@user, current_user, "role") } |
|
|
|
row.with_value { user_details_html(@user, current_user, "role") } |
|
|
|
if UserPolicy.new(current_user, @user).edit_roles? |
|
|
|
if UserPolicy.new(current_user, @user).edit_roles? && @user.role |
|
|
|
row.with_action( |
|
|
|
row.with_action( |
|
|
|
text: user_action_text(@user, "role"), |
|
|
|
text: user_action_text(@user, "role"), |
|
|
|
visually_hidden_text: "role", |
|
|
|
visually_hidden_text: "role", |
|
|
|