Skip to content

Commit 7baf4dc

Browse files
[DPC-5081] Standardize navigation (#2904)
## 🎫 Ticket https://jira.cms.gov/browse/DPC-5081 ## 🛠 Changes Makes site navigation consistent across pages. ## ℹ️ Context Standardizing navigation across the site will allow for a more consistent user experience. ## 🧪 Validation TOS - added "return to organization list" link, removed "cancel" button <img width="1016" height="778" alt="image" src="https://github.com/user-attachments/assets/226e17ae-32cc-42d5-a92a-cf02aca1772a" /> Org detail - added "return to organization list" link <img width="988" height="785" alt="image" src="https://github.com/user-attachments/assets/55ff6c7f-26af-4d24-b84d-9535e449bfee" /> Assign CD - added "back to organization" link, removed "go back" button <img width="585" height="928" alt="image" src="https://github.com/user-attachments/assets/041de676-9aff-4831-915a-3725bdfa5c0e" /> Generate token - added "back to organization" link <img width="510" height="415" alt="image" src="https://github.com/user-attachments/assets/f4a57a96-fc57-44a4-b20d-03bc573e6e33" /> Add key - added "back to organization" link <img width="525" height="933" alt="image" src="https://github.com/user-attachments/assets/bc58f70c-6e3f-43b6-b00d-184bd13f3b07" /> Add IP - added "back to organization" link <img width="551" height="589" alt="image" src="https://github.com/user-attachments/assets/7033abb0-2a77-4cde-888d-7d9f550f6aba" /> Show token - added "back to organization" link, removed "return to portal" button <img width="615" height="547" alt="image" src="https://github.com/user-attachments/assets/4e7ff1c9-2c84-49b8-ad74-0e27e1d05a26" />
1 parent 727554d commit 7baf4dc

12 files changed

Lines changed: 12 additions & 20 deletions

File tree

dpc-portal/app/components/page/client_token/new_token_component.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div>
2-
<div class="margin-bottom-5">&larr; <%= link_to @organization.name, organization_path(organization.path_id) %></div>
2+
<div class="margin-bottom-5">&larr; <%= link_to 'Back to organization', organization_path(organization.path_id) %></div>
33
<h1>Create a new client token</h1>
44
<div>
55
<h2>New token for <%= organization.name %></h2>

dpc-portal/app/components/page/client_token/show_token_component.html.erb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div>
2-
<div class="margin-top-5 margin-bottom-5">&larr; <%= link_to organization.name, organization_path(organization, credential_start: :true) %></div>
2+
<div class="margin-top-5 margin-bottom-5">&larr; <%= link_to 'Back to organization', organization_path(organization, credential_start: :true) %></div>
33
<h1>Client token created</h1>
44
<div>
55
<h2>"<%= client_token['label'] %>" created for <%= organization.name %></h2>
@@ -12,6 +12,5 @@
1212
</p>
1313
</div>
1414
</div>
15-
<%= render(Core::Button::ButtonComponent.new(label: 'Return to portal', destination: root_url)) %>
1615
</div>
1716
</div>

dpc-portal/app/components/page/credential_delegate/new_invitation_component.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
<%= javascript_include_tag 'validation_helpers.js' %>
33
<% end %>
44

5+
<div class="margin-bottom-5">&larr; <%= link_to 'Back to organization', organization_path(organization.path_id) %></div>
56
<div>
67
<% unless cd_invite.errors[:base].empty? %>
78
<div class="usa-alert usa-alert--error margin-bottom-4">
@@ -43,7 +44,6 @@
4344
attribute: :invited_email_confirmation,
4445
error_msg: cd_invite.errors[:invited_email_confirmation]&.first,
4546
default: cd_invite.invited_email_confirmation)) %>
46-
<%= link_to 'Go Back', organization_path(organization.path_id), class: ['usa-button', 'usa-button--outline'] %>
4747
<%= submit_tag('Send invite', class: "usa-button") %>
4848
<% end %>
4949
<a id="modal-opener" href="#verify-modal" aria-controls="verify-modal" class="display-none" data-open-modal>Send invite</a>

dpc-portal/app/components/page/ip_address/new_address_component.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div>
2-
<div class="margin-bottom-5">&larr; <%= link_to @organization.name, organization_path(organization.path_id) %></div>
2+
<div class="margin-bottom-5">&larr; <%= link_to 'Back to organization', organization_path(organization.path_id) %></div>
33
<h1>Add public IP address</h1>
44

55
<section class="box">

dpc-portal/app/components/page/organization/compound_show_component.html.erb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
<div class="margin-bottom-5">&larr; <%= link_to 'Return to organization list', organizations_path %></div>
12
<div>
23
<h1><%= @organization.name %></h1>
34
<div class="margin-bottom-3 display-flex flex-row flex-start" style="gap:20px;">

dpc-portal/app/components/page/organization/tos_form_component.html.erb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
<div class="margin-bottom-5">&larr; <%= link_to 'Return to organization list', organizations_path %></div>
12
<div>
23
<h1>Add new organization</h1>
34
<h2>Sign Terms of Service</h2>
@@ -12,9 +13,6 @@
1213
<li class="usa-button-group__item">
1314
<%= button_to 'I have read and accepted the Terms of Service', sign_tos_organization_path(@organization), class: 'usa-button' %>
1415
</li>
15-
<li class="usa-button-group__item">
16-
<%= button_to 'Cancel', organizations_path, class: ['usa-button', 'usa-button--unstyled', 'padding-105', 'text-center'], method: :get %>
17-
</li>
1816
</ul>
1917
</div>
2018
</div>

dpc-portal/app/components/page/public_key/new_key_component.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div>
2-
<div class="margin-bottom-5">&larr; <%= link_to @organization.name, organization_path(organization.path_id) %></div>
2+
<div class="margin-bottom-5">&larr; <%= link_to 'Back to organization', organization_path(organization.path_id) %></div>
33
<h1>Add public key</h1>
44

55
<section class="box">

dpc-portal/spec/components/page/client_token/new_token_component_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
let(:expected_html) do
1717
<<~HTML
1818
<div>
19-
<div class="margin-bottom-5"><a href="/portal/organizations/#{org.path_id}">#{org.name}</a></div>
19+
<div class="margin-bottom-5"><a href="/portal/organizations/#{org.path_id}">Back to organization</a></div>
2020
<h1>Create a new client token</h1>
2121
<div>
2222
<h2>New token for #{org.name}</h2>

dpc-portal/spec/components/page/client_token/show_token_component_spec.rb

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
let(:expected_html) do
1717
<<~HTML
1818
<div>
19-
<div class="margin-top-5 margin-bottom-5"><a href="/portal/organizations/#{org.path_id}?credential_start=true">#{org.name}</a></div>
19+
<div class="margin-top-5 margin-bottom-5"><a href="/portal/organizations/#{org.path_id}?credential_start=true">Back to organization</a></div>
2020
<h1>Client token created</h1>
2121
<div>
2222
<h2>"Your token" created for #{org.name}</h2>
@@ -34,9 +34,6 @@
3434
</p>
3535
</div>
3636
</div>
37-
<form class="button_to" method="get" action="http://test.host/portal/">
38-
<button class="usa-button" type="submit">Return to portal</button>
39-
</form>
4037
</div>
4138
</div>
4239
HTML

dpc-portal/spec/components/page/ip_address/new_address_component_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
let(:expected_html) do
1818
<<~HTML
1919
<div>
20-
<div class="margin-bottom-5"><a href="/portal/organizations/#{org.path_id}">#{org.name}</a></div>
20+
<div class="margin-bottom-5"><a href="/portal/organizations/#{org.path_id}">Back to organization</a></div>
2121
<h1>Add public IP address</h1>
2222
<section class="box">
2323
<div>

0 commit comments

Comments
 (0)