Skip to content

Commit

Permalink
Resolving menu structure for site configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyf committed Jan 8, 2024
1 parent a559908 commit f2c6b89
Showing 1 changed file with 25 additions and 48 deletions.
73 changes: 25 additions & 48 deletions app/views/hyrax/dashboard/sidebar/_configuration.html.erb
Original file line number Diff line number Diff line change
@@ -1,85 +1,62 @@
<%# OVERRIDE Hyrax v5.0.0rc2 add accoun settings and title attributes %>
<%# OVERRIDE Hyrax v5.0.0rc2 add account settings and title attributes %>
<% if menu.show_configuration? %>
<li class="h5 nav-item"><%= t('hyrax.admin.sidebar.configuration') %></li>
<% if can? :manage, Site %>
<li class="nav-item">
<%= menu.collapsable_section t('hyrax.admin.sidebar.settings'),
icon_class: "fa fa-cog",
id: 'collapseSettings',
open: menu.settings_section?,
title: t('hyrax.admin.sidebar.settings') do %>
<%= menu.nav_link(main_app.edit_admin_account_path,
class: "nav-link",
title: t('hyrax.admin.sidebar.account')) do %>
<%= menu.collapsable_section t('hyrax.admin.sidebar.settings'), icon_class: "fa fa-cog", id: 'collapseSettings', open: menu.settings_section?, title: t('hyrax.admin.sidebar.settings') do %>
<%= menu.nav_link(main_app.edit_admin_account_path, class: "nav-link", title: t('hyrax.admin.sidebar.account')) do %>
<span class="fa fa-gear"></span> <span class="sidebar-action-text"><%= t('hyrax.admin.sidebar.account') %></span>
<% end %>
<% if Flipflop.show_identity_provider_in_admin_dashboard? %>
<%= menu.nav_link(main_app.identity_providers_path, class: 'nav-link', title: t('hyrax.admin.sidebar.identity_providers') do %>
<% if Flipflop.show_identity_provider_in_admin_dashboard? %>
<%= menu.nav_link(main_app.identity_providers_path, class: 'nav-link', title: t('hyrax.admin.sidebar.identity_providers')) do %>
<span class="fa fa-key"></span> <span class="sidebar-action-text"><%= t('hyrax.admin.sidebar.identity_providers') %></span>
<% end %>
<% end %>
<%= menu.nav_link(main_app.identity_providers_path, class: "nav-link") do %>
<span class="fa fa-key"></span> <span class="sidebar-action-text"><%= t('hyrax.admin.sidebar.identity_provider') %></span>
<% end %>
<%= menu.nav_link(main_app.edit_site_labels_path,
class: "nav-link",
title: t('hyrax.admin.sidebar.labels')) do %>
<%= menu.nav_link(main_app.edit_site_labels_path, class: "nav-link", title: t('hyrax.admin.sidebar.labels')) do %>
<span class="fa fa-institution"></span> <span class="sidebar-action-text"><%= t('hyrax.admin.sidebar.labels') %></span>
<% end %>
<% if can?(:update, :appearance) %>
<%= menu.nav_link(hyrax.admin_appearance_path,
class: "nav-link",
title: t('hyrax.admin.sidebar.appearance')) do %>
<%= menu.nav_link(hyrax.admin_appearance_path, class: "nav-link", title: t('hyrax.admin.sidebar.appearance')) do %>
<span class="fa fa-paint-brush" aria-hidden="true"></span> <span class="sidebar-action-text"><%= t('hyrax.admin.sidebar.appearance') %></span>
<% end %>
<% end %>
<% if can?(:manage, :collection_types) %>
<%= menu.nav_link(hyrax.admin_collection_types_path,
class: "nav-link",
title: t('hyrax.admin.sidebar.collection_types')) do %>
<%= menu.nav_link(hyrax.admin_collection_types_path, class: "nav-link", title: t('hyrax.admin.sidebar.collection_types')) do %>
<span class="fa fa-folder-open" aria-hidden="true"></span> <span class="sidebar-action-text"><%= t('hyrax.admin.sidebar.collection_types') %></span>
<% end %>
<% end %>
<% if can?(:manage, Hyrax::Feature) %>
<%= menu.nav_link(hyrax.edit_pages_path,
class: "nav-link",
title: t('hyrax.admin.sidebar.pages')) do %>
<%= menu.nav_link(hyrax.edit_pages_path, class: "nav-link", title: t('hyrax.admin.sidebar.pages')) do %>
<span class="fa fa-file-text-o" aria-hidden="true"></span> <span class="sidebar-action-text"><%= t('hyrax.admin.sidebar.pages') %></span>
<% end %>
<%= menu.nav_link(hyrax.edit_content_blocks_path,
class: "nav-link",
title: t('hyrax.admin.sidebar.content_blocks')) do %>
<%= menu.nav_link(hyrax.edit_content_blocks_path, class: "nav-link", title: t('hyrax.admin.sidebar.content_blocks')) do %>
<span class="fa fa-square-o" aria-hidden="true"></span> <span class="sidebar-action-text"><%= t('hyrax.admin.sidebar.content_blocks') %></span>
<% end %>
<%= menu.nav_link(hyrax.admin_features_path,
class: "nav-link",
title: t('hyrax.admin.sidebar.technical')) do %>
<%= menu.nav_link(hyrax.admin_features_path, class: "nav-link", title: t('hyrax.admin.sidebar.technical')) do %>
<span class="fa fa-wrench" aria-hidden="true"></span> <span class="sidebar-action-text"><%= t('hyrax.admin.sidebar.technical') %></span>
<% end %>
<%= menu.nav_link('/admin/work_types/edit',
class: "nav-link",
title: t('hyku.admin.work_types')) do %>
<%= menu.nav_link('/admin/work_types/edit', class: "nav-link", title: t('hyku.admin.work_types')) do %>
<span class="fa fa-address-book"></span> <span class="sidebar-action-text"><%= t('hyku.admin.work_types') %></span>
<% end %>
<% end %>
<% if Flipflop.show_workflow_roles_menu_item_in_admin_dashboard_sidebar? && can?(:manage, Sipity::WorkflowResponsibility) %>
<%= menu.nav_link(hyrax.admin_workflow_roles_path, class: "nav-link", title: t('hyrax.admin.sidebar.workflow_roles')) do %>
<span class="fa fa-users" aria-hidden="true"></span> <span class="sidebar-action-text"><%= t('hyrax.admin.sidebar.workflow_roles') %></span>
<% end %>
<% end %>
<% if can?(:update, RolesService) %>
<%= menu.nav_link(main_app.admin_roles_service_jobs_path, class: "nav-link", title: t('hyrax.admin.sidebar.roles_service_jobs')) do %>
<span class="fa fa-users" aria-hidden="true"></span> <span class="sidebar-action-text"><%= t('hyrax.admin.sidebar.roles_service_jobs') %></span>
<% end %>
<% end %>
<% end %>
</li>
<% end %>
<% if Flipflop.show_workflow_roles_menu_item_in_admin_dashboard_sidebar? && can?(:manage, Sipity::WorkflowResponsibility) %>
<%= menu.nav_link(hyrax.admin_workflow_roles_path,
class: "nav-link",
title: t('hyrax.admin.sidebar.workflow_roles')) do %>
<span class="fa fa-users" aria-hidden="true"></span> <span class="sidebar-action-text"><%= t('hyrax.admin.sidebar.workflow_roles') %></span>
<% end %>
<% end %>
<%= render 'hyrax/dashboard/sidebar/menu_partials', menu: menu, section: :configuration %>
<% if can?(:update, RolesService) %>
<%= menu.nav_link(main_app.admin_roles_service_jobs_path) do %>
<span class="fa fa-users" aria-hidden="true"></span> <span class="sidebar-action-text"><%= t('hyrax.admin.sidebar.roles_service_jobs') %></span>
<% end %>
<% end %>
<% end %>

0 comments on commit f2c6b89

Please sign in to comment.