Brush up WWFF awards table with some candy
这个提交包含在:
父节点
8f76dba633
当前提交
afa4c0932d
共有 2 个文件被更改,包括 86 次插入 和 15 次删除
|
|
@ -4,39 +4,50 @@
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if ($wwff_all) {
|
if ($wwff_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="wwfftable" class="wwfftable 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_wwff_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 ($wwff_all->num_rows() > 0) {
|
if ($wwff_all->num_rows() > 0) {
|
||||||
foreach ($wwff_all->result() as $row) {
|
foreach ($wwff_all->result() as $row) {
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td style="text-align: center"><?php echo $row->COL_WWFF_REF; ?></td>
|
||||||
<?php echo $row->COL_WWFF_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">×</a>Nothing found!</div>';
|
echo '<div class="alert alert-danger" role="alert"><a href="#" class="close" data-dismiss="alert" aria-label="close">×</a>Nothing found!</div>';
|
||||||
|
|
|
||||||
|
|
@ -2987,5 +2987,65 @@ function deleteQsl(id) {
|
||||||
</script>
|
</script>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
|
<?php if ($this->uri->segment(1) == "awards" && ($this->uri->segment(2) == "wwff") ) {
|
||||||
|
// Get Date format
|
||||||
|
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');
|
||||||
|
}
|
||||||
|
|
||||||
|
switch ($custom_date_format) {
|
||||||
|
case 'd/m/y': $usethisformat = 'D/MM/YY';break;
|
||||||
|
case 'd/m/Y': $usethisformat = 'D/MM/YYYY';break;
|
||||||
|
case 'm/d/y': $usethisformat = 'MM/D/YY';break;
|
||||||
|
case 'm/d/Y': $usethisformat = 'MM/D/YYYY';break;
|
||||||
|
case 'd.m.Y': $usethisformat = 'D.MM.YYYY';break;
|
||||||
|
case 'y/m/d': $usethisformat = 'YY/MM/D';break;
|
||||||
|
case 'Y-m-d': $usethisformat = 'YYYY-MM-D';break;
|
||||||
|
case 'M d, Y': $usethisformat = 'MMM D, YYYY';break;
|
||||||
|
case 'M d, y': $usethisformat = 'MMM D, YY';break;
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
<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();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
$('#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>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
正在加载…
在新工单中引用