hide satellites selection if there are not satellite QSOs in
statistics distances worked gridsquares
这个提交包含在:
父节点
e044da8df0
当前提交
e344bd0a9b
共有 4 个文件被更改,包括 36 次插入 和 19 次删除
|
|
@ -17,7 +17,15 @@ class Gridsquares extends CI_Controller {
|
|||
|
||||
|
||||
public function index() {
|
||||
$data['page_title'] = "Satellite Gridsquare Map";
|
||||
// if there are no satelite QSOs redirect to band selection directly
|
||||
$this->load->model('logbook_model');
|
||||
$total_sat = $this->logbook_model->total_sat();
|
||||
if ($total_sat->num_rows() == 0) {
|
||||
redirect('gridsquares/band/2m');
|
||||
return;
|
||||
}
|
||||
|
||||
$data['page_title'] = "Gridsquare Map";
|
||||
|
||||
$this->load->view('interface_assets/header', $data);
|
||||
$this->load->view('gridsquares/main.php');
|
||||
|
|
|
|||
|
|
@ -1279,7 +1279,8 @@ class Logbook_model extends CI_Model {
|
|||
|
||||
$this->db->select('COL_SAT_NAME, COUNT( * ) as count', FALSE);
|
||||
$this->db->where_in('station_id', $logbooks_locations_array);
|
||||
$this->db->where('COL_SAT_NAME !=', 'null');
|
||||
$this->db->where('COL_SAT_NAME is not null');
|
||||
$this->db->where('COL_SAT_NAME !=', '');
|
||||
$this->db->group_by('COL_SAT_NAME');
|
||||
$query = $this->db->get($this->config->item('table_name'));
|
||||
|
||||
|
|
|
|||
|
|
@ -8,18 +8,24 @@
|
|||
<form class="form-inline">
|
||||
<label class="my-1 mr-2" for="distplot_bands">Band Selection</label>
|
||||
<select class="custom-select my-1 mr-sm-2" id="distplot_bands">
|
||||
<option value="sat">SAT</option>
|
||||
<?php if (count($sats_available) != 0) { ?>
|
||||
<option value="sat">SAT</option>
|
||||
<?php } ?>
|
||||
<?php foreach($bands_available as $band) {
|
||||
echo '<option value="' . $band . '"' . '>' . $band . '</option>'."\n";
|
||||
} ?>
|
||||
</select>
|
||||
<label class="my-1 mr-2" for="distplot_sats">Satellite</label>
|
||||
<select class="custom-select my-1 mr-sm-2" id="distplot_sats">
|
||||
<option value="All">All</option>
|
||||
<?php foreach($sats_available as $sat) {
|
||||
echo '<option value="' . $sat . '"' . '>' . $sat . '</option>'."\n";
|
||||
} ?>
|
||||
</select>
|
||||
<?php if (count($sats_available) != 0) { ?>
|
||||
<label class="my-1 mr-2" for="distplot_sats">Satellite</label>
|
||||
<select class="custom-select my-1 mr-sm-2" id="distplot_sats">
|
||||
<option value="All">All</option>
|
||||
<?php foreach($sats_available as $sat) {
|
||||
echo '<option value="' . $sat . '"' . '>' . $sat . '</option>'."\n";
|
||||
} ?>
|
||||
</select>
|
||||
<?php } else { ?>
|
||||
<input id="distplot_sats" type="hidden" value="All"></input>
|
||||
<?php } ?>
|
||||
<button id="plot" type="button" name="plot" class="btn btn-primary" onclick="distPlot(this.form)">Plot</button>
|
||||
</form>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
google.setOnLoadCallback(drawBandChart);
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($total_sat) { ?>
|
||||
<?php if ($total_sat && $total_sat->num_rows() != 0) { ?>
|
||||
google.setOnLoadCallback(drawSatChart);
|
||||
<?php } ?>
|
||||
|
||||
|
|
@ -208,14 +208,16 @@
|
|||
|
||||
<br>
|
||||
|
||||
<ul class="nav nav-tabs" id="myTab" role="tablist">
|
||||
<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>
|
||||
<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>
|
||||
</ul>
|
||||
<?php if ($total_sat && $total_sat->num_rows() != 0) { ?>
|
||||
<ul class="nav nav-tabs" id="myTab" role="tablist">
|
||||
<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>
|
||||
<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>
|
||||
</ul>
|
||||
<?php } ?>
|
||||
|
||||
<div class="tab-content" id="myTabContent">
|
||||
<div class="tab-pane fade show active" id="home" role="tabpanel" aria-labelledby="home-tab">
|
||||
|
|
|
|||
正在加载…
在新工单中引用