Cloudlog/application/views/station_profile/index.php
phl0 5d6abd1fd3
Remove redundant country colum in station_profile
Squashed commit of the following:

commit 29e5f5118a1c3f8deb623e5948c3b7602241792d
Merge: 566b390d e0a04cbe
Author: phl0 <github@florian-wolters.de>
Date:   Mon Apr 24 23:28:31 2023 +0200

    Merge remote-tracking branch 'upstream/dev' into removeRedundantDxccNames

commit 566b390d8b0322b32f4438994354ce902010c0d4
Author: phl0 <github@florian-wolters.de>
Date:   Mon Apr 24 23:18:28 2023 +0200

    Refactor reassign function to use DXCC name from dxcc_entities

commit 2e50b34c1bdb9bb087e0e0d16f13c340c15588fb
Author: phl0 <github@florian-wolters.de>
Date:   Mon Apr 24 22:05:12 2023 +0200

    Use DXCC name from DXCC entities upon import

commit d2b1d895818777747db593848b855819f53ffe6d
Author: phl0 <github@florian-wolters.de>
Date:   Mon Apr 24 21:18:53 2023 +0200

    Add DB migration script

commit 0ecf4b8d9cf0253c1f818a252f7ae83722254544
Author: phl0 <github@florian-wolters.de>
Date:   Mon Apr 24 18:16:55 2023 +0200

    Fix export function for requests QSLs

commit 51d2c5c6175a8e8c69b9edd57d6f1e95c4a03600
Author: phl0 <github@florian-wolters.de>
Date:   Mon Apr 24 17:53:50 2023 +0200

    Fix webadif/qrz upload

commit 45039a6b1284d1a23f610fc70a39ef25ce720cab
Author: phl0 <github@florian-wolters.de>
Date:   Mon Apr 24 17:32:40 2023 +0200

    Fix lotw_export function

commit 1306225d027cacbe70e510fd0fc5d3ca5040c35e
Author: phl0 <github@florian-wolters.de>
Date:   Mon Apr 24 17:21:37 2023 +0200

    Fix SIG export function

commit 082798a80d8bb446500dcbadfa4912c510e4a458
Author: phl0 <github@florian-wolters.de>
Date:   Mon Apr 24 17:01:42 2023 +0200

    Fix SAT export functions

commit 2f035afaa3d3c74ca811c96c66f7bf9726b31a78
Merge: 87555f20 d6139439
Author: phl0 <github@florian-wolters.de>
Date:   Mon Apr 24 16:52:43 2023 +0200

    Merge remote-tracking branch 'upstream/dev' into removeRedundantDxccNames

commit 87555f201817fb963be117ab193d42bc03889972
Author: phl0 <github@florian-wolters.de>
Date:   Thu Apr 20 23:54:14 2023 +0200

    Use DXCC entity name from dxcc_entities in ADIF export

commit e2fd1c5eb9b7e3257ed016814719bc7f9b913587
Author: phl0 <github@florian-wolters.de>
Date:   Thu Apr 20 23:36:16 2023 +0200

    Make logbooks use DXCC name from entities table

commit 463057523dacbc34a545f0d9f720f2c29c9883a7
Author: phl0 <github@florian-wolters.de>
Date:   Thu Apr 20 23:01:58 2023 +0200

    Use DXCC name from separate table in QSO view

commit 62b8f7aed8c1dca426b055eb7af6360106fc022b
Author: phl0 <github@florian-wolters.de>
Date:   Thu Apr 20 18:21:57 2023 +0200

    Add table join to station profile lookup

commit 0afe155f46f1fcd227446166b215a98729494dc8
Author: phl0 <github@florian-wolters.de>
Date:   Thu Apr 20 18:13:35 2023 +0200

    Remove country name from edit functions

commit ecb3689a0a73f0cc9c5ca7eba5dec7df5f9fbcd1
Author: phl0 <github@florian-wolters.de>
Date:   Thu Apr 20 18:07:58 2023 +0200

    Remove station_country parameter

commit 22c350a585a3ff95d1d0b1f49dbe8ca310bdaf85
Author: phl0 <github@florian-wolters.de>
Date:   Thu Apr 20 17:59:24 2023 +0200

    Use DXCC name from dxcc_entitites table
2023-04-25 00:13:49 +02:00

106 行
4.9 KiB
PHP

<div class="container">
<br>
<?php if($this->session->flashdata('message')) { ?>
<!-- Display Message -->
<div class="alert-message error">
<p><?php echo $this->session->flashdata('message'); ?></p>
</div>
<?php } ?>
<h2><?php echo $page_title; ?></h2>
<div class="card">
<div class="card-header">
Station Locations
</div>
<div class="card-body">
<p class="card-text">Station Locations define operating locations, such as your QTH, a friend's QTH, or a portable station.</p>
<p class="card-text">Similar to logbooks, a station profile keeps a set of QSOs together.</p>
<p class="card-text">Only one station may be active at a time. In the table below this is shown with the "Active Station" badge.</p>
<p><a href="<?php echo site_url('station/create'); ?>" class="btn btn-primary"><i class="fas fa-plus"></i> Create a Station Location</a></p>
<?php if ($stations->num_rows() > 0) { ?>
<?php if($current_active == 0) { ?>
<div class="alert alert-danger" role="alert">
Attention: You need to set an active station location. Go to Callsign->Station Location to select one.
</div>
<?php } ?>
<?php if($is_there_qsos_with_no_station_id >= 1) { ?>
<div class="alert alert-danger" role="alert">
<span class="badge badge-pill badge-warning">Warning</span> Due to recent changes within Cloudlog you need to reassign QSOs to your station profiles.
Create a station profile, if you haven't already, then <a href="<?php echo site_url('station/assign_all/'); ?>" class="btn btn-danger" onclick="return confirm('Assign All QSOs to Default Station ID"><i class="fas fa-trash-alt"></i> press this button to assign all QSOs to the first Station Profile.</a>
</div>
<?php } ?>
<div class="table-responsive">
<table id="station_locations_table" class="table table-sm table-striped">
<thead>
<tr>
<th scope="col">Profile Name</th>
<th scope="col">Station Callsign</th>
<th scope="col">Country</th>
<th scope="col">Gridsquare</th>
<th></th>
<th scope="col">Edit</th>
<th scope="col">Copy</th>
<th scope="col">Empty Log</th>
<th scope="col">Delete</th>
</tr>
</thead>
<tbody>
<?php foreach ($stations->result() as $row) { ?>
<tr>
<td>
<?php echo $row->station_profile_name;?><br>
</td>
<td><?php echo $row->station_callsign;?></td>
<td><?php echo $row->station_country == '' ? '- NONE -' : $row->station_country;?></td>
<td><?php echo $row->station_gridsquare;?></td>
<td style="text-align: center" data-order="<?php echo $row->station_id;?>">
<?php if($row->station_active != 1) { ?>
<a href="<?php echo site_url('station/set_active/').$current_active."/".$row->station_id; ?>" class="btn btn-outline-secondary btn-sm" onclick="return confirm('Are you sure you want to make station <?php echo $row->station_profile_name; ?> the active station?');">Set Active</a>
<?php } else { ?>
<span class="badge badge-success">Active Station</span>
<?php } ?>
<?php if($is_there_qsos_with_no_station_id >= 1) { ?>
<a href="<?php echo site_url('station/reassign_profile/').$row->station_id; ?>" class="btn btn-outline-secondary btn-sm" onclick="return confirm('Are you sure you want to reassign QSOs to the <?php echo $row->station_profile_name; ?> profile?');">Reassign</a>
<?php } ?>
<br>
<span class="badge badge-info">ID: <?php echo $row->station_id;?></span>
<span class="badge badge-light"><?php echo $row->qso_total;?> QSOs</span>
</td>
<td>
<?php if($row->user_id == "") { ?>
<a href="<?php echo site_url('station/claim_user')."/".$row->station_id; ?>" class="btn btn-outline-primary btn-sm"><i class="fas fa-user-plus"></i> Claim Ownership</a>
<?php } ?>
<a href="<?php echo site_url('station/edit')."/".$row->station_id; ?>" title="Edit" class="btn btn-outline-primary btn-sm"><i class="fas fa-edit"></i></a>
</td>
<td>
<a href="<?php echo site_url('station/copy')."/".$row->station_id; ?>" title="Copy" class="btn btn-outline-primary btn-sm"><i class="fas fa-copy"></i></a>
</td>
<td>
<a href="<?php echo site_url('station/deletelog')."/".$row->station_id; ?>" class="btn btn-danger btn-sm" title="Empty Log" onclick="return confirm('Are you sure you want to delete all QSOs within this station profile?');"><i class="fas fa-trash-alt"></i></a></td>
</td>
<td>
<?php if($row->station_active != 1) { ?>
<a href="<?php echo site_url('station/delete')."/".$row->station_id; ?>" class="btn btn-danger btn-sm" title="Delete" onclick="return confirm('Are you sure you want delete station profile <?php echo $row->station_profile_name; ?> this will delete all QSOs within this station profile?');"><i class="fas fa-trash-alt"></i></a>
<?php } ?>
</td>
</tr>
<?php } ?>
</tbody>
<table>
</div>
<?php } ?>
</div>
</div>
</div>