mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
[OQRS] Added option to set global text to be displayed on top of OQRS page.
This commit is contained in:
@@ -252,4 +252,32 @@ class Options extends CI_Controller {
|
||||
}
|
||||
}
|
||||
|
||||
function oqrs() {
|
||||
|
||||
$data['page_title'] = "Cloudlog Options";
|
||||
$data['sub_heading'] = "OQRS Global text";
|
||||
|
||||
$this->load->view('interface_assets/header', $data);
|
||||
$this->load->view('options/oqrs');
|
||||
$this->load->view('interface_assets/footer');
|
||||
}
|
||||
|
||||
function oqrs_save() {
|
||||
|
||||
$data['page_title'] = "Cloudlog Options";
|
||||
$data['sub_heading'] = "OQRS Global text";
|
||||
|
||||
$this->load->helper(array('form', 'url'));
|
||||
|
||||
$this->load->library('form_validation');
|
||||
|
||||
$global_oqrs_text = $this->optionslib->update('global_oqrs_text', $this->input->post('global_oqrs_text'), null);
|
||||
|
||||
if($global_oqrs_text == TRUE) {
|
||||
$this->session->set_flashdata('success', 'OQRS Global text has been saved.');
|
||||
}
|
||||
|
||||
redirect('/options/oqrs');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -21,6 +21,8 @@ class Oqrs extends CI_Controller {
|
||||
|
||||
$data['stations'] = $this->oqrs_model->get_oqrs_stations();
|
||||
$data['page_title'] = "Log Search & OQRS";
|
||||
$data['global_oqrs_text'] = $this->optionslib->get_option('global_oqrs_text');
|
||||
|
||||
|
||||
$this->load->view('visitor/layout/header', $data);
|
||||
$this->load->view('oqrs/index');
|
||||
|
||||
51
application/views/options/oqrs.php
Normal file
51
application/views/options/oqrs.php
Normal file
@@ -0,0 +1,51 @@
|
||||
<div class="container settings">
|
||||
|
||||
<div class="row">
|
||||
<!-- Nav Start -->
|
||||
<?php $this->load->view('options/sidebar') ?>
|
||||
<!-- Nav End -->
|
||||
|
||||
<!-- Content -->
|
||||
<div class="col-md-9">
|
||||
<div class="card">
|
||||
<div class="card-header"><h2><?php echo $page_title; ?> - <?php echo $sub_heading; ?></h2></div>
|
||||
|
||||
<div class="card-body">
|
||||
<?php if($this->session->flashdata('success')) { ?>
|
||||
<!-- Display Success Message -->
|
||||
<div class="alert alert-success">
|
||||
<?php echo $this->session->flashdata('success'); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if($this->session->flashdata('message')) { ?>
|
||||
<!-- Display Message -->
|
||||
<div class="alert-message error">
|
||||
<?php echo $this->session->flashdata('message'); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if(validation_errors()) { ?>
|
||||
<div class="alert alert-danger">
|
||||
<a class="close" data-dismiss="alert">x</a>
|
||||
<?php echo validation_errors(); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php echo form_open('options/oqrs_save'); ?>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="globalSearch">OQRS Global text</label>
|
||||
<p>This text is an optional text that can be displayed on top of the OQRS page.</p>
|
||||
<input type="text" name="global_oqrs_text" class="form-control" id="global_oqrs_text" aria-describedby="global_oqrs_text" value="<?php echo $this->optionslib->get_option('global_oqrs_text'); ?>">
|
||||
</div>
|
||||
|
||||
<!-- Save the Form -->
|
||||
<input class="btn btn-primary" type="submit" value="Save" />
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -4,6 +4,7 @@
|
||||
<li class="list-group-item"><a class="nav-link" href="<?php echo site_url('options/appearance'); ?>">Appearance</a></li>
|
||||
<li class="list-group-item"><a class="nav-link" href="<?php echo site_url('options/radio'); ?>">Radios</a></li>
|
||||
<li class="list-group-item"><a class="nav-link" href="<?php echo site_url('options/email'); ?>">Email</a></li>
|
||||
<li class="list-group-item"><a class="nav-link" href="<?php echo site_url('options/oqrs'); ?>">OQRS</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
@@ -12,6 +12,9 @@
|
||||
|
||||
|
||||
<?php
|
||||
if ($global_oqrs_text) {
|
||||
echo $global_oqrs_text;
|
||||
}
|
||||
echo '<div class="resulttable">';
|
||||
if ($stations->result() != NULL) { ?>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user