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 <?php
if ($pota_all) { 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> <tr>
<td>Reference</td> <th style="text-align: center"><?php echo $this->lang->line('gen_hamradio_pota_reference') ?></th>
<td>Date/Time</td> <th style="text-align: center"><?php echo $this->lang->line('general_word_date') ?></th>
<td>Callsign</td> <th style="text-align: center"><?php echo $this->lang->line('general_word_time') ?></th>
<td>Band</td> <th style="text-align: center"><?php echo $this->lang->line('gen_hamradio_callsign') ?></th>
<td>RST Sent</td> <th style="text-align: center"><?php echo $this->lang->line('gen_hamradio_band') ?></th>
<td>RST Received</td> <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> </tr>
</thead>
<tbody>
<?php <?php
if ($pota_all->num_rows() > 0) { if ($pota_all->num_rows() > 0) {
foreach ($pota_all->result() as $row) { foreach ($pota_all->result() as $row) {
?> ?>
<tr> <tr>
<td> <td style="text-align: center"><?php echo $row->COL_POTA_REF; ?></td>
<?php echo $row->COL_POTA_REF; ?> <td style="text-align: center"><?php $timestamp = strtotime($row->COL_TIME_ON); echo date($custom_date_format, $timestamp); ?></td>
</td> <td style="text-align: center"><?php $timestamp = strtotime($row->COL_TIME_ON); echo date('H:i', $timestamp); ?></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 style="text-align: center"><?php echo $row->COL_CALL; ?></td>
<td><?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><?php echo $row->COL_BAND; ?></td> <td style="text-align: center"><?php echo $row->COL_RST_SENT; ?></td>
<td><?php echo $row->COL_RST_SENT; ?></td> <td style="text-align: center"><?php echo $row->COL_RST_RCVD; ?></td>
<td><?php echo $row->COL_RST_RCVD; ?></td>
</tr> </tr>
<?php <?php
} }
} }
?> ?>
</tbody>
</table> </table>
<?php } else { <?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>'; 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> </script>
<?php } ?> <?php } ?>
<?php if ($this->uri->segment(1) == "awards" && ($this->uri->segment(2) == "wwff") ) { <?php if ($this->uri->segment(1) == "awards") {
// Get Date format // Get Date format
if($this->session->userdata('user_date_format')) { if($this->session->userdata('user_date_format')) {
// If Logged in and session exists // 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/moment.min.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/datetime-moment.js"></script> <script type="text/javascript" src="<?php echo base_url(); ?>assets/js/datetime-moment.js"></script>
<script> <?php if ($this->uri->segment(2) == "wwff") { ?>
$.fn.dataTable.moment('<?php echo $usethisformat ?>'); <script>
$.fn.dataTable.ext.buttons.clear = { $.fn.dataTable.moment('<?php echo $usethisformat ?>');
className: 'buttons-clear', $.fn.dataTable.ext.buttons.clear = {
action: function ( e, dt, node, config ) { className: 'buttons-clear',
dt.search('').draw(); 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");
} }
}; </script>
$('#wwfftable').DataTable({ <?php } else if ($this->uri->segment(2) == "pota") { ?>
"pageLength": 25, <script>
responsive: false, $.fn.dataTable.moment('<?php echo $usethisformat ?>');
ordering: true, $.fn.dataTable.ext.buttons.clear = {
"scrollY": "500px", className: 'buttons-clear',
"scrollCollapse": true, action: function ( e, dt, node, config ) {
"paging": false, dt.search('').draw();
"scrollX": true, }
"order": [ 0, 'asc' ], };
dom: 'Bfrtip', $('#potatable').DataTable({
buttons: [ "pageLength": 25,
{ responsive: false,
extend: 'csv' ordering: true,
}, "scrollY": "500px",
{ "scrollCollapse": true,
extend: 'clear', "paging": false,
text: 'Clear' "scrollX": true,
} "order": [ 0, 'asc' ],
] dom: 'Bfrtip',
}); buttons: [
// change color of csv-button if dark mode is chosen {
if (isDarkModeTheme()) { extend: 'csv'
$('[class*="buttons"]').css("color", "white"); },
} {
</script> extend: 'clear',
text: 'Clear'
}
]
});
// change color of csv-button if dark mode is chosen
if (isDarkModeTheme()) {
$('[class*="buttons"]').css("color", "white");
}
</script>
<?php } ?>
<?php } ?> <?php } ?>
</body> </body>