Skip to content

Commit

Permalink
W.I.P - Criação de tela para listagem dos logs do sistema (Ref.: #10)
Browse files Browse the repository at this point in the history
  • Loading branch information
Raul-vlb committed Jul 12, 2024
1 parent ca29859 commit 1071d61
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ function _init()
$app = App::i();
$plugin = $this;

$app->hook('template(panel.index.tabs):end', function() {
$this->part( 'blame/user-log' );
});

$app->hook('mapasculturais.run:before', function() use($app, $plugin) {
$request = new Request;
if ($plugin->config['request.enable']) {
Expand All @@ -80,6 +84,11 @@ function _init()
}
});

$app->hook('GET(panel.blame)', function() use($app) {
$this->requireAuthentication();
$this->render('blame-system', []);
});

$app->hook('API(blame.<<*>>):before', function() use($app) {
if (!$app->user->is('admin')) {
$app->halt(403, i::__('Permissao negada'));
Expand Down
8 changes: 8 additions & 0 deletions views/panel/blame-system.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php
use MapasCulturais\i;
$this->import('
blame-table
');
?>

<blame-table></blame-table>

0 comments on commit 1071d61

Please sign in to comment.