FEATURE: add templates for content history
This commit is contained in:
+4
@@ -13033,6 +13033,10 @@ a:focus {
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.text-right {
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
.has-error {
|
.has-error {
|
||||||
color: #FF4444;
|
color: #FF4444;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ return [
|
|||||||
"pageDeleted" => "Stránka :name (:url) úspěšně smazána.",
|
"pageDeleted" => "Stránka :name (:url) úspěšně smazána.",
|
||||||
"parentPage" => "Nadřazená stránka",
|
"parentPage" => "Nadřazená stránka",
|
||||||
"publicationOptions" => "Nastavení publikace",
|
"publicationOptions" => "Nastavení publikace",
|
||||||
"save" => "Vytvořit novou stránku",
|
"save" => "Uložit",
|
||||||
"setHomepage" => "Nastavit jako domovskou stránku",
|
"setHomepage" => "Nastavit jako domovskou stránku",
|
||||||
"showHistory" => "Historie (:count)",
|
"showHistory" => "Historie (:count)",
|
||||||
"statusChanged" => "Stav úspěšně změněn.",
|
"statusChanged" => "Stav úspěšně změněn.",
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ return [
|
|||||||
'edit' => 'Edit :name',
|
'edit' => 'Edit :name',
|
||||||
'editPlain' => 'Edit',
|
'editPlain' => 'Edit',
|
||||||
'content' => 'Page content',
|
'content' => 'Page content',
|
||||||
'save' => 'Save new page',
|
'save' => 'Save page',
|
||||||
'basicInfo' => 'Basic information',
|
'basicInfo' => 'Basic information',
|
||||||
'metaOptions' => 'Meta information',
|
'metaOptions' => 'Meta information',
|
||||||
'publicationOptions' => 'Publication setup',
|
'publicationOptions' => 'Publication setup',
|
||||||
|
|||||||
@@ -23,4 +23,5 @@ return [
|
|||||||
'setupAsHomepage' => 'Setup as homepage',
|
'setupAsHomepage' => 'Setup as homepage',
|
||||||
'uploadedFile' => 'File <ins>:file</ins> was uploaded.',
|
'uploadedFile' => 'File <ins>:file</ins> was uploaded.',
|
||||||
'deletedFile' => 'File <del>:file</del> was removed from this page.',
|
'deletedFile' => 'File <del>:file</del> was removed from this page.',
|
||||||
|
'changedAt' => 'Change from :time'
|
||||||
];
|
];
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
<form method="POST" enctype="multipart/form-data" action="{{route('content.editPost', ['pageId' => $page->id])}}">
|
|
||||||
{!! csrf_field() !!}
|
|
||||||
|
|
||||||
@include('admin.content.formInputs')
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="columns large-6">
|
|
||||||
<button type="submit" class="button success">@lang('admin/contents.edit', ['name' => $page->title])</button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
@if ($historySize > 0)
|
|
||||||
<div class="columns text-right large-6">
|
|
||||||
<a class="button warning" href="{{route('content.history', ['id' => $page->id])}}">@lang('admin/contents.showHistory', ['count' => $historySize])</a>
|
|
||||||
</div>
|
|
||||||
@endif
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
@section('javascripts')
|
|
||||||
@include('admin.snippets.ckEditor', ['textareaId' => 'pageContent'])
|
|
||||||
@stop
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
<form method="POST" enctype="multipart/form-data" action="{{route('content.newPost', ['moduleId' => $moduleId])}}">
|
|
||||||
{!! csrf_field() !!}
|
|
||||||
|
|
||||||
@include('admin.content.formInputs')
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="columns large-12">
|
|
||||||
<button type="submit" class="button success">@lang('admin/contents.save')</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
@section('javascripts')
|
|
||||||
@include('admin.snippets.ckEditor', ['textareaId' => 'pageContent'])
|
|
||||||
@stop
|
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
@extends('admin.layoutWithNavigation')
|
||||||
|
|
||||||
|
@section('pageHeading', @trans('admin/history.diffPageName', ['column' => $columnName]))
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
<div class="card card-default">
|
||||||
|
<div class="card-header">
|
||||||
|
<div class="header-block">
|
||||||
|
<p class="title">
|
||||||
|
@lang('admin/history.changedAt', ['time' => \App\Helpers\Template::date($change->changed_at)])
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="card-block">
|
||||||
|
{!! $diff !!}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-6">
|
||||||
|
<a href="{{route('content.history', ['id' => $change->content_id])}}" class="btn btn-primary">
|
||||||
|
@lang('admin/history.backToOverview')
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-6 text-right">
|
||||||
|
<a href="{{route('content.edit', ['id' => $change->content_id])}}" class="btn btn-primary">
|
||||||
|
@lang('admin/history.backToEdit')
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@stop
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
@extends('admin.layoutWithNavigation')
|
||||||
|
|
||||||
|
@section('pageHeading', @trans('admin/history.pageName', ['name' => $page->title]))
|
||||||
|
@section('pageDescription', $page->meta_description)
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
<div id="accordion" role="tablist" aria-multiselectable="true">
|
||||||
|
@foreach($history['changesets'] as $revision => $changes)
|
||||||
|
<div class="panel panel-default">
|
||||||
|
<div class="panel-heading" role="tab" id="heading-{{$revision}}">
|
||||||
|
<h6 class="panel-title">
|
||||||
|
<a class="collapsed" data-toggle="collapse" data-parent="#accordion"
|
||||||
|
href="#revision-{{$revision}}" aria-expanded="false" aria-controls="revision-{{$revision}}">
|
||||||
|
<strong>{{$history['info'][$revision]['user']['name']}}</strong> |
|
||||||
|
@date($history['info'][$revision]['changed_at']) |
|
||||||
|
{{trans_choice('admin/history.numOfChanges', count($changes))}}
|
||||||
|
</a>
|
||||||
|
</h6>
|
||||||
|
</div>
|
||||||
|
<div id="revision-{{$revision}}" class="panel-collapse collapse" role="tabpanel"
|
||||||
|
aria-labelledby="heading-{{$revision}}">
|
||||||
|
@foreach($changes as $change)
|
||||||
|
<div class="accordion-content" data-tab-content>
|
||||||
|
<strong>{{$change->column_trans}}</strong>: {!! $change->diff !!}
|
||||||
|
</div>
|
||||||
|
@endforeach
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endforeach
|
||||||
|
</div>
|
||||||
|
<a href="{{route('content.edit', ['id' => $page->id])}}" class="btn btn-primary">
|
||||||
|
@lang('admin/history.backToEdit')
|
||||||
|
</a>
|
||||||
|
@stop
|
||||||
Reference in New Issue
Block a user