This commit is contained in:
cats-shadow 2023-05-18 15:22:44 +03:00
parent 78073d2921
commit b6a5ba5f27
4 changed files with 26 additions and 13 deletions

View File

@ -13,9 +13,18 @@ class Options extends CI_Controller {
$this->load->model('user_model');
if(!$this->user_model->authorize(99)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); }
// Load language files
$this->lang->load(array(
'options',
));
}
// Default /options view just gives some text to explain the options area
function index() {
@ -24,7 +33,7 @@ class Options extends CI_Controller {
//echo $this->optionslib->get_option('theme');
$data['page_title'] = "Cloudlog Options";
$data['page_title'] = $this->lang->line('options_cloudlog_options');
$this->load->view('interface_assets/header', $data);
$this->load->view('options/index');
@ -38,8 +47,8 @@ class Options extends CI_Controller {
$directory = 'application/language';
$data['language_options'] = array_diff(scandir($directory), array('..', '.'));
$data['page_title'] = "Cloudlog Options";
$data['sub_heading'] = "Appearance";
$data['page_title'] = $this->lang->line('options_cloudlog_options');
$data['sub_heading'] = $this->lang->line('options_appearance');
$this->load->model('Themes_model');
@ -57,8 +66,8 @@ class Options extends CI_Controller {
$directory = 'application/language';
$data['language_options'] = array_diff(scandir($directory), array('..', '.'));
$data['page_title'] = "Cloudlog Options";
$data['sub_heading'] = "Appearance";
$data['page_title'] = $this->lang->line('options_cloudlog_options');
$data['sub_heading'] = $this->lang->line('options_appearance');
$this->load->helper(array('form', 'url'));
@ -79,7 +88,7 @@ class Options extends CI_Controller {
// If theme update is complete set a flashsession with a success note
if($theme_update_status == TRUE) {
$this->session->set_flashdata('success', 'Theme changed to '.$this->input->post('theme'));
$this->session->set_flashdata('success', $this->lang->line('options_theme_changed_to').$this->input->post('theme'));
}
// Update theme choice within the options system
@ -130,7 +139,7 @@ class Options extends CI_Controller {
// function used to display the /radio url
function radio() {
$data['page_title'] = "Cloudlog Options";
$data['page_title'] = $this->lang->line('options_cloudlog_options');
$data['sub_heading'] = "Radio Settings";
$this->load->view('interface_assets/header', $data);
@ -143,7 +152,7 @@ class Options extends CI_Controller {
// Get Language Options
$data['page_title'] = "Cloudlog Options";
$data['page_title'] = $this->lang->line('options_cloudlog_options');
$data['sub_heading'] = "Radio Settings";
$this->load->helper(array('form', 'url'));
@ -176,7 +185,7 @@ class Options extends CI_Controller {
// function used to display the /appearance url
function email() {
$data['page_title'] = "Cloudlog Options";
$data['page_title'] = $this->lang->line('options_cloudlog_options');
$data['sub_heading'] = "Email";
$this->load->view('interface_assets/header', $data);
@ -189,7 +198,7 @@ class Options extends CI_Controller {
// Get Language Options
$data['page_title'] = "Cloudlog Options";
$data['page_title'] = $this->lang->line('options_cloudlog_options');
$data['sub_heading'] = "Email";
$this->load->helper(array('form', 'url'));
@ -278,7 +287,7 @@ class Options extends CI_Controller {
function oqrs() {
$data['page_title'] = "Cloudlog Options";
$data['page_title'] = $this->lang->line('options_cloudlog_options');
$data['sub_heading'] = "OQRS Options";
$this->load->view('interface_assets/header', $data);
@ -288,7 +297,7 @@ class Options extends CI_Controller {
function oqrs_save() {
$data['page_title'] = "Cloudlog Options";
$data['page_title'] = $this->lang->line('options_cloudlog_options');
$data['sub_heading'] = "OQRS Options";
$this->load->helper(array('form', 'url'));

View File

@ -29,7 +29,7 @@ class Statistics extends CI_Controller {
// Render User Interface
// Set Page Title
$data['page_title'] = "Statistics";
$data['page_title'] = $this->lang->line('statistics_statistics');
$data['sat_active'] = array_search("SAT", $this->bands->get_user_bands(), true);
// Load Views

View File

@ -2,6 +2,8 @@
defined('BASEPATH') OR exit('No direct script access allowed');
$lang['statistics_statistics'] = 'Statistics';
$lang['statistics_explore_the_logbook'] = 'Explore the logbook.';
$lang['statistics_years'] = 'Years';

View File

@ -2,6 +2,8 @@
defined('BASEPATH') OR exit('No direct script access allowed');
$lang['statistics_statistics'] = 'Статистика';
$lang['statistics_explore_the_logbook'] = 'Исследуем журнал.';
$lang['statistics_years'] = 'по годам';