2017-08-26 10:41:33 -04:00
|
|
|
@extends('simple-layout')
|
2015-08-09 07:06:52 -04:00
|
|
|
|
2017-08-26 10:41:33 -04:00
|
|
|
@section('body')
|
2018-05-28 05:33:38 -04:00
|
|
|
<div class="container">
|
2017-08-26 10:41:33 -04:00
|
|
|
|
2019-02-17 12:52:42 -05:00
|
|
|
<div class="my-s">
|
2019-02-02 06:41:41 -05:00
|
|
|
@include('partials.breadcrumbs', ['crumbs' => [
|
|
|
|
$page->book,
|
|
|
|
$page->chapter,
|
|
|
|
$page,
|
2019-02-17 12:52:42 -05:00
|
|
|
$page->getUrl('/revisions') => [
|
|
|
|
'text' => trans('entities.pages_revisions'),
|
|
|
|
'icon' => 'history',
|
|
|
|
]
|
2019-02-02 06:41:41 -05:00
|
|
|
]])
|
|
|
|
</div>
|
|
|
|
|
2019-08-25 10:44:51 -04:00
|
|
|
<main class="card content-wrap">
|
2019-02-02 06:41:41 -05:00
|
|
|
<h1 class="list-heading">{{ trans('entities.pages_revisions') }}</h1>
|
|
|
|
@if(count($page->revisions) > 0)
|
2017-08-26 10:41:33 -04:00
|
|
|
|
2019-02-02 06:41:41 -05:00
|
|
|
<table class="table">
|
|
|
|
<tr>
|
|
|
|
<th width="3%">{{ trans('entities.pages_revisions_number') }}</th>
|
|
|
|
<th width="23%">{{ trans('entities.pages_name') }}</th>
|
|
|
|
<th colspan="2" width="8%">{{ trans('entities.pages_revisions_created_by') }}</th>
|
|
|
|
<th width="15%">{{ trans('entities.pages_revisions_date') }}</th>
|
|
|
|
<th width="25%">{{ trans('entities.pages_revisions_changelog') }}</th>
|
|
|
|
<th width="20%">{{ trans('common.actions') }}</th>
|
|
|
|
</tr>
|
|
|
|
@foreach($page->revisions as $index => $revision)
|
2017-08-26 10:41:33 -04:00
|
|
|
<tr>
|
2019-02-02 06:41:41 -05:00
|
|
|
<td>{{ $revision->revision_number == 0 ? '' : $revision->revision_number }}</td>
|
|
|
|
<td>{{ $revision->name }}</td>
|
|
|
|
<td style="line-height: 0;">
|
|
|
|
@if($revision->createdBy)
|
|
|
|
<img class="avatar" src="{{ $revision->createdBy->getAvatar(30) }}" alt="{{ $revision->createdBy->name }}">
|
|
|
|
@endif
|
|
|
|
</td>
|
|
|
|
<td> @if($revision->createdBy) {{ $revision->createdBy->name }} @else {{ trans('common.deleted_user') }} @endif</td>
|
2019-02-09 09:58:38 -05:00
|
|
|
<td><small>{{ $revision->created_at->formatLocalized('%e %B %Y %H:%M:%S') }} <br> ({{ $revision->created_at->diffForHumans() }})</small></td>
|
2019-02-02 06:41:41 -05:00
|
|
|
<td>{{ $revision->summary }}</td>
|
|
|
|
<td class="actions">
|
|
|
|
<a href="{{ $revision->getUrl('changes') }}" target="_blank">{{ trans('entities.pages_revisions_changes') }}</a>
|
|
|
|
<span class="text-muted"> | </span>
|
2017-08-26 10:41:33 -04:00
|
|
|
|
2018-09-15 05:45:42 -04:00
|
|
|
|
2019-02-02 06:41:41 -05:00
|
|
|
@if ($index === 0)
|
|
|
|
<a target="_blank" href="{{ $page->getUrl() }}"><i>{{ trans('entities.pages_revisions_current') }}</i></a>
|
|
|
|
@else
|
|
|
|
<a href="{{ $revision->getUrl() }}" target="_blank">{{ trans('entities.pages_revisions_preview') }}</a>
|
|
|
|
<span class="text-muted"> | </span>
|
2020-06-24 15:38:08 -04:00
|
|
|
<div component="dropdown" class="dropdown-container">
|
|
|
|
<a refs="dropdown@toggle" href="#" aria-haspopup="true" aria-expanded="false">{{ trans('entities.pages_revisions_restore') }}</a>
|
|
|
|
<ul refs="dropdown@menu" class="dropdown-menu" role="menu">
|
2019-04-20 08:25:16 -04:00
|
|
|
<li class="px-m py-s"><small class="text-muted">{{trans('entities.revision_restore_confirm')}}</small></li>
|
|
|
|
<li>
|
|
|
|
<form action="{{ $revision->getUrl('/restore') }}" method="POST">
|
|
|
|
{!! csrf_field() !!}
|
|
|
|
<input type="hidden" name="_method" value="PUT">
|
|
|
|
<button type="submit" class="text-button text-primary">@icon('history'){{ trans('entities.pages_revisions_restore') }}</button>
|
|
|
|
</form>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
2019-02-02 06:41:41 -05:00
|
|
|
<span class="text-muted"> | </span>
|
2020-06-24 15:38:08 -04:00
|
|
|
<div component="dropdown" class="dropdown-container">
|
|
|
|
<a refs="dropdown@toggle" href="#" aria-haspopup="true" aria-expanded="false">{{ trans('common.delete') }}</a>
|
2020-09-13 14:12:15 -04:00
|
|
|
<ul refs="dropdown@menu" class="dropdown-menu" role="menu">
|
2019-04-07 04:57:48 -04:00
|
|
|
<li class="px-m py-s"><small class="text-muted">{{trans('entities.revision_delete_confirm')}}</small></li>
|
2019-02-02 06:41:41 -05:00
|
|
|
<li>
|
|
|
|
<form action="{{ $revision->getUrl('/delete/') }}" method="POST">
|
|
|
|
{!! csrf_field() !!}
|
|
|
|
<input type="hidden" name="_method" value="DELETE">
|
2019-04-07 06:34:40 -04:00
|
|
|
<button type="submit" class="text-button text-neg">@icon('delete'){{ trans('common.delete') }}</button>
|
2019-02-02 06:41:41 -05:00
|
|
|
</form>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
@endif
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
@endforeach
|
|
|
|
</table>
|
2017-08-26 10:41:33 -04:00
|
|
|
|
2019-02-02 06:41:41 -05:00
|
|
|
@else
|
|
|
|
<p>{{ trans('entities.pages_revisions_none') }}</p>
|
|
|
|
@endif
|
2019-08-25 10:44:51 -04:00
|
|
|
</main>
|
2015-08-09 07:06:52 -04:00
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
@stop
|