added check for empty result from list_logbooks_linked
removed "echo" outputs as then the following redirect is not possible
这个提交包含在:
父节点
2d2a480fbb
当前提交
d62ab2e7d4
共有 2 个文件被更改,包括 13 次插入 和 8 次删除
|
|
@ -85,9 +85,6 @@ class Logbooks extends CI_Controller {
|
|||
if($this->logbooks_model->relationship_exists($this->input->post('station_logbook_id'), $this->input->post('SelectedStationLocation')) != TRUE) {
|
||||
// If no link exisits create
|
||||
$this->logbooks_model->create_logbook_location_link($this->input->post('station_logbook_id'), $this->input->post('SelectedStationLocation'));
|
||||
echo "linked";
|
||||
} else {
|
||||
echo "Already Linked";
|
||||
}
|
||||
} else {
|
||||
$this->logbooks_model->edit();
|
||||
|
|
|
|||
|
|
@ -75,18 +75,26 @@
|
|||
<table class="table table-hover">
|
||||
<thead class="thead-light">
|
||||
<tr>
|
||||
<th scope="col">Location Name</th>
|
||||
<th scope="col">Location Name</th>
|
||||
<th scope="col"></th>
|
||||
</tr>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
|
||||
<tbody>
|
||||
<?php foreach ($station_locations_linked->result() as $row) { ?>
|
||||
<?php
|
||||
if ($station_locations_linked) {
|
||||
foreach ($station_locations_linked->result() as $row) {
|
||||
?>
|
||||
<tr>
|
||||
<td><?php echo $row->station_profile_name;?> (Callsign: <?php echo $row->station_callsign;?> DXCC: <?php echo $row->station_country;?>)</td>
|
||||
<td><a href="<?php echo site_url('logbooks/delete_relationship/'); ?><?php echo $station_logbook_details->logbook_id; ?>/<?php echo $row->station_id;?>" class="btn btn-danger"><i class="fas fa-trash-alt"></i></a></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
} else {
|
||||
?>
|
||||
<tr>
|
||||
<td colspan="2">No linked locations</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
|
|||
正在加载…
在新工单中引用