From 517959a3db4d479c7b55edca74789b98bc1e909a Mon Sep 17 00:00:00 2001 From: Arnaud Levy <contact@arnaudlevy.com> Date: Tue, 28 Jun 2022 12:40:00 +0200 Subject: [PATCH] icon --- app/services/icon.rb | 2 ++ config/admin_navigation.rb | 4 +++- config/server_navigation.rb | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/services/icon.rb b/app/services/icon.rb index 33f2b76bc..54cdb9079 100644 --- a/app/services/icon.rb +++ b/app/services/icon.rb @@ -1,5 +1,7 @@ # used in menu items and in admin navigation class Icon + DASHBOARD = 'tachometer-alt' + COMMUNICATION_EXTRANET = 'project-diagram' COMMUNICATION_WEBSITE = 'sitemap' COMMUNICATION_WEBSITE_POST = 'newspaper' diff --git a/config/admin_navigation.rb b/config/admin_navigation.rb index 93d2c3970..9d1b22980 100644 --- a/config/admin_navigation.rb +++ b/config/admin_navigation.rb @@ -4,7 +4,9 @@ SimpleNavigation::Configuration.run do |navigation| navigation.highlight_on_subpath = true navigation.selected_class = 'active' navigation.items do |primary| - primary.item :dashboard, t('admin.dashboard'), admin_root_path, { icon: 'tachometer-alt', highlights_on: /admin$/ } + primary.item :dashboard, t('admin.dashboard'), + admin_root_path, + { icon: Icon::DASHBOARD, highlights_on: /admin$/ } if can?(:read, University::Person) || can?(:read, University::Organization) primary.item :university, diff --git a/config/server_navigation.rb b/config/server_navigation.rb index 06113b460..5aca9b137 100644 --- a/config/server_navigation.rb +++ b/config/server_navigation.rb @@ -7,7 +7,7 @@ SimpleNavigation::Configuration.run do |navigation| primary.item :dashboard, t('dashboard'), server_root_path, - { icon: 'tachometer-alt', highlights_on: %r{server$} } + { icon: Icon::DASHBOARD, highlights_on: %r{server$} } primary.item :universities, University.model_name.human(count: 2), server_universities_path, { icon: 'university' } if can?(:read, University) -- GitLab