Merge pull request #1225 from Werzi2001/station_logbooks_fix_edit_errors

fixes for station log
这个提交包含在:
Peter Goodhall 2021-10-12 22:06:21 +01:00 提交者 GitHub
当前提交 8f9fad2ca4
找不到此签名对应的密钥
GPG 密钥 ID: 4AEE18F83AFDEB23
共有 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>