Merge pull request #302 from dg9vh/dashboard

Masking QSO-Time on dashboard with **:** of not logged in
这个提交包含在:
Peter Goodhall 2019-06-23 14:59:07 +01:00 提交者 GitHub
当前提交 3c212bc8b5
找不到此签名对应的密钥
GPG 密钥 ID: 4AEE18F83AFDEB23
共有 4 个文件被更改,包括 25 次插入3 次删除

查看文件

@ -80,7 +80,7 @@ $autoload['helper'] = array('url');
| |
*/ */
$autoload['config'] = array(); $autoload['config'] = array('cloudlog');
/* /*

查看文件

@ -6,3 +6,14 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* Config file for storing fixed variables * Config file for storing fixed variables
* *
*/ */
/*
|--------------------------------------------------------------------------
| Show time on dashboard and QSO-details if not logged in
|--------------------------------------------------------------------------
|
| If you want to show QSO-times (additional to the date) on the dashboard
| and on QSO-detail-view, set this to TRUE, otherwise set it to FALSE
|
*/
$config['show_time'] = FALSE;

查看文件

@ -38,7 +38,11 @@
foreach ($last_five_qsos->result() as $row) { ?> foreach ($last_five_qsos->result() as $row) { ?>
<?php echo '<tr class="tr'.($i & 1).'">'; ?> <?php echo '<tr class="tr'.($i & 1).'">'; ?>
<td><?php $timestamp = strtotime($row->COL_TIME_ON); echo date('d/m/y', $timestamp); ?></td> <td><?php $timestamp = strtotime($row->COL_TIME_ON); echo date('d/m/y', $timestamp); ?></td>
<?php if(($this->config->item('use_auth') && ($this->session->userdata('user_type') >= 2)) || $this->config->item('use_auth') === FALSE || ($this->config->item('show_time'))) { ?>
<td><?php $timestamp = strtotime($row->COL_TIME_ON); echo date('H:i', $timestamp); ?></td> <td><?php $timestamp = strtotime($row->COL_TIME_ON); echo date('H:i', $timestamp); ?></td>
<?php } else { ?>
<td>**:**</td>
<?php } ?>
<td> <td>
<a data-fancybox data-type="iframe" data-src="<?php echo site_url('logbook/view')."/".$row->COL_PRIMARY_KEY; ?>" href="javascript:;"> <a data-fancybox data-type="iframe" data-src="<?php echo site_url('logbook/view')."/".$row->COL_PRIMARY_KEY; ?>" href="javascript:;">
<?php echo strtoupper($row->COL_CALL); ?> <?php echo strtoupper($row->COL_CALL); ?>

查看文件

@ -1,8 +1,11 @@
<?php if ($query->num_rows() > 0) { foreach ($query->result() as $row) { <?php if ($query->num_rows() > 0) { foreach ($query->result() as $row) {
?> ?>
<?php if(($this->config->item('use_auth') && ($this->session->userdata('user_type') >= 2)) || $this->config->item('use_auth') === FALSE || ($this->config->item('show_time'))) { ?>
<h4>QSO with <?php echo $row->COL_CALL; ?> on the <?php $timestamp = strtotime($row->COL_TIME_ON); echo date('d/m/y', $timestamp); $timestamp = strtotime($row->COL_TIME_ON); echo " at ".date('H:i', $timestamp); ?></h4> <h4>QSO with <?php echo $row->COL_CALL; ?> on the <?php $timestamp = strtotime($row->COL_TIME_ON); echo date('d/m/y', $timestamp); $timestamp = strtotime($row->COL_TIME_ON); echo " at ".date('H:i', $timestamp); ?></h4>
<?php } else { ?>
<h4>QSO with <?php echo $row->COL_CALL; ?> on the <?php $timestamp = strtotime($row->COL_TIME_ON); echo date('d/m/y', $timestamp); $timestamp = strtotime($row->COL_TIME_ON); echo " at **:**"?></h4>
<?php } ?>
<div class="row"> <div class="row">
<div class="col"> <div class="col">
@ -10,7 +13,11 @@
<table width="100%"> <table width="100%">
<tr> <tr>
<td>Date/Time</td> <td>Date/Time</td>
<?php if(($this->config->item('use_auth') && ($this->session->userdata('user_type') >= 2)) || $this->config->item('use_auth') === FALSE || ($this->config->item('show_time'))) { ?>
<td><?php $timestamp = strtotime($row->COL_TIME_ON); echo date('d/m/y', $timestamp); $timestamp = strtotime($row->COL_TIME_ON); echo " at ".date('H:i', $timestamp); ?></td> <td><?php $timestamp = strtotime($row->COL_TIME_ON); echo date('d/m/y', $timestamp); $timestamp = strtotime($row->COL_TIME_ON); echo " at ".date('H:i', $timestamp); ?></td>
<?php } else { ?>
<td><?php $timestamp = strtotime($row->COL_TIME_ON); echo date('d/m/y', $timestamp); $timestamp = strtotime($row->COL_TIME_ON); echo " at **:**"; ?></td>
<?php } ?>
</tr> </tr>
<tr> <tr>