From e32ebe35a8cb1f36f2916d6e753accee52e80136 Mon Sep 17 00:00:00 2001 From: Andreas <6977712+AndreasK79@users.noreply.github.com> Date: Sat, 29 Apr 2023 18:44:35 +0200 Subject: [PATCH] [Map options] Added options for map on dashboard and in logbook --- application/controllers/Options.php | 16 ++++++++++++++++ application/views/dashboard/index.php | 7 ++++++- application/views/options/appearance.php | 19 +++++++++++++++++++ application/views/view_log/index.php | 4 +++- 4 files changed, 44 insertions(+), 2 deletions(-) diff --git a/application/controllers/Options.php b/application/controllers/Options.php index a35d285e..091c790c 100644 --- a/application/controllers/Options.php +++ b/application/controllers/Options.php @@ -98,6 +98,22 @@ class Options extends CI_Controller { $this->session->set_flashdata('success', 'Dashboard banner changed to '.$this->input->post('dashboardBanner')); } + // Update dashboard map within the options system + $dashboard_map_update_status = $this->optionslib->update('dashboard_map', $this->input->post('dashboardMap'), 'yes'); + + // If dashboard map update is complete set a flashsession with a success note + if($ldashboard_map_update_status == TRUE) { + $this->session->set_flashdata('success', 'Dashboard map changed to '.$this->input->post('dashboardMap')); + } + + // Update logbook map within the options system + $logbook_map_update_status = $this->optionslib->update('logbook_map', $this->input->post('logbookMap'), 'yes'); + + // If logbook map update is complete set a flashsession with a success note + if($logbook_map_update_status == TRUE) { + $this->session->set_flashdata('success', 'Logbook map changed to '.$this->input->post('logbookMap')); + } + // 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 517ecaf6..a91ed600 100644 --- a/application/views/dashboard/index.php +++ b/application/views/dashboard/index.php @@ -84,9 +84,10 @@ function echoQrbCalcLink($mygrid, $grid, $vucc) { +optionslib->get_option('dashboard_map') != "false" && $this->optionslib->get_option('dashboard_map') != "map_at_right") { ?>
- +