Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

(not complete we should discuss) there is no action type for rendering component or form as an action in page-header component

Behrokh Satarnejadfb3c6a780cb1
diff --git a/modules/storages/app/views/storages/admin/storages/edit.html.erb b/modules/storages/app/views/storages/admin/storages/edit.html.erb
index c0035698bf1..32c51675ad4 100644
--- a/modules/storages/app/views/storages/admin/storages/edit.html.erb
+++ b/modules/storages/app/views/storages/admin/storages/edit.html.erb
@@ -44,33 +44,22 @@ See COPYRIGHT and LICENSE files for more details.
<% end %>
<% end %>
- <% header.with_back_button(href: admin_settings_storages_path, 'aria-label': I18n.t("button_back")) %>
-
- <% header.with_parent_link(href: admin_settings_storages_path, 'aria-label': I18n.t("button_back")) do %>
- <%= t(:project_module_storages) %>
- <% end %>
-
- <% header.with_actions(test_selector: 'page-header-actions') do %>
- <%=
- primer_form_with(
+ <% header.with_breadcrumbs([{href: admin_index_path, text: t("label_administration")},
+ {href: admin_settings_storages_path, text: t("project_module_storages")},
+ @storage.name]) %>
+ <%= primer_form_with(
model: @storage,
url: confirm_destroy_admin_settings_storage_path(@storage),
method: :get
- ) do |_form|
- render(
- Primer::Beta::Button.new(
- scheme: :danger,
- size: :medium,
- type: :submit,
- aria: { label: I18n.t("storages.label_delete_storage") },
- test_selector: 'storage-delete-button'
- )
- ) do |button|
- button.with_leading_visual_icon(icon: :trash)
- I18n.t('button_delete')
- end
- end
- %>
+ ) do %>
+ <% header.with_action_button(mt: 2, mb: 2, data: { 'test-selector': "project-query-name"}, scheme: :danger,mobile_icon: "trash", mobile_label: I18n.t('button_delete'),
+ size: :medium,
+ type: :submit,
+ aria: { label: I18n.t("storages.label_delete_storage") },
+ test_selector: "storage-delete-button") do |button|
+ button.with_leading_visual_icon(icon: :trash)
+ I18n.t("button_delete")
+ end %>
<% end %>
<% end %>
diff --git a/modules/storages/app/views/storages/admin/storages/index.html.erb b/modules/storages/app/views/storages/admin/storages/index.html.erb
index c435a0ba87e..4601b5a0d68 100644
--- a/modules/storages/app/views/storages/admin/storages/index.html.erb
+++ b/modules/storages/app/views/storages/admin/storages/index.html.erb
@@ -10,7 +10,11 @@
<%= t("storages.page_titles.file_storages.subtitle") %>
<% end %>
- <% header.with_actions do %>
+ <% header.with_breadcrumbs(breadcrumb_paths(
+ link_to(t(:label_administration), admin_index_path),
+ default_breadcrumb
+ )) %>
+ <% header.with_action_button(mobile_icon: "star", mobile_label: "Star") do %>
<%= render(Storages::Admin::NewStorageButtonComponent.new) %>
<% end %>
<% end %>