BookStack/resources/views/pages/revisions.blade.php

72 lines
3.1 KiB
PHP
Raw Normal View History

2015-08-09 07:06:52 -04:00
@extends('base')
@section('content')
<div class="faded-small toolbar">
2015-08-31 06:43:28 -04:00
<div class="container">
<div class="row">
<div class="col-sm-12 faded">
2015-08-31 06:43:28 -04:00
<div class="breadcrumbs">
2016-08-14 08:09:44 -04:00
<a href="{{ $page->book->getUrl() }}" class="text-book text-button"><i class="zmdi zmdi-book"></i>{{ $page->book->getShortName() }}</a>
@if($page->hasChapter())
<span class="sep">&raquo;</span>
<a href="{{ $page->chapter->getUrl() }}" class="text-chapter text-button">
<i class="zmdi zmdi-collection-bookmark"></i>
2016-08-14 08:09:44 -04:00
{{ $page->chapter->getShortName() }}
</a>
@endif
<span class="sep">&raquo;</span>
2016-08-14 08:09:44 -04:00
<a href="{{ $page->getUrl() }}" class="text-page text-button"><i class="zmdi zmdi-file"></i>{{ $page->getShortName() }}</a>
2015-08-31 06:43:28 -04:00
</div>
</div>
2015-08-09 07:06:52 -04:00
</div>
</div>
</div>
2015-08-31 06:43:28 -04:00
<div class="container" ng-non-bindable>
2015-08-09 07:06:52 -04:00
<h1>Page Revisions <span class="subheader">For "{{ $page->name }}"</span></h1>
@if(count($page->revisions) > 0)
<table class="table">
<tr>
<th width="25%">Name</th>
2016-07-07 14:53:43 -04:00
<th colspan="2" width="10%">Created By</th>
<th width="15%">Revision Date</th>
<th width="25%">Changelog</th>
2016-07-07 14:53:43 -04:00
<th width="15%">Actions</th>
2015-08-09 07:06:52 -04:00
</tr>
@foreach($page->revisions as $index => $revision)
2015-08-09 07:06:52 -04:00
<tr>
2016-08-14 08:09:44 -04:00
<td>{{ $revision->name }}</td>
<td style="line-height: 0;">
@if($revision->createdBy)
2016-08-14 08:09:44 -04:00
<img class="avatar" src="{{ $revision->createdBy->getAvatar(30) }}" alt="{{ $revision->createdBy->name }}">
@endif
</td>
2016-08-14 08:09:44 -04:00
<td> @if($revision->createdBy) {{ $revision->createdBy->name }} @else Deleted User @endif</td>
<td><small>{{ $revision->created_at->format('jS F, Y H:i:s') }} <br> ({{ $revision->created_at->diffForHumans() }})</small></td>
<td>{{ $revision->summary }}</td>
@if ($index !== 0)
<td>
2016-08-14 08:09:44 -04:00
<a href="{{ $revision->getUrl() }}" target="_blank">Preview</a>
<span class="text-muted">&nbsp;|&nbsp;</span>
2016-08-14 08:09:44 -04:00
<a href="{{ $revision->getUrl() }}/restore">Restore</a>
</td>
@else
<td><a target="_blank" href="{{ $page->getUrl() }}"><i>Current Version</i></a></td>
@endif
2015-08-09 07:06:52 -04:00
</tr>
@endforeach
</table>
@else
<p>This page has no revisions.</p>
@endif
</div>
@stop