Logs have now a specific page in administration
This commit is contained in:
parent
73a1df84be
commit
70fc0b5c5c
@ -1,5 +1,24 @@
|
|||||||
<?php
|
<?php
|
||||||
|
/**
|
||||||
|
* This software is governed by the CeCILL-B license. If a copy of this license
|
||||||
|
* is not distributed with this file, you can obtain one at
|
||||||
|
* http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.txt
|
||||||
|
*
|
||||||
|
* Authors of STUdS (initial project): Guilhem BORGHESI (borghesi@unistra.fr) and Raphaël DROZ
|
||||||
|
* Authors of Framadate/OpenSondate: Framasoft (https://github.com/framasoft)
|
||||||
|
*
|
||||||
|
* =============================
|
||||||
|
*
|
||||||
|
* Ce logiciel est régi par la licence CeCILL-B. Si une copie de cette licence
|
||||||
|
* ne se trouve pas avec ce fichier vous pouvez l'obtenir sur
|
||||||
|
* http://www.cecill.info/licences/Licence_CeCILL-B_V1-fr.txt
|
||||||
|
*
|
||||||
|
* Auteurs de STUdS (projet initial) : Guilhem BORGHESI (borghesi@unistra.fr) et Raphaël DROZ
|
||||||
|
* Auteurs de Framadate/OpenSondage : Framasoft (https://github.com/framasoft)
|
||||||
|
*/
|
||||||
|
|
||||||
require_once '../app/inc/init.php';
|
require_once '../app/inc/init.php';
|
||||||
|
|
||||||
$smarty->assign('title', _('Administration'));
|
$smarty->assign('title', _('Administration'));
|
||||||
|
$smarty->assign('logsAreReadable', is_readable('../' . LOG_FILE));
|
||||||
$smarty->display('admin/index.tpl');
|
$smarty->display('admin/index.tpl');
|
28
admin/logs.php
Normal file
28
admin/logs.php
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* This software is governed by the CeCILL-B license. If a copy of this license
|
||||||
|
* is not distributed with this file, you can obtain one at
|
||||||
|
* http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.txt
|
||||||
|
*
|
||||||
|
* Authors of STUdS (initial project): Guilhem BORGHESI (borghesi@unistra.fr) and Raphaël DROZ
|
||||||
|
* Authors of Framadate/OpenSondate: Framasoft (https://github.com/framasoft)
|
||||||
|
*
|
||||||
|
* =============================
|
||||||
|
*
|
||||||
|
* Ce logiciel est régi par la licence CeCILL-B. Si une copie de cette licence
|
||||||
|
* ne se trouve pas avec ce fichier vous pouvez l'obtenir sur
|
||||||
|
* http://www.cecill.info/licences/Licence_CeCILL-B_V1-fr.txt
|
||||||
|
*
|
||||||
|
* Auteurs de STUdS (projet initial) : Guilhem BORGHESI (borghesi@unistra.fr) et Raphaël DROZ
|
||||||
|
* Auteurs de Framadate/OpenSondage : Framasoft (https://github.com/framasoft)
|
||||||
|
*/
|
||||||
|
|
||||||
|
require_once '../app/inc/init.php';
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
is_readable('../' . LOG_FILE) ? readfile('../' . LOG_FILE) : null;
|
||||||
|
$content = ob_get_clean();
|
||||||
|
|
||||||
|
$smarty->assign('title', _('Administration'));
|
||||||
|
$smarty->assign('logs', $content);
|
||||||
|
$smarty->display('admin/logs.tpl');
|
@ -1,4 +1,22 @@
|
|||||||
<?php
|
<?php
|
||||||
|
/**
|
||||||
|
* This software is governed by the CeCILL-B license. If a copy of this license
|
||||||
|
* is not distributed with this file, you can obtain one at
|
||||||
|
* http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.txt
|
||||||
|
*
|
||||||
|
* Authors of STUdS (initial project): Guilhem BORGHESI (borghesi@unistra.fr) and Raphaël DROZ
|
||||||
|
* Authors of Framadate/OpenSondate: Framasoft (https://github.com/framasoft)
|
||||||
|
*
|
||||||
|
* =============================
|
||||||
|
*
|
||||||
|
* Ce logiciel est régi par la licence CeCILL-B. Si une copie de cette licence
|
||||||
|
* ne se trouve pas avec ce fichier vous pouvez l'obtenir sur
|
||||||
|
* http://www.cecill.info/licences/Licence_CeCILL-B_V1-fr.txt
|
||||||
|
*
|
||||||
|
* Auteurs de STUdS (projet initial) : Guilhem BORGHESI (borghesi@unistra.fr) et Raphaël DROZ
|
||||||
|
* Auteurs de Framadate/OpenSondage : Framasoft (https://github.com/framasoft)
|
||||||
|
*/
|
||||||
|
|
||||||
use Framadate\Migration\From_0_0_to_0_8_Migration;
|
use Framadate\Migration\From_0_0_to_0_8_Migration;
|
||||||
use Framadate\Migration\From_0_8_to_0_9_Migration;
|
use Framadate\Migration\From_0_8_to_0_9_Migration;
|
||||||
use Framadate\Migration\From_0_9_to_0_9_1_Migration;
|
use Framadate\Migration\From_0_9_to_0_9_1_Migration;
|
||||||
|
@ -73,7 +73,6 @@ $smarty->assign('count', $count);
|
|||||||
$smarty->assign('page', $page);
|
$smarty->assign('page', $page);
|
||||||
$smarty->assign('pages', ceil($count / POLLS_PER_PAGE));
|
$smarty->assign('pages', ceil($count / POLLS_PER_PAGE));
|
||||||
$smarty->assign('poll_to_delete', $poll_to_delete);
|
$smarty->assign('poll_to_delete', $poll_to_delete);
|
||||||
$smarty->assign('log_file', is_readable('../' . LOG_FILE) ? LOG_FILE : null);
|
|
||||||
$smarty->assign('crsf', $securityService->getToken('admin'));
|
$smarty->assign('crsf', $securityService->getToken('admin'));
|
||||||
|
|
||||||
$smarty->display('admin/polls.tpl');
|
$smarty->display('admin/polls.tpl');
|
||||||
|
@ -8,5 +8,10 @@
|
|||||||
<div class="col-md-6 col-xs-12">
|
<div class="col-md-6 col-xs-12">
|
||||||
<a href="./migration.php"><h2>{_('Migration')}</h2></a>
|
<a href="./migration.php"><h2>{_('Migration')}</h2></a>
|
||||||
</div>
|
</div>
|
||||||
|
{if $logsAreReadable}
|
||||||
|
<div class="col-md-6 col-xs-12">
|
||||||
|
<a href="./logs.php"><h2>{_('Logs')}</h2></a>
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
{/block}
|
{/block}
|
5
tpl/admin/logs.tpl
Normal file
5
tpl/admin/logs.tpl
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{extends 'admin/admin_page.tpl'}
|
||||||
|
|
||||||
|
{block 'admin_main'}
|
||||||
|
<pre>{$logs}</pre>
|
||||||
|
{/block}
|
@ -19,9 +19,6 @@
|
|||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-heading">
|
<div class="panel-heading">
|
||||||
{$polls|count} {_('polls in the database at this time')}
|
{$polls|count} {_('polls in the database at this time')}
|
||||||
{if $log_file}
|
|
||||||
<a role="button" class="btn btn-default btn-xs pull-right" href="{$log_file|resource}">{_('Logs')}</a>
|
|
||||||
{/if}
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user