mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
Fix code to show the active logbook
This commit is contained in:
@@ -2395,9 +2395,7 @@ class Awards extends CI_Controller {
|
||||
$this->load->model('logbooks_model');
|
||||
$this->load->model('stations');
|
||||
|
||||
// Get station profiles for multiselect
|
||||
$data['station_profile'] = $this->stations->all_of_user();
|
||||
$data['active_station_id'] = $this->session->userdata('active_station_logbook');
|
||||
$data['active_station_logbook'] = $this->logbooks_model->find_name($this->session->userdata('active_station_logbook'));
|
||||
|
||||
$this->load->model('award_pl_polska');
|
||||
$this->load->model('bands');
|
||||
|
||||
@@ -51,20 +51,9 @@
|
||||
<fieldset>
|
||||
|
||||
<div class="mb-3 row">
|
||||
<label class="col-md-2 control-label"><?= __("Station Location"); ?></label>
|
||||
<label class="col-md-2 control-label"><?= __("Station Logbook"); ?></label>
|
||||
<div class="col-md-10">
|
||||
<?php
|
||||
$active_station = null;
|
||||
foreach ($station_profile->result() as $station) {
|
||||
if ($station->station_id == $active_station_id) {
|
||||
$active_station = $station;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ($active_station) {
|
||||
echo '<span class="badge text-bg-info">' . htmlspecialchars($active_station->station_profile_name) . '</span>';
|
||||
}
|
||||
?>
|
||||
<span class="badge text-bg-info"><?= htmlspecialchars($active_station_logbook); ?></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user