From 9f422fb53a6dd1ceee33ae70e1c833ff2715e072 Mon Sep 17 00:00:00 2001 From: Manny Dinssa <44172848+Dinssa@users.noreply.github.com> Date: Tue, 17 Dec 2024 15:42:29 +0000 Subject: [PATCH] Organisations - remove action link --- app/views/organisations/show.html.erb | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/app/views/organisations/show.html.erb b/app/views/organisations/show.html.erb index 2ff37d308..56daec458 100644 --- a/app/views/organisations/show.html.erb +++ b/app/views/organisations/show.html.erb @@ -23,12 +23,16 @@ <%= summary_list.with_row do |row| %> <% row.with_key { attr[:name] } %> <% row.with_value { details_html(attr, @organisation) } %> - <% row.with_action( - text: organisation_action_text(attr, @organisation), - visually_hidden_text: attr[:name].to_s.humanize.downcase, - href: edit_organisation_path(@organisation), - html_attributes: { "data-qa": "change-#{attr[:name].downcase}" }, - ) %> + <% if attr[:value] %> + <% row.with_action( + text: organisation_action_text(attr, @organisation), + visually_hidden_text: attr[:name].to_s.humanize.downcase, + href: edit_organisation_path(@organisation), + html_attributes: { "data-qa": "change-#{attr[:name].downcase}" }, + ) %> + <% else %> + <% row.with_action %> + <% end %> <% end %> <% else %> <%= summary_list.with_row do |row| %>