Merge pull request #1225 from Werzi2001/station_logbooks_fix_edit_errors
fixes for station log
这个提交包含在:
当前提交
8f9fad2ca4
共有 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($this->logbooks_model->relationship_exists($this->input->post('station_logbook_id'), $this->input->post('SelectedStationLocation')) != TRUE) {
|
||||||
// If no link exisits create
|
// If no link exisits create
|
||||||
$this->logbooks_model->create_logbook_location_link($this->input->post('station_logbook_id'), $this->input->post('SelectedStationLocation'));
|
$this->logbooks_model->create_logbook_location_link($this->input->post('station_logbook_id'), $this->input->post('SelectedStationLocation'));
|
||||||
echo "linked";
|
|
||||||
} else {
|
|
||||||
echo "Already Linked";
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$this->logbooks_model->edit();
|
$this->logbooks_model->edit();
|
||||||
|
|
|
||||||
|
|
@ -75,18 +75,26 @@
|
||||||
<table class="table table-hover">
|
<table class="table table-hover">
|
||||||
<thead class="thead-light">
|
<thead class="thead-light">
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="col">Location Name</th>
|
<th scope="col">Location Name</th>
|
||||||
<th scope="col"></th>
|
<th scope="col"></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|
||||||
|
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php foreach ($station_locations_linked->result() as $row) { ?>
|
<?php
|
||||||
|
if ($station_locations_linked) {
|
||||||
|
foreach ($station_locations_linked->result() as $row) {
|
||||||
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php echo $row->station_profile_name;?> (Callsign: <?php echo $row->station_callsign;?> DXCC: <?php echo $row->station_country;?>)</td>
|
<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>
|
<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>
|
</tr>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2">No linked locations</td>
|
||||||
|
</tr>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
|
||||||
正在加载…
在新工单中引用