]> BookStack Code Mirror - bookstack/blob - resources/views/pages/revisions.blade.php
Added page revisions. Fixes #2
[bookstack] / resources / views / pages / revisions.blade.php
1 @extends('base')
2
3 @section('content')
4
5     <div class="row faded-small">
6         <div class="col-md-6 faded">
7             <div class="breadcrumbs padded-horizontal">
8                 <a href="{{$page->getUrl()}}" class="text-primary"><i class="zmdi zmdi-arrow-left"></i>Back to page</a>
9             </div>
10         </div>
11         <div class="col-md-6 faded">
12         </div>
13     </div>
14
15     <div class="page-content">
16         <h1>Page Revisions <span class="subheader">For "{{ $page->name }}"</span></h1>
17
18         @if(count($page->revisions) > 0)
19
20             <table class="table">
21                 <tr>
22                     <th>Name</th>
23                     <th>Created By</th>
24                     <th>Revision Date</th>
25                     <th>Actions</th>
26                 </tr>
27                 @foreach($page->revisions as $revision)
28                     <tr>
29                         <td>{{$revision->name}}</td>
30                         <td>{{$revision->createdBy->name}}</td>
31                         <td><small>{{$revision->created_at->format('jS F, Y H:i:s')}} ({{$revision->created_at->diffForHumans()}})</small></td>
32                         <td>
33                             <a href="{{$revision->getUrl()}}" target="_blank">Preview</a>
34                             <span class="text-muted">&nbsp;|&nbsp;</span>
35                             <a href="{{$revision->getUrl()}}/restore">Restore</a>
36                         </td>
37                     </tr>
38                 @endforeach
39             </table>
40
41         @else
42             <p>This page has no revisions.</p>
43         @endif
44
45     </div>
46
47 @stop