From 3f5a17db0be3d74069f10b63f63c3e6cd58c6691 Mon Sep 17 00:00:00 2001 From: phl0 Date: Thu, 27 Apr 2023 23:47:54 +0200 Subject: [PATCH] Add option to hide dashboard banner --- application/controllers/Options.php | 8 ++++++++ application/views/dashboard/index.php | 2 ++ application/views/options/appearance.php | 9 +++++++++ 3 files changed, 19 insertions(+) diff --git a/application/controllers/Options.php b/application/controllers/Options.php index fd85444a..a35d285e 100644 --- a/application/controllers/Options.php +++ b/application/controllers/Options.php @@ -90,6 +90,14 @@ class Options extends CI_Controller { $this->session->set_flashdata('success', 'Global Search changed to '.$this->input->post('globalSearch')); } + // Update dashboard banner within the options system + $dasboard_banner_update_status = $this->optionslib->update('dashboard_banner', $this->input->post('dashboardBanner'), 'yes'); + + // If dashboard banner update is complete set a flashsession with a success note + if($dasboard_banner_update_status == TRUE) { + $this->session->set_flashdata('success', 'Dashboard banner changed to '.$this->input->post('dashboardBanner')); + } + // Update Lang choice within the options system // $lang_update_status = $this->optionslib->update('language', $this->input->post('language')); diff --git a/application/views/dashboard/index.php b/application/views/dashboard/index.php index 12bf9a4a..517ecaf6 100644 --- a/application/views/dashboard/index.php +++ b/application/views/dashboard/index.php @@ -47,6 +47,7 @@ function echoQrbCalcLink($mygrid, $grid, $vucc) {
config->item('use_auth') && ($this->session->userdata('user_type') >= 2)) || $this->config->item('use_auth') === FALSE) { ?> + optionslib->get_option('dashboard_banner') != "false") { ?> = 1) { ?> + +
+ + + This allows to disable the global notification banner on the dashboard. +
+