Added a function to assign all QSOs to station profile number 1 and added table field into station profile for eqsl nickname
这个提交包含在:
父节点
6736777d05
当前提交
2a8f7f9272
共有 7 个文件被更改,包括 55 次插入 和 3 次删除
|
|
@ -21,7 +21,7 @@ $config['migration_enabled'] = TRUE;
|
||||||
| be upgraded / downgraded to.
|
| be upgraded / downgraded to.
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
$config['migration_version'] = 33;
|
$config['migration_version'] = 34;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,9 @@ class Dashboard extends CI_Controller {
|
||||||
} else {
|
} else {
|
||||||
$data['qra'] = "none";
|
$data['qra'] = "none";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$this->load->model('stations');
|
||||||
|
$data['current_active'] = $this->stations->find_active();
|
||||||
|
|
||||||
// Store info
|
// Store info
|
||||||
$data['todays_qsos'] = $this->logbook_model->todays_qsos();
|
$data['todays_qsos'] = $this->logbook_model->todays_qsos();
|
||||||
|
|
|
||||||
|
|
@ -78,6 +78,13 @@ class Station extends CI_Controller {
|
||||||
redirect('station');
|
redirect('station');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function assign_all() {
|
||||||
|
$this->load->model('Logbook_model');
|
||||||
|
$this->Logbook_model->update_all_station_ids();
|
||||||
|
|
||||||
|
redirect('station');
|
||||||
|
}
|
||||||
|
|
||||||
public function delete($id) {
|
public function delete($id) {
|
||||||
$this->load->model('stations');
|
$this->load->model('stations');
|
||||||
$this->stations->delete($id);
|
$this->stations->delete($id);
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,20 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||||
|
|
||||||
|
class Migration_add_eqslqthnickname_to_stationprofile extends CI_Migration {
|
||||||
|
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
$fields = array(
|
||||||
|
'eqslqthnickname varchar(255) DEFAULT NULL',
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->dbforge->add_column('station_profile', $fields);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
$this->dbforge->drop_column('station_profile', 'eqslqthnickname');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1429,8 +1429,9 @@ class Logbook_model extends CI_Model {
|
||||||
print("$count updated\n");
|
print("$count updated\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function check_for_station_id() {
|
public function check_for_station_id() {
|
||||||
$this->db->where('station_id !=', "");
|
$this->db->where('station_id =', 'NULL');
|
||||||
$query = $this->db->get($this->config->item('table_name'));
|
$query = $this->db->get($this->config->item('table_name'));
|
||||||
if($query->num_rows() >= 1) {
|
if($query->num_rows() >= 1) {
|
||||||
return 1;
|
return 1;
|
||||||
|
|
@ -1439,6 +1440,17 @@ class Logbook_model extends CI_Model {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function update_all_station_ids() {
|
||||||
|
|
||||||
|
$data = array(
|
||||||
|
'station_id' => '1',
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->db->where(array('station_id' => NULL));
|
||||||
|
return $this->db->update($this->config->item('table_name'), $data);
|
||||||
|
}
|
||||||
|
|
||||||
public function parse_frequency($frequency)
|
public function parse_frequency($frequency)
|
||||||
{
|
{
|
||||||
if (is_int($frequency))
|
if (is_int($frequency))
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,13 @@
|
||||||
<span class="badge badge-info">Important</span> <i class="fas fa-broadcast-tower"></i> You have made no QSOs today, time to turn on the radio!
|
<span class="badge badge-info">Important</span> <i class="fas fa-broadcast-tower"></i> You have made no QSOs today, time to turn on the radio!
|
||||||
</div>
|
</div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
|
<?php if($current_active == 0) { ?>
|
||||||
|
<div class="alert alert-danger" role="alert">
|
||||||
|
Attention you need to set an active station profile.
|
||||||
|
</div>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<!-- Map -->
|
<!-- Map -->
|
||||||
|
|
|
||||||
|
|
@ -24,9 +24,11 @@
|
||||||
</div>
|
</div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<?php if($is_there_qsos_with_no_station_id == 0) { ?>
|
<?php if($is_there_qsos_with_no_station_id >= 1) { ?>
|
||||||
<div class="alert alert-danger" role="alert">
|
<div class="alert alert-danger" role="alert">
|
||||||
<span class="badge badge-pill badge-warning">Warning</span> Due to recent changes within Cloudlog you need to reassign QSOs to your station profiles.
|
<span class="badge badge-pill badge-warning">Warning</span> Due to recent changes within Cloudlog you need to reassign QSOs to your station profiles.
|
||||||
|
|
||||||
|
If you haven't any station profiles, create a profile then <a href="<?php echo site_url('station/assign_all/'); ?>" class="btn btn-danger" onclick="return confirm('Assign All QSOs to Default Station ID"><i class="fas fa-trash-alt"></i> Press this Button to assign all QSOs to the the #1 station ID</a>
|
||||||
</div>
|
</div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
|
|
@ -79,6 +81,7 @@
|
||||||
<table>
|
<table>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
|
|
||||||
<p><a href="<?php echo site_url('station/create'); ?>" class="btn btn-primary"><i class="fas fa-plus"></i> Create a Station Profile</a></p>
|
<p><a href="<?php echo site_url('station/create'); ?>" class="btn btn-primary"><i class="fas fa-plus"></i> Create a Station Profile</a></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
正在加载…
在新工单中引用