FEATURE: add filter to action log

This commit is contained in:
Michal Kváček
2016-09-27 23:24:03 +02:00
parent 9039334138
commit 60c3582947
8 changed files with 71 additions and 32 deletions
+1
View File
@@ -7,6 +7,7 @@ return [
"deleteContent" => 'Smazána stránka ":title", url "url a ID #:id. Tato změna je zaznamenána v revizi :revision.',
"deleteCustomField" => "a",
"deleteWidgetArea" => "Smazal plochu pro widget :name",
"displayingUsersActions" => "Zobrazuji všechny akce od uživatele :name (:email).",
"draftFromContent" => "Upraven widget :name (#:id)",
"editContent" => 'Editace stránky - nový titulek je ":title", url :url a ID #:id. Revize změny: :revision.',
"editCustomField" => "a",
@@ -7,6 +7,7 @@ return [
"editUser" => "Editace uživatele :name (:email)",
"email" => "E-mail",
"gravatarLink" => 'Nastavte si avatar na <a href="http://gravatar.com">gravatar.com</a>',
"moreUserActions" => "Zobrazit více...",
"name" => "Celé jméno",
"noActions" => "Uživatel zatím v systému nic neudělal.",
"noUsers" => "Žádní uživatelé.",
+1
View File
@@ -1,5 +1,6 @@
<?php
return [
'displayingUsersActions' => 'Displaying actions performed by user :name (:email)',
'ip' => 'IP address',
'userAgent' => 'Browser identification',
'overview' => 'List of all actions',
+2 -1
View File
@@ -28,5 +28,6 @@ return [
'userDetail' => 'Information',
'edit' => 'Edit user',
'noActions' => 'There are no actions yet.',
'gravatarLink' => 'Setup avatar at <a href="http://gravatar.com">gravatar.com</a>'
'gravatarLink' => 'Setup avatar at <a href="http://gravatar.com">gravatar.com</a>',
'moreUserActions' => 'More actions of this user'
];
@@ -2,33 +2,43 @@
@section('pageHeading', @trans('admin/actionLog.overview'))
@section('content')
@if (!empty($actions))
<ul class="timeline">
<?php $odd = false; ?>
@if($user)
@section('pageDescription', @trans('admin/actionLog.displayingUsersActions', ['name' => $user->name, 'email' => $user->email]))
@endif
@foreach($actions as $action)
<li @if($odd) class="timeline-inverted" @endif>
<?php $odd = !$odd;?>
<div class="timeline-badge big" style="background: url('{{\App\Helpers\Gravatar::img($action->email, 40)}}') no-repeat center center" data-toggle="tooltip" data-placement="top" title="{{$action->user_name}} {{$action->email}}"></div>
<div class="timeline-panel">
<div class="timeline-heading">
<h5 class="timeline-title">{{$action->name}} <small class="text-muted">
@date($action->created_at)
</small></h5>
</div>
<div class="timeline-body">
<p>{!! $action->value !!}</p>
</div>
</div>
</li>
@endforeach
</ul>
@else
<div class="alert alert-info">
<em>@lang('admin/userManagement.noActions')</em>
</div>
@endif
@section('content')
@if (!empty($actions))
<ul class="timeline">
<?php $odd = false; ?>
@foreach($actions as $action)
<li @if($odd) class="timeline-inverted" @endif>
<?php $odd = !$odd;?>
<div class="timeline-badge big"
style="background: url('{{\App\Helpers\Gravatar::img($action->email, 40)}}') no-repeat center center"
data-toggle="tooltip" data-placement="top"
title="{{$action->user_name}} {{$action->email}}"></div>
<div class="timeline-panel">
<div class="timeline-heading">
<h5 class="timeline-title">{{$action->name}}
<small class="text-muted">
@date($action->created_at)
</small>
</h5>
</div>
<div class="timeline-body">
<p>{!! $action->value !!}</p>
</div>
</div>
</li>
@endforeach
</ul>
@else
<div class="alert alert-info">
<em>@lang('admin/userManagement.noActions')</em>
</div>
@endif
<div class="row text-center">
{!! $actions->render() !!}
@@ -3,7 +3,8 @@
@section('pageHeading', trans('admin/userManagement.profile'))
@section('pageDescription', @trans('admin/userManagement.detail', ['name' => $user->name, 'email' => $user->email]))
@section('headerButtons')
<a href="{{route('users.overview')}}" class="btn btn-secondary btn-sm rounded" title="@lang('admin/userManagement.overview')">
<a href="{{route('users.overview')}}" class="btn btn-secondary btn-sm rounded"
title="@lang('admin/userManagement.overview')">
<i class="fa fa-list"></i>
</a>
@endsection
@@ -85,6 +86,14 @@
</li>
@endforeach
</ul>
<div class="text-center">
<a href="{{route('log.overview', ['userId' => $user->id])}}"
class="btn btn-secondary">@lang('admin/userManagement.moreUserActions')</a>
</div>
@else
<div class="alert alert-info">
<em>@lang('admin/userManagement.noActions')</em>