Skip to content
Snippets Groups Projects
Commit 70fc0b5c authored by Olivier PEREZ's avatar Olivier PEREZ
Browse files

Logs have now a specific page in administration

parent 73a1df84
No related branches found
No related tags found
No related merge requests found
<?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';
$smarty->assign('title', _('Administration'));
$smarty->assign('logsAreReadable', is_readable('../' . LOG_FILE));
$smarty->display('admin/index.tpl');
\ No newline at end of file
<?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');
\ No newline at end of file
<?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_8_to_0_9_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('pages', ceil($count / POLLS_PER_PAGE));
$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->display('admin/polls.tpl');
......@@ -8,5 +8,10 @@
<div class="col-md-6 col-xs-12">
<a href="./migration.php"><h2>{_('Migration')}</h2></a>
</div>
{if $logsAreReadable}
<div class="col-md-6 col-xs-12">
<a href="./logs.php"><h2>{_('Logs')}</h2></a>
</div>
{/if}
</div>
{/block}
\ No newline at end of file
{extends 'admin/admin_page.tpl'}
{block 'admin_main'}
<pre>{$logs}</pre>
{/block}
\ No newline at end of file
......@@ -19,9 +19,6 @@
<div class="panel panel-default">
<div class="panel-heading">
{$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>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment