FEATURE #1373: add history of content

This commit contains only core funcionality of displaying history. Module settings must be implemented in each module.
This commit is contained in:
Michal Kváček
2016-02-05 16:06:13 +01:00
parent 0216d923d4
commit 620a5545d8
12 changed files with 370 additions and 18 deletions
+9
View File
@@ -1,4 +1,13 @@
del {
text-decoration: line-through;
color: red;
}
ins {
text-decoration: none;
color: green;
}
.columns:last-child:not(:first-child), .column:last-child:not(:first-child) {
float: left;
}
+16
View File
@@ -0,0 +1,16 @@
<?php
return [
'pageName' => 'History of :name',
'columnPageContent' => 'Page content',
'columnUrl' => 'URL',
'columnTitle' => 'Title',
'columnMetaKeywords' => 'Meta keywords',
'columnMetaDescription' => 'Description',
'columnStatus' => 'Page visibility',
'changedFromTo' => 'Changed from <del>:from</del> to <ins>:to</ins>',
'numOfChanges' => 'One change|:count changes',
'diff' => 'Difference',
'diffPageName' => 'Difference of :column',
'backToOverview' => 'Back to history overview'
];
@@ -0,0 +1,21 @@
@extends('admin.layout')
@section('pageName', @trans('admin/history.diffPageName', ['column' => $columnName]))
@section('content')
<div class="row">
<h2>@lang('admin/history.diffPageName', ['column' => $columnName])</h2>
</div>
<div class="row callout">
{!! $diff !!}
</div>
<div class="row">
<a href="{{route('content.history', ['id' => $change->content_id])}}" class="button success">
@lang('admin/history.backToOverview')
</a>
</div>
@stop
@@ -0,0 +1,31 @@
@extends('admin.layout')
@section('pageName', @trans('admin/history.pageName', ['name' => $page->title]))
@section('content')
<div class="row">
<h2>@lang('admin/history.pageName', ['name' => $page->title])</h2>
</div>
<div class="row">
<ul class="accordion" data-accordion>
@foreach($history['changesets'] as $revision => $changes)
<li class="accordion-item" data-accordion-item>
<a class="accordion-title">
<strong>{{$history['info'][$revision]['user']['name']}}</strong> |
{{$history['info'][$revision]['changed_at']}} |
{{trans_choice('admin/history.numOfChanges', count($changes))}}
</a>
@foreach($changes as $change)
<div class="accordion-content" data-tab-content>
<strong>{{$change->column_trans}}</strong>: {!! $change->diff !!}
</div>
@endforeach
</li>
@endforeach
</ul>
</div>
@stop