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