From 06b8ab8d80b094bee0777eac278715825fe8ffc4 Mon Sep 17 00:00:00 2001 From: HB9HIL Date: Thu, 25 Jan 2024 02:39:50 +0100 Subject: [PATCH] added option to disable the github button --- application/controllers/Options.php | 10 ++++------ application/views/options/appearance.php | 9 +++++++++ application/views/visitor/layout/header.php | 20 +++++++++++--------- 3 files changed, 24 insertions(+), 15 deletions(-) diff --git a/application/controllers/Options.php b/application/controllers/Options.php index e476a7ea8..233a2644a 100644 --- a/application/controllers/Options.php +++ b/application/controllers/Options.php @@ -123,13 +123,11 @@ class Options extends CI_Controller { $this->session->set_flashdata('success', $this->lang->line('options_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')); + $public_github_button_update_status = $this->optionslib->update('public_github_button', $this->input->post('publicGithubButton'), 'yes'); - // If Lang update is complete set a flashsession with a success note - // if($lang_update_status == TRUE) { - // $this->session->set_flashdata('success', 'Language changed to '.ucfirst($this->input->post('language'))); - // } + if($public_github_button_update_status == TRUE) { + $this->session->set_flashdata('success', 'Public Github Button is now ' . $this->input->post('publicGithubButton')); + } // Redirect back to /appearance redirect('/options/appearance'); diff --git a/application/views/options/appearance.php b/application/views/options/appearance.php index 3ed938257..7f78c2bc1 100644 --- a/application/views/options/appearance.php +++ b/application/views/options/appearance.php @@ -94,6 +94,15 @@ +
+ + + This enables the button to Wavelog's Github page in the public view +
+ diff --git a/application/views/visitor/layout/header.php b/application/views/visitor/layout/header.php index cedf026b1..9e1ffe6d3 100644 --- a/application/views/visitor/layout/header.php +++ b/application/views/visitor/layout/header.php @@ -65,17 +65,19 @@ OQRS uri->segment(1) != "oqrs") { ?> - - + } ?>