Hide SAT stuff if SAT band is disabled
这个提交包含在:
父节点
40b5746e48
当前提交
6bfdd8a3d5
共有 8 个文件被更改,包括 17 次插入 和 2 次删除
|
|
@ -19,6 +19,7 @@ class Activated_grids extends CI_Controller {
|
|||
public function index() {
|
||||
// if there are no satellite QSOs redirect to band selection directly
|
||||
$this->load->model('logbook_model');
|
||||
$this->load->model('bands');
|
||||
$total_sat = $this->logbook_model->total_sat();
|
||||
if ($total_sat->num_rows() == 0) {
|
||||
redirect('activated_grids/band/2m');
|
||||
|
|
@ -26,6 +27,7 @@ class Activated_grids extends CI_Controller {
|
|||
}
|
||||
|
||||
$data['page_title'] = "Activated Gridsquare Map";
|
||||
$data['sat_active'] = array_search("SAT", $this->bands->get_user_bands(), true);
|
||||
|
||||
$this->load->view('interface_assets/header', $data);
|
||||
$this->load->view('activated_grids/main.php');
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ class Gridsquares extends CI_Controller {
|
|||
public function index() {
|
||||
// if there are no satellite QSOs redirect to band selection directly
|
||||
$this->load->model('logbook_model');
|
||||
$this->load->model('bands');
|
||||
$total_sat = $this->logbook_model->total_sat();
|
||||
if ($total_sat->num_rows() == 0) {
|
||||
redirect('gridsquares/band/2m');
|
||||
|
|
@ -26,6 +27,7 @@ class Gridsquares extends CI_Controller {
|
|||
}
|
||||
|
||||
$data['page_title'] = "Gridsquare Map";
|
||||
$data['sat_active'] = array_search("SAT", $this->bands->get_user_bands(), true);
|
||||
|
||||
$this->load->view('interface_assets/header', $data);
|
||||
$this->load->view('gridsquares/main.php');
|
||||
|
|
|
|||
|
|
@ -37,7 +37,8 @@ class QSO extends CI_Controller {
|
|||
$data['dxcc'] = $this->logbook_model->fetchDxcc();
|
||||
$data['iota'] = $this->logbook_model->fetchIota();
|
||||
$data['modes'] = $this->modes->active();
|
||||
$data['bands'] = $this->bands->get_user_bands_for_qso_entry();
|
||||
$data['bands'] = $this->bands->get_user_bands_for_qso_entry();
|
||||
$data['sat_active'] = array_search("SAT", $this->bands->get_user_bands(), true);
|
||||
|
||||
$this->load->library('form_validation');
|
||||
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ class Statistics extends CI_Controller {
|
|||
public function index()
|
||||
{
|
||||
$this->load->model('user_model');
|
||||
$this->load->model('bands');
|
||||
if(!$this->user_model->authorize($this->config->item('auth_mode'))) {
|
||||
if($this->user_model->validate_session()) {
|
||||
$this->user_model->clear_session();
|
||||
|
|
@ -17,6 +18,7 @@ class Statistics extends CI_Controller {
|
|||
|
||||
// Set Page Title
|
||||
$data['page_title'] = "Statistics";
|
||||
$data['sat_active'] = array_search("SAT", $this->bands->get_user_bands(), true);
|
||||
|
||||
// Load Views
|
||||
$this->load->view('interface_assets/header', $data);
|
||||
|
|
|
|||
|
|
@ -12,7 +12,9 @@
|
|||
<h2><?php echo $page_title; ?></h2>
|
||||
|
||||
<nav class="nav">
|
||||
<?php if ($sat_active) { ?>
|
||||
<a class="nav-link" href="<?php echo site_url('activated_grids/satellites'); ?>">Satellites</a>
|
||||
<?php } ?>
|
||||
<a class="nav-link" href="<?php echo site_url('activated_grids/band/2m'); ?>">Band</a>
|
||||
</nav>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -12,7 +12,9 @@
|
|||
<h2><?php echo $page_title; ?></h2>
|
||||
|
||||
<nav class="nav">
|
||||
<?php if ($sat_active) { ?>
|
||||
<a class="nav-link" href="<?php echo site_url('gridsquares/satellites'); ?>">Satellites</a>
|
||||
<?php } ?>
|
||||
<a class="nav-link" href="<?php echo site_url('gridsquares/band/2m'); ?>">Band</a>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -21,9 +21,11 @@
|
|||
<a class="nav-link" id="general-tab" data-toggle="tab" href="#general" role="tab" aria-controls="general" aria-selected="false"><?php echo $this->lang->line('general_word_general'); ?></a>
|
||||
</li>
|
||||
|
||||
<?php if ($sat_active) { ?>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" id="satellite-tab" data-toggle="tab" href="#satellite" role="tab" aria-controls="satellite" aria-selected="false"><?php echo $this->lang->line('general_word_satellite_short'); ?></a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" id="notes-tab" data-toggle="tab" href="#nav-notes" role="tab" aria-controls="notes" aria-selected="false"><?php echo $this->lang->line('general_word_notes'); ?></a>
|
||||
|
|
|
|||
|
|
@ -20,9 +20,11 @@
|
|||
<li class="nav-item">
|
||||
<a class="nav-link active" id="home-tab" data-toggle="tab" href="#home" role="tab" aria-controls="home" aria-selected="true">General</a>
|
||||
</li>
|
||||
<?php if ($sat_active) { ?>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" id="satellite-tab" data-toggle="tab" href="#satellite" role="tab" aria-controls="satellite" aria-selected="false">Satellites</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
正在加载…
在新工单中引用