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() {
|
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('interface_assets/header', $data);
|
||||||
$this->load->view('gridsquares/main.php');
|
$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->select('COL_SAT_NAME, COUNT( * ) as count', FALSE);
|
||||||
$this->db->where_in('station_id', $logbooks_locations_array);
|
$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');
|
$this->db->group_by('COL_SAT_NAME');
|
||||||
$query = $this->db->get($this->config->item('table_name'));
|
$query = $this->db->get($this->config->item('table_name'));
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,11 +8,14 @@
|
||||||
<form class="form-inline">
|
<form class="form-inline">
|
||||||
<label class="my-1 mr-2" for="distplot_bands">Band Selection</label>
|
<label class="my-1 mr-2" for="distplot_bands">Band Selection</label>
|
||||||
<select class="custom-select my-1 mr-sm-2" id="distplot_bands">
|
<select class="custom-select my-1 mr-sm-2" id="distplot_bands">
|
||||||
|
<?php if (count($sats_available) != 0) { ?>
|
||||||
<option value="sat">SAT</option>
|
<option value="sat">SAT</option>
|
||||||
|
<?php } ?>
|
||||||
<?php foreach($bands_available as $band) {
|
<?php foreach($bands_available as $band) {
|
||||||
echo '<option value="' . $band . '"' . '>' . $band . '</option>'."\n";
|
echo '<option value="' . $band . '"' . '>' . $band . '</option>'."\n";
|
||||||
} ?>
|
} ?>
|
||||||
</select>
|
</select>
|
||||||
|
<?php if (count($sats_available) != 0) { ?>
|
||||||
<label class="my-1 mr-2" for="distplot_sats">Satellite</label>
|
<label class="my-1 mr-2" for="distplot_sats">Satellite</label>
|
||||||
<select class="custom-select my-1 mr-sm-2" id="distplot_sats">
|
<select class="custom-select my-1 mr-sm-2" id="distplot_sats">
|
||||||
<option value="All">All</option>
|
<option value="All">All</option>
|
||||||
|
|
@ -20,6 +23,9 @@
|
||||||
echo '<option value="' . $sat . '"' . '>' . $sat . '</option>'."\n";
|
echo '<option value="' . $sat . '"' . '>' . $sat . '</option>'."\n";
|
||||||
} ?>
|
} ?>
|
||||||
</select>
|
</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>
|
<button id="plot" type="button" name="plot" class="btn btn-primary" onclick="distPlot(this.form)">Plot</button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
google.setOnLoadCallback(drawBandChart);
|
google.setOnLoadCallback(drawBandChart);
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<?php if ($total_sat) { ?>
|
<?php if ($total_sat && $total_sat->num_rows() != 0) { ?>
|
||||||
google.setOnLoadCallback(drawSatChart);
|
google.setOnLoadCallback(drawSatChart);
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
|
|
@ -208,6 +208,7 @@
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
|
<?php if ($total_sat && $total_sat->num_rows() != 0) { ?>
|
||||||
<ul class="nav nav-tabs" id="myTab" role="tablist">
|
<ul class="nav nav-tabs" id="myTab" role="tablist">
|
||||||
<li class="nav-item">
|
<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>
|
<a class="nav-link active" id="home-tab" data-toggle="tab" href="#home" role="tab" aria-controls="home" aria-selected="true">General</a>
|
||||||
|
|
@ -216,6 +217,7 @@
|
||||||
<a class="nav-link" id="satellite-tab" data-toggle="tab" href="#satellite" role="tab" aria-controls="satellite" aria-selected="false">Satellites</a>
|
<a class="nav-link" id="satellite-tab" data-toggle="tab" href="#satellite" role="tab" aria-controls="satellite" aria-selected="false">Satellites</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
<div class="tab-content" id="myTabContent">
|
<div class="tab-content" id="myTabContent">
|
||||||
<div class="tab-pane fade show active" id="home" role="tabpanel" aria-labelledby="home-tab">
|
<div class="tab-pane fade show active" id="home" role="tabpanel" aria-labelledby="home-tab">
|
||||||
|
|
|
||||||
正在加载…
在新工单中引用