Add eye candy to POTA awards table

这个提交包含在:
phl0 2022-11-30 17:17:19 +01:00
父节点 71fbd4ad9b
当前提交 dfb9e8a9bb
找不到此签名对应的密钥
GPG 密钥 ID: 48EA1E640798CA9A
共有 2 个文件被更改,包括 95 次插入48 次删除

查看文件

@ -4,39 +4,50 @@
<?php
if ($pota_all) {
if($this->session->userdata('user_date_format')) {
// If Logged in and session exists
$custom_date_format = $this->session->userdata('user_date_format');
} else {
// Get Default date format from /config/cloudlog.php
$custom_date_format = $this->config->item('qso_date_format');
}
?>
<table class="table table-sm table-striped table-hover">
<table style="width: 100%" id="potatable" class="potatable table table-sm table-striped table-hover">
<thead>
<tr>
<td>Reference</td>
<td>Date/Time</td>
<td>Callsign</td>
<td>Band</td>
<td>RST Sent</td>
<td>RST Received</td>
<th style="text-align: center"><?php echo $this->lang->line('gen_hamradio_pota_reference') ?></th>
<th style="text-align: center"><?php echo $this->lang->line('general_word_date') ?></th>
<th style="text-align: center"><?php echo $this->lang->line('general_word_time') ?></th>
<th style="text-align: center"><?php echo $this->lang->line('gen_hamradio_callsign') ?></th>
<th style="text-align: center"><?php echo $this->lang->line('gen_hamradio_band') ?></th>
<th style="text-align: center"><?php echo $this->lang->line('gen_hamradio_rsts') ?></th>
<th style="text-align: center"><?php echo $this->lang->line('gen_hamradio_rstr') ?></th>
</tr>
</thead>
<tbody>
<?php
if ($pota_all->num_rows() > 0) {
foreach ($pota_all->result() as $row) {
?>
<tr>
<td>
<?php echo $row->COL_POTA_REF; ?>
</td>
<td><?php $timestamp = strtotime($row->COL_TIME_ON); echo date('d/m/y', $timestamp); ?> - <?php $timestamp = strtotime($row->COL_TIME_ON); echo date('H:i', $timestamp); ?></td>
<td><?php echo $row->COL_CALL; ?></td>
<td><?php echo $row->COL_BAND; ?></td>
<td><?php echo $row->COL_RST_SENT; ?></td>
<td><?php echo $row->COL_RST_RCVD; ?></td>
<td style="text-align: center"><?php echo $row->COL_POTA_REF; ?></td>
<td style="text-align: center"><?php $timestamp = strtotime($row->COL_TIME_ON); echo date($custom_date_format, $timestamp); ?></td>
<td style="text-align: center"><?php $timestamp = strtotime($row->COL_TIME_ON); echo date('H:i', $timestamp); ?></td>
<td style="text-align: center"><?php echo $row->COL_CALL; ?></td>
<td style="text-align: center"><?php if($row->COL_SAT_NAME != null) { echo $row->COL_SAT_NAME; } else { echo $row->COL_BAND; } ?></td>
<td style="text-align: center"><?php echo $row->COL_RST_SENT; ?></td>
<td style="text-align: center"><?php echo $row->COL_RST_RCVD; ?></td>
</tr>
<?php
}
}
?>
</tbody>
</table>
<?php } else {
echo '<div class="alert alert-danger" role="alert"><a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>Nothing found!</div>';

查看文件

@ -3063,7 +3063,7 @@ function deleteQsl(id) {
</script>
<?php } ?>
<?php if ($this->uri->segment(1) == "awards" && ($this->uri->segment(2) == "wwff") ) {
<?php if ($this->uri->segment(1) == "awards") {
// Get Date format
if($this->session->userdata('user_date_format')) {
// If Logged in and session exists
@ -3088,39 +3088,75 @@ function deleteQsl(id) {
?>
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/moment.min.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/datetime-moment.js"></script>
<script>
$.fn.dataTable.moment('<?php echo $usethisformat ?>');
$.fn.dataTable.ext.buttons.clear = {
className: 'buttons-clear',
action: function ( e, dt, node, config ) {
dt.search('').draw();
<?php if ($this->uri->segment(2) == "wwff") { ?>
<script>
$.fn.dataTable.moment('<?php echo $usethisformat ?>');
$.fn.dataTable.ext.buttons.clear = {
className: 'buttons-clear',
action: function ( e, dt, node, config ) {
dt.search('').draw();
}
};
$('#wwfftable').DataTable({
"pageLength": 25,
responsive: false,
ordering: true,
"scrollY": "500px",
"scrollCollapse": true,
"paging": false,
"scrollX": true,
"order": [ 0, 'asc' ],
dom: 'Bfrtip',
buttons: [
{
extend: 'csv'
},
{
extend: 'clear',
text: 'Clear'
}
]
});
// change color of csv-button if dark mode is chosen
if (isDarkModeTheme()) {
$('[class*="buttons"]').css("color", "white");
}
};
$('#wwfftable').DataTable({
"pageLength": 25,
responsive: false,
ordering: true,
"scrollY": "500px",
"scrollCollapse": true,
"paging": false,
"scrollX": true,
"order": [ 0, 'asc' ],
dom: 'Bfrtip',
buttons: [
{
extend: 'csv'
},
{
extend: 'clear',
text: 'Clear'
}
]
});
// change color of csv-button if dark mode is chosen
if (isDarkModeTheme()) {
$('[class*="buttons"]').css("color", "white");
}
</script>
</script>
<?php } else if ($this->uri->segment(2) == "pota") { ?>
<script>
$.fn.dataTable.moment('<?php echo $usethisformat ?>');
$.fn.dataTable.ext.buttons.clear = {
className: 'buttons-clear',
action: function ( e, dt, node, config ) {
dt.search('').draw();
}
};
$('#potatable').DataTable({
"pageLength": 25,
responsive: false,
ordering: true,
"scrollY": "500px",
"scrollCollapse": true,
"paging": false,
"scrollX": true,
"order": [ 0, 'asc' ],
dom: 'Bfrtip',
buttons: [
{
extend: 'csv'
},
{
extend: 'clear',
text: 'Clear'
}
]
});
// change color of csv-button if dark mode is chosen
if (isDarkModeTheme()) {
$('[class*="buttons"]').css("color", "white");
}
</script>
<?php } ?>
<?php } ?>
</body>