Insert Warning if no station is linked

This commit is contained in:
int2001
2024-08-31 13:46:04 +00:00
parent 4a26f71100
commit c4fa39ce5c
2 changed files with 13 additions and 0 deletions

View File

@@ -25,6 +25,11 @@ class Dashboard extends CI_Controller
$this->load->model('logbooks_model');
$logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
if ($logbooks_locations_array[0] == -1) {
$data['linkedCount']=0;
} else {
$data['linkedCount']=sizeof($logbooks_locations_array);
}
// Calculate Lat/Lng from Locator to use on Maps
if ($this->session->userdata('user_locator')) {
if(!$this->load->is_loaded('Qra')) {

View File

@@ -83,6 +83,14 @@ function echo_table_col($row, $name) {
</div>
<?php } ?>
<?php if ($linkedCount == 0) { ?>
<div class="alert alert-danger" role="alert">
<?= sprintf(
_pgettext("Dashboard Warning", "You have no station linked to your Logbook. Click %shere%s to do it."), '<u><a href="' . site_url('stationsetup') . '">', '</a></u>'
); ?>
</div>
<?php } ?>
<?php if($this->optionslib->get_option('dashboard_banner') != "false") { ?>
<?php if($todays_qsos >= 1) { ?>
<div class="alert alert-success" role="alert" style="margin-top: 1rem;">