From 5301cf390069c1d48eb6485927a39ff27dac96c8 Mon Sep 17 00:00:00 2001 From: Arnaud Levy <contact@arnaudlevy.com> Date: Fri, 10 Feb 2023 14:37:44 +0100 Subject: [PATCH] namespaces --- app/controllers/admin/dashboard_controller.rb | 2 +- app/views/admin/dashboard/index.html.erb | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/controllers/admin/dashboard_controller.rb b/app/controllers/admin/dashboard_controller.rb index 1cebd3e8d..bec6f2d82 100644 --- a/app/controllers/admin/dashboard_controller.rb +++ b/app/controllers/admin/dashboard_controller.rb @@ -1,6 +1,6 @@ class Admin::DashboardController < Admin::ApplicationController def index - @chapters = [ + @namespaces = [ Education, Research, Communication, diff --git a/app/views/admin/dashboard/index.html.erb b/app/views/admin/dashboard/index.html.erb index 9c2b259fb..371d61af2 100644 --- a/app/views/admin/dashboard/index.html.erb +++ b/app/views/admin/dashboard/index.html.erb @@ -84,13 +84,13 @@ <% end %> <div class="row mt-5 pt-5"> - <% @chapters.each do |class_name| %> + <% @namespaces.each do |namespace| %> <% - path = send "admin_#{class_name.to_s.downcase}_root_path" - description = t "#{class_name.to_s.downcase}.description.text" + path = send "admin_#{namespace.to_s.downcase}_root_path" + description = t "#{namespace.to_s.downcase}.description.text" %> <div class="col-lg-3"> - <%= osuny_panel class_name.model_name.human, image: "admin/#{class_name.to_s.downcase}.jpg" do %> + <%= osuny_panel namespace.model_name.human, image: "admin/#{namespace.to_s.downcase}.jpg" do %> <p><%= description.truncate 180 %></p> <%= link_to t('show'), path, class: 'stretched-link' %> <% end %> -- GitLab