Merge pull request #2231 from phl0/fixEmptyQo100DxClubUpload
Add error message for no outstanding QO-100 QSOs
这个提交包含在:
当前提交
d259ebae36
共有 2 个文件被更改,包括 24 次插入 和 9 次删除
|
|
@ -372,14 +372,14 @@ class Stations extends CI_Model {
|
||||||
$sql="
|
$sql="
|
||||||
SELECT station_profile.station_id, station_profile.station_profile_name, station_profile.station_callsign, notc.c notcount, totc.c totcount
|
SELECT station_profile.station_id, station_profile.station_profile_name, station_profile.station_callsign, notc.c notcount, totc.c totcount
|
||||||
FROM station_profile
|
FROM station_profile
|
||||||
INNER JOIN (
|
LEFT OUTER JOIN (
|
||||||
SELECT qsos.station_id, COUNT(qsos.COL_PRIMARY_KEY) c
|
SELECT qsos.station_id, COUNT(qsos.COL_PRIMARY_KEY) c
|
||||||
FROM %s qsos
|
FROM %s qsos
|
||||||
LEFT JOIN webadif ON qsos.COL_PRIMARY_KEY = webadif.qso_id
|
LEFT JOIN webadif ON qsos.COL_PRIMARY_KEY = webadif.qso_id
|
||||||
WHERE webadif.qso_id IS NULL AND qsos.COL_SAT_NAME = 'QO-100'
|
WHERE webadif.qso_id IS NULL AND qsos.COL_SAT_NAME = 'QO-100'
|
||||||
GROUP BY qsos.station_id
|
GROUP BY qsos.station_id
|
||||||
) notc ON station_profile.station_id = notc.station_id
|
) notc ON station_profile.station_id = notc.station_id
|
||||||
INNER JOIN (
|
LEFT JOIN (
|
||||||
SELECT qsos.station_id, COUNT(qsos.COL_PRIMARY_KEY) c
|
SELECT qsos.station_id, COUNT(qsos.COL_PRIMARY_KEY) c
|
||||||
FROM %s qsos
|
FROM %s qsos
|
||||||
WHERE qsos.COL_SAT_NAME = 'QO-100'
|
WHERE qsos.COL_SAT_NAME = 'QO-100'
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,11 @@
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if ($station_profile->result()) {
|
if ($station_profile->result()) {
|
||||||
|
$queuedqsos = 0;
|
||||||
|
foreach ($station_profile->result() as $count) { // Fills the table with the data
|
||||||
|
$queuedqsos += $count->notcount;
|
||||||
|
}
|
||||||
|
if ($queuedqsos > 0) {
|
||||||
?>
|
?>
|
||||||
<p>You need to set a QO-100 Dx Club API key in your station profile. Only station profiles with an API Key are displayed.</p>
|
<p>You need to set a QO-100 Dx Club API key in your station profile. Only station profiles with an API Key are displayed.</p>
|
||||||
<p><span class="badge badge-warning">Warning</span> This might take a while as QSO uploads are processed sequentially.</p>
|
<p><span class="badge badge-warning">Warning</span> This might take a while as QSO uploads are processed sequentially.</p>
|
||||||
|
|
@ -41,15 +46,25 @@
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>';
|
<tbody>';
|
||||||
foreach ($station_profile->result() as $station) { // Fills the table with the data
|
foreach ($station_profile->result() as $station) { // Fills the table with the data
|
||||||
echo '<tr>';
|
if ($station->notcount != null) {
|
||||||
echo '<td>' . $station->station_profile_name . '</td>';
|
echo '<tr>';
|
||||||
echo '<td>' . $station->station_callsign . '</td>';
|
echo '<td>' . $station->station_profile_name . '</td>';
|
||||||
echo '<td id ="notcount'.$station->station_id.'">' . $station->notcount . '</td>';
|
echo '<td>' . $station->station_callsign . '</td>';
|
||||||
echo '<td id ="totcount'.$station->station_id.'">' . $station->totcount . '</td>';
|
echo '<td id ="notcount'.$station->station_id.'">' . $station->notcount . '</td>';
|
||||||
echo '<td><button id="webadifUpload" type="button" name="webadifUpload" class="btn btn-primary btn-sm ld-ext-right" onclick="ExportWebADIF('. $station->station_id .')"><i class="fas fa-cloud-upload-alt"></i> Upload<div class="ld ld-ring ld-spin"></div></button></td>';
|
echo '<td id ="totcount'.$station->station_id.'">' . $station->totcount . '</td>';
|
||||||
echo '</tr>';
|
echo '<td><button id="webadifUpload" type="button" name="webadifUpload" class="btn btn-primary btn-sm ld-ext-right" onclick="ExportWebADIF('. $station->station_id .')"><i class="fas fa-cloud-upload-alt"></i> Upload<div class="ld ld-ring ld-spin"></div></button></td>';
|
||||||
|
echo '</tr>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
echo '</tfoot></table>';
|
echo '</tfoot></table>';
|
||||||
|
} else {
|
||||||
|
?>
|
||||||
|
<div class="alert alert-success">
|
||||||
|
There are currently no outstanding QSOs that need to be uploaded to the QO-100 Dx Club's API.<br />
|
||||||
|
Go ahead and turn on your QO-100 station!
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
|
||||||
正在加载…
在新工单中引用