Added Warning for "active station_location isn't linked" as well

This commit is contained in:
int2001
2024-08-31 18:16:50 +00:00
parent c4fa39ce5c
commit 08ec517b05
2 changed files with 15 additions and 0 deletions

View File

@@ -25,6 +25,13 @@ 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) && (!(in_array($this->stations->find_active(),$logbooks_locations_array)))) {
$data['active_not_linked']=true;
} else {
$data['active_not_linked']=false;
}
if ($logbooks_locations_array[0] == -1) {
$data['linkedCount']=0;
} else {

View File

@@ -83,6 +83,14 @@ function echo_table_col($row, $name) {
</div>
<?php } ?>
<?php if (($linkedCount > 0) && $active_not_linked) { ?>
<div class="alert alert-danger" role="alert">
<?= sprintf(
_pgettext("Dashboard Warning", "Your active Station Location isn't linked to your Logbook. Click %shere%s to do it."), '<u><a href="' . site_url('stationsetup') . '">', '</a></u>'
); ?>
</div>
<?php } ?>
<?php if ($linkedCount == 0) { ?>
<div class="alert alert-danger" role="alert">
<?= sprintf(