Show last LoTW upload as visual hint

pull/2219/head
phl0 2023-06-20 15:03:30 +02:00
rodzic bab2e1d589
commit 2994012543
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 48EA1E640798CA9A
2 zmienionych plików z 24 dodań i 1 usunięć

Wyświetl plik

@ -99,7 +99,18 @@ function echoQrbCalcLink($mygrid, $grid, $vucc) {
<?php } ?>
<td>
<a id="edit_qso" href="javascript:displayQso(<?php echo $row->COL_PRIMARY_KEY; ?>)"><?php echo str_replace("0","&Oslash;",strtoupper($row->COL_CALL)); ?></a>
<?php $timestamp = strtotime($row->lastupload); echo ($row->callsign == '' ? '' : ' <small id="lotw_info" class="badge badge-success" data-toggle="tooltip" data-original-title="LoTW User. Last upload was '.date($custom_date_format." H:i", $timestamp).'">L</small>'); ?>
<?php
$lotw_hint = '';
$diff = (time() - strtotime($row->lastupload)) / 86400;
if ($diff > 365) {
$lotw_hint = ' lotw_info_red';
} elseif ($diff > 30) {
$lotw_hint = ' lotw_info_orange';
} elseif ($diff > 7) {
$lotw_hint = ' lotw_info_yellow';
}
?>
<?php $timestamp = strtotime($row->lastupload); echo ($row->callsign == '' ? '' : ' <small id="lotw_info" class="badge badge-success'.$lotw_hint.'" data-toggle="tooltip" data-original-title="LoTW User. Last upload was '.date($custom_date_format." H:i", $timestamp).'">L</small>'); ?>
</td>
<?php

Wyświetl plik

@ -441,3 +441,15 @@ div#station_logbooks_linked_table_paginate {
#lotw_manual_results {
padding-top: 10px;
}
.lotw_info_yellow {
background-image: linear-gradient(to bottom, #3fb618, yellow);
}
.lotw_info_orange {
background-image: linear-gradient(to bottom, #3fb618, orange);
}
.lotw_info_red {
background-image: linear-gradient(to bottom, #3fb618, red);
}