{
return $type === 'revision';
}
+
}
$recents = $this->signedIn ? $this->entityRepo->getRecentlyViewed('bookshelf', 4, 0) : false;
$popular = $this->entityRepo->getPopular('bookshelf', 4, 0);
$new = $this->entityRepo->getRecentlyCreated('bookshelf', 4, 0);
- $shelvesViewType = setting()->getUser($this->currentUser, 'bookshelves_view_type', config('app.views.bookshelves', 'grid'));
+ $view = setting()->getUser($this->currentUser, 'bookshelves_view_type', config('app.views.bookshelves', 'grid'));
$this->setPageTitle(trans('entities.shelves'));
- return view('shelves/index', [
+ return view('shelves.index', [
'shelves' => $shelves,
'recents' => $recents,
'popular' => $popular,
'new' => $new,
- 'shelvesViewType' => $shelvesViewType
+ 'view' => $view
]);
}
$this->checkPermission('bookshelf-create-all');
$books = $this->entityRepo->getAll('book', false, 'update');
$this->setPageTitle(trans('entities.shelves_create'));
- return view('shelves/create', ['books' => $books]);
+ return view('shelves.create', ['books' => $books]);
}
/**
Views::add($bookshelf);
$this->setPageTitle($bookshelf->getShortName());
- return view('shelves/show', [
+ return view('shelves.show', [
'shelf' => $bookshelf,
'books' => $books,
'activity' => Activity::entityActivity($bookshelf, 20, 0)
});
$this->setPageTitle(trans('entities.shelves_edit_named', ['name' => $bookshelf->getShortName()]));
- return view('shelves/edit', [
+ return view('shelves.edit', [
'shelf' => $bookshelf,
'books' => $books,
'shelfBooks' => $shelfBooks,
$this->checkOwnablePermission('bookshelf-delete', $bookshelf);
$this->setPageTitle(trans('entities.shelves_delete_named', ['name' => $bookshelf->getShortName()]));
- return view('shelves/delete', ['shelf' => $bookshelf]);
+ return view('shelves.delete', ['shelf' => $bookshelf]);
}
/**
* @param $bookSlug
* @param $chapterSlug
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
+ * @throws \BookStack\Exceptions\NotFoundException
*/
- public function showRestrict($bookSlug, $chapterSlug)
+ public function showPermissions($bookSlug, $chapterSlug)
{
$chapter = $this->entityRepo->getBySlug('chapter', $chapterSlug, $bookSlug);
$this->checkOwnablePermission('restrictions-manage', $chapter);
$roles = $this->userRepo->getRestrictableRoles();
- return view('chapters/restrictions', [
+ return view('chapters.permissions', [
'chapter' => $chapter,
'roles' => $roles
]);
* @param $chapterSlug
* @param Request $request
* @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
+ * @throws \BookStack\Exceptions\NotFoundException
+ * @throws \Throwable
*/
- public function restrict($bookSlug, $chapterSlug, Request $request)
+ public function permissions($bookSlug, $chapterSlug, Request $request)
{
$chapter = $this->entityRepo->getBySlug('chapter', $chapterSlug, $bookSlug);
$this->checkOwnablePermission('restrictions-manage', $chapter);
// Otherwise show the edit view if they're a guest
$this->setPageTitle(trans('entities.pages_new'));
- return view('pages/guest-create', ['parent' => $parent]);
+ return view('pages.guest-create', ['parent' => $parent]);
}
/**
$this->setPageTitle(trans('entities.pages_edit_draft'));
$draftsEnabled = $this->signedIn;
- return view('pages/edit', [
+ return view('pages.edit', [
'page' => $draft,
'book' => $draft->book,
'isDraft' => true,
Views::add($page);
$this->setPageTitle($page->getShortName());
- return view('pages/show', [
+ return view('pages.show', [
'page' => $page,'book' => $page->book,
'current' => $page,
'sidebarTree' => $sidebarTree,
}
$draftsEnabled = $this->signedIn;
- return view('pages/edit', [
+ return view('pages.edit', [
'page' => $page,
'book' => $page->book,
'current' => $page,
$page = $this->pageRepo->getPageBySlug($pageSlug, $bookSlug);
$this->checkOwnablePermission('page-delete', $page);
$this->setPageTitle(trans('entities.pages_delete_named', ['pageName'=>$page->getShortName()]));
- return view('pages/delete', ['book' => $page->book, 'page' => $page, 'current' => $page]);
+ return view('pages.delete', ['book' => $page->book, 'page' => $page, 'current' => $page]);
}
$page = $this->pageRepo->getById('page', $pageId, true);
$this->checkOwnablePermission('page-update', $page);
$this->setPageTitle(trans('entities.pages_delete_draft_named', ['pageName'=>$page->getShortName()]));
- return view('pages/delete', ['book' => $page->book, 'page' => $page, 'current' => $page]);
+ return view('pages.delete', ['book' => $page->book, 'page' => $page, 'current' => $page]);
}
/**
* @param string $bookSlug
* @param string $pageSlug
* @return \Illuminate\View\View
+ * @throws NotFoundException
*/
public function showRevisions($bookSlug, $pageSlug)
{
$page = $this->pageRepo->getPageBySlug($pageSlug, $bookSlug);
$this->setPageTitle(trans('entities.pages_revisions_named', ['pageName'=>$page->getShortName()]));
- return view('pages/revisions', ['page' => $page, 'book' => $page->book, 'current' => $page]);
+ return view('pages.revisions', ['page' => $page, 'current' => $page]);
}
/**
$page->fill($revision->toArray());
$this->setPageTitle(trans('entities.pages_revision_named', ['pageName' => $page->getShortName()]));
- return view('pages/revision', [
+ return view('pages.revision', [
'page' => $page,
'book' => $page->book,
+ 'diff' => null,
'revision' => $revision
]);
}
$page->fill($revision->toArray());
$this->setPageTitle(trans('entities.pages_revision_named', ['pageName'=>$page->getShortName()]));
- return view('pages/revision', [
+ return view('pages.revision', [
'page' => $page,
'book' => $page->book,
'diff' => $diff,
// Check if its the latest revision, cannot delete latest revision.
if (intval($currentRevision->id) === intval($revId)) {
session()->flash('error', trans('entities.revision_cannot_delete_latest'));
- return response()->view('pages/revisions', ['page' => $page, 'book' => $page->book, 'current' => $page], 400);
+ return response()->view('pages.revisions', ['page' => $page, 'book' => $page->book, 'current' => $page], 400);
}
$revision->delete();
session()->flash('success', trans('entities.revision_delete_success'));
- return view('pages/revisions', ['page' => $page, 'book' => $page->book, 'current' => $page]);
+ return view('pages.revisions', ['page' => $page, 'book' => $page->book, 'current' => $page]);
}
/**
*/
public function showRecentlyCreated()
{
+ // TODO - Still exist?
$pages = $this->pageRepo->getRecentlyCreatedPaginated('page', 20)->setPath(baseUrl('/pages/recently-created'));
- return view('pages/detailed-listing', [
+ return view('pages.detailed-listing', [
'title' => trans('entities.recently_created_pages'),
'pages' => $pages
]);
*/
public function showRecentlyUpdated()
{
+ // TODO - Still exist?
$pages = $this->pageRepo->getRecentlyUpdatedPaginated('page', 20)->setPath(baseUrl('/pages/recently-updated'));
- return view('pages/detailed-listing', [
+ return view('pages.detailed-listing', [
'title' => trans('entities.recently_updated_pages'),
'pages' => $pages
]);
}
- /**
- * Show the Restrictions view.
- * @param string $bookSlug
- * @param string $pageSlug
- * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
- */
- public function showRestrict($bookSlug, $pageSlug)
- {
- $page = $this->pageRepo->getPageBySlug($pageSlug, $bookSlug);
- $this->checkOwnablePermission('restrictions-manage', $page);
- $roles = $this->userRepo->getRestrictableRoles();
- return view('pages/restrictions', [
- 'page' => $page,
- 'roles' => $roles
- ]);
- }
-
/**
* Show the view to choose a new parent to move a page into.
* @param string $bookSlug
$page = $this->pageRepo->getPageBySlug($pageSlug, $bookSlug);
$this->checkOwnablePermission('page-update', $page);
$this->checkOwnablePermission('page-delete', $page);
- return view('pages/move', [
+ return view('pages.move', [
'book' => $page->book,
'page' => $page
]);
$page = $this->pageRepo->getPageBySlug($pageSlug, $bookSlug);
$this->checkOwnablePermission('page-update', $page);
session()->flashInput(['name' => $page->name]);
- return view('pages/copy', [
+ return view('pages.copy', [
'book' => $page->book,
'page' => $page
]);
return redirect($pageCopy->getUrl());
}
+ /**
+ * Show the Permissions view.
+ * @param string $bookSlug
+ * @param string $pageSlug
+ * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
+ * @throws NotFoundException
+ */
+ public function showPermissions($bookSlug, $pageSlug)
+ {
+ $page = $this->pageRepo->getPageBySlug($pageSlug, $bookSlug);
+ $this->checkOwnablePermission('restrictions-manage', $page);
+ $roles = $this->userRepo->getRestrictableRoles();
+ return view('pages.permissions', [
+ 'page' => $page,
+ 'roles' => $roles
+ ]);
+ }
+
/**
* Set the permissions for this page.
* @param string $bookSlug
* @param Request $request
* @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
* @throws NotFoundException
+ * @throws \Throwable
*/
- public function restrict($bookSlug, $pageSlug, Request $request)
+ public function permissions($bookSlug, $pageSlug, Request $request)
{
$page = $this->pageRepo->getPageBySlug($pageSlug, $bookSlug);
$this->checkOwnablePermission('restrictions-manage', $page);
&.left-focus {
grid-template-columns: 2fr 1fr;
}
+ &.right-focus {
+ grid-template-columns: 1fr 2fr;
+ }
&.large-gap {
grid-column-gap: $-xl;
grid-row-gap: $-xl;
.grid.third {
grid-template-columns: 1fr 1fr;
}
- .grid.left-focus {
+ .grid.left-focus, .grid.right-focus {
grid-template-columns: 1fr;
}
}
'pages_revisions_created_by' => 'Created By',
'pages_revisions_date' => 'Revision Date',
'pages_revisions_number' => '#',
+ 'pages_revisions_numbered' => 'Revision #:id',
+ 'pages_revisions_numbered_changes' => 'Revision #:id Changes',
'pages_revisions_changelog' => 'Changelog',
'pages_revisions_changes' => 'Changes',
'pages_revisions_current' => 'Current Version',
<span>{{ trans('entities.books_create') }}</span>
</a>
@endif
- @include('books.view-toggle', ['view' => $view])
+ @include('partials.view-toggle', ['view' => $view, 'type' => 'book'])
</div>
</div>
@extends('simple-layout')
-@section('toolbar')
- <div class="col-sm-12 faded">
- @include('chapters._breadcrumbs', ['chapter' => $chapter])
- </div>
-@stop
-
@section('body')
<div class="container small">
- <p> </p>
- <div class="card">
- <h3>@icon('delete') {{ trans('entities.chapters_delete') }}</h3>
- <div class="body">
- <p>{{ trans('entities.chapters_delete_explain', ['chapterName' => $chapter->name]) }}</p>
- <p class="text-neg">{{ trans('entities.chapters_delete_confirm') }}</p>
+ <div class="my-l">
+ @include('partials.breadcrumbs', ['crumbs' => [
+ $chapter->book,
+ $chapter,
+ $chapter->getUrl('/delete') => trans('entities.chapters_delete')
+ ]])
+ </div>
+
+ <div class="card content-wrap auto-height">
+ <h1 class="list-heading">{{ trans('entities.chapters_delete') }}</h1>
+ <p>{{ trans('entities.chapters_delete_explain', ['chapterName' => $chapter->name]) }}</p>
+ <p class="text-neg"><strong>{{ trans('entities.chapters_delete_confirm') }}</strong></p>
+
+ <form action="{{ $chapter->getUrl() }}" method="POST">
+
+ {!! csrf_field() !!}
+ <input type="hidden" name="_method" value="DELETE">
- <form action="{{ $chapter->getUrl() }}" method="POST">
- {!! csrf_field() !!}
- <input type="hidden" name="_method" value="DELETE">
+ <div class="text-right">
<a href="{{ $chapter->getUrl() }}" class="button outline">{{ trans('common.cancel') }}</a>
- <button type="submit" class="button neg">{{ trans('common.confirm') }}</button>
- </form>
- </div>
+ <button type="submit" class="button primary">{{ trans('common.confirm') }}</button>
+ </div>
+ </form>
</div>
</div>
@extends('simple-layout')
-@section('toolbar')
- <div class="col-sm-12 faded">
- @include('chapters._breadcrumbs', ['chapter' => $chapter])
- </div>
-@stop
-
@section('body')
<div class="container small">
- <div class="card">
- <h3>@icon('folder') {{ trans('entities.chapters_move') }}</h3>
- <div class="body">
- <form action="{{ $chapter->getUrl('/move') }}" method="POST">
- {!! csrf_field() !!}
- <input type="hidden" name="_method" value="PUT">
-
- @include('components.entity-selector', ['name' => 'entity_selection', 'selectorSize' => 'large', 'entityTypes' => 'book', 'entityPermission' => 'chapter-create'])
-
- <div class="form-group text-right">
- <a href="{{ $chapter->getUrl() }}" class="button outline">{{ trans('common.cancel') }}</a>
- <button type="submit" class="button pos">{{ trans('entities.chapters_move') }}</button>
- </div>
- </form>
- </div>
+ <div class="my-l">
+ @include('partials.breadcrumbs', ['crumbs' => [
+ $chapter->book,
+ $chapter,
+ $chapter->getUrl('/move') => trans('entities.chapters_move')
+ ]])
+ </div>
+
+ <div class="card content-wrap">
+ <h1 class="list-heading">{{ trans('entities.chapters_move') }}</h1>
+
+ <form action="{{ $chapter->getUrl('/move') }}" method="POST">
+
+ {!! csrf_field() !!}
+ <input type="hidden" name="_method" value="PUT">
+
+ @include('components.entity-selector', ['name' => 'entity_selection', 'selectorSize' => 'large', 'entityTypes' => 'book', 'entityPermission' => 'chapter-create'])
+
+ <div class="form-group text-right">
+ <a href="{{ $chapter->getUrl() }}" class="button outline">{{ trans('common.cancel') }}</a>
+ <button type="submit" class="button primary">{{ trans('entities.chapters_move') }}</button>
+ </div>
+ </form>
+
</div>
--- /dev/null
+@extends('simple-layout')
+
+@section('body')
+
+ <div class="container">
+
+ <div class="my-l">
+ @include('partials.breadcrumbs', ['crumbs' => [
+ $chapter->book,
+ $chapter,
+ $chapter->getUrl('/permissions') => trans('entities.chapters_permissions')
+ ]])
+ </div>
+
+ <div class="card content-wrap">
+ <h1 class="list-heading">{{ trans('entities.chapters_permissions') }}</h1>
+ @include('form.entity-permissions', ['model' => $chapter])
+ </div>
+ </div>
+
+@stop
+++ /dev/null
-@extends('simple-layout')
-
-@section('toolbar')
- <div class="col-sm-12 faded">
- @include('chapters._breadcrumbs', ['chapter' => $chapter])
- </div>
-@stop
-
-@section('body')
-
- <div class="container">
- <p> </p>
- <div class="card">
- <h3>@icon('lock') {{ trans('entities.chapters_permissions') }}</h3>
- <div class="body">
- @include('form.entity-permissions', ['model' => $chapter])
- </div>
- </div>
- </div>
-
-@stop
<div class="text-center loading" entity-selector-loading>@include('partials.loading-icon')</div>
<div entity-selector-results></div>
</div>
-</div>
\ No newline at end of file
+</div>
+{{--TODO--}}
\ No newline at end of file
@extends('simple-layout')
-@section('toolbar')
- <div class="col-sm-12 faded">
- @include('pages._breadcrumbs', ['page' => $page])
- </div>
-@stop
-
@section('body')
<div class="container small">
- <p> </p>
- <div class="card">
- <h3>@icon('copy') {{ trans('entities.pages_copy') }}</h3>
- <div class="body">
- <form action="{{ $page->getUrl('/copy') }}" method="POST">
- {!! csrf_field() !!}
-
- <div class="form-group title-input">
- <label for="name">{{ trans('common.name') }}</label>
- @include('form/text', ['name' => 'name'])
- </div>
- <div class="form-group" collapsible>
- <div class="collapse-title text-primary" collapsible-trigger>
- <label for="entity_selection">{{ trans('entities.pages_copy_desination') }}</label>
- </div>
- <div class="collapse-content" collapsible-content>
- @include('components.entity-selector', ['name' => 'entity_selection', 'selectorSize' => 'large', 'entityTypes' => 'book,chapter', 'entityPermission' => 'page-create'])
- </div>
- </div>
+ <div class="my-l">
+ @include('partials.breadcrumbs', ['crumbs' => [
+ $page->book,
+ $page->chapter,
+ $page,
+ $page->getUrl('/copy') => trans('entities.pages_copy')
+ ]])
+ </div>
+ <div class="card content-wrap auto-height">
- <div class="form-group text-right">
- <a href="{{ $page->getUrl() }}" class="button outline">{{ trans('common.cancel') }}</a>
- <button type="submit" class="button pos">{{ trans('entities.pages_copy') }}</button>
+ <h1 class="list-heading">{{ trans('entities.pages_copy') }}</h1>
+
+ <form action="{{ $page->getUrl('/copy') }}" method="POST">
+ {!! csrf_field() !!}
+
+ <div class="form-group title-input">
+ <label for="name">{{ trans('common.name') }}</label>
+ @include('form/text', ['name' => 'name'])
+ </div>
+
+ <div class="form-group" collapsible>
+ <div class="collapse-title text-primary" collapsible-trigger>
+ <label for="entity_selection">{{ trans('entities.pages_copy_desination') }}</label>
</div>
- </form>
- </div>
+ <div class="collapse-content" collapsible-content>
+ @include('components.entity-selector', ['name' => 'entity_selection', 'selectorSize' => 'large', 'entityTypes' => 'book,chapter', 'entityPermission' => 'page-create'])
+ </div>
+ </div>
+
+ <div class="form-group text-right">
+ <a href="{{ $page->getUrl() }}" class="button outline">{{ trans('common.cancel') }}</a>
+ <button type="submit" class="button primary">{{ trans('entities.pages_copy') }}</button>
+ </div>
+ </form>
+
</div>
</div>
@extends('simple-layout')
-@section('toolbar')
- <div class="col-sm-12 faded">
- @include('pages._breadcrumbs', ['page' => $page])
- </div>
-@stop
@section('body')
<div class="container small">
- <p> </p>
- <div class="card">
- <h3>@icon('delete') {{ $page->draft ? trans('entities.pages_delete_draft') : trans('entities.pages_delete') }}</h3>
- <div class="body">
- <p class="text-neg">{{ $page->draft ? trans('entities.pages_delete_draft_confirm'): trans('entities.pages_delete_confirm') }}</p>
-
- <form action="{{ $page->getUrl() }}" method="POST">
- {!! csrf_field() !!}
- <input type="hidden" name="_method" value="DELETE">
- <div class="form-group">
- <a href="{{ $page->getUrl() }}" class="button outline">{{ trans('common.cancel') }}</a>
- <button type="submit" class="button neg">{{ trans('common.confirm') }}</button>
- </div>
- </form>
- </div>
+
+ <div class="my-l">
+ @include('partials.breadcrumbs', ['crumbs' => [
+ $page->book,
+ $page->chapter,
+ $page,
+ $page->getUrl('/delete') => trans('entities.pages_delete')
+ ]])
+ </div>
+
+ <div class="card content-wrap auto-height">
+ <h1 class="list-heading">{{ $page->draft ? trans('entities.pages_delete_draft') : trans('entities.pages_delete') }}</h1>
+
+ <p class="text-neg">
+ <strong>
+ {{ $page->draft ? trans('entities.pages_delete_draft_confirm'): trans('entities.pages_delete_confirm') }}
+ </strong>
+ </p>
+
+ {{--TODO - Looks strange--}}
+
+ <form action="{{ $page->getUrl() }}" method="POST">
+ {!! csrf_field() !!}
+ <input type="hidden" name="_method" value="DELETE">
+ <div class="form-group text-right">
+ <a href="{{ $page->getUrl() }}" class="button outline">{{ trans('common.cancel') }}</a>
+ <button type="submit" class="button primary">{{ trans('common.confirm') }}</button>
+ </div>
+ </form>
+
</div>
</div>
@extends('simple-layout')
-@section('toolbar')
- <div class="col-sm-12 faded">
- @include('pages._breadcrumbs', ['page' => $page])
- </div>
-@stop
-
@section('body')
<div class="container small">
- <p> </p>
- <div class="card">
- <h3>@icon('folder') {{ trans('entities.pages_move') }}</h3>
- <div class="body">
- <form action="{{ $page->getUrl('/move') }}" method="POST">
- {!! csrf_field() !!}
- <input type="hidden" name="_method" value="PUT">
-
- @include('components.entity-selector', ['name' => 'entity_selection', 'selectorSize' => 'large', 'entityTypes' => 'book,chapter', 'entityPermission' => 'page-create'])
-
- <div class="form-group text-right">
- <a href="{{ $page->getUrl() }}" class="button outline">{{ trans('common.cancel') }}</a>
- <button type="submit" class="button pos">{{ trans('entities.pages_move') }}</button>
- </div>
- </form>
- </div>
+
+ <div class="my-l">
+ @include('partials.breadcrumbs', ['crumbs' => [
+ $page->book,
+ $page->chapter,
+ $page,
+ $page->getUrl('/move') => trans('entities.pages_move')
+ ]])
+ </div>
+
+ <div class="card content-wrap">
+ <h1 class="list-heading">{{ trans('entities.pages_move') }}</h1>
+
+ <form action="{{ $page->getUrl('/move') }}" method="POST">
+ {!! csrf_field() !!}
+ <input type="hidden" name="_method" value="PUT">
+
+ @include('components.entity-selector', ['name' => 'entity_selection', 'selectorSize' => 'large', 'entityTypes' => 'book,chapter', 'entityPermission' => 'page-create'])
+
+ <div class="form-group text-right">
+ <a href="{{ $page->getUrl() }}" class="button outline">{{ trans('common.cancel') }}</a>
+ <button type="submit" class="button primary">{{ trans('entities.pages_move') }}</button>
+ </div>
+ </form>
+
</div>
</div>
--- /dev/null
+@extends('simple-layout')
+
+@section('body')
+
+ <div class="container">
+
+ <div class="my-l">
+ @include('partials.breadcrumbs', ['crumbs' => [
+ $page->book,
+ $page->chapter,
+ $page,
+ $page->getUrl('/permissions') => trans('entities.pages_permissions')
+ ]])
+ </div>
+
+ <div class="card content-wrap">
+ <h1 class="list-heading">{{ trans('entities.pages_permissions') }}</h1>
+ @include('form.entity-permissions', ['model' => $page])
+ </div>
+ </div>
+
+@stop
+++ /dev/null
-@extends('simple-layout')
-
-@section('toolbar')
- <div class="col-sm-12 faded">
- @include('pages._breadcrumbs', ['page' => $page])
- </div>
-@stop
-
-@section('body')
- <div class="container">
- <p> </p>
- <div class="card">
- <h3>@icon('lock') {{ trans('entities.pages_permissions') }}</h3>
- <div class="body">
- @include('form.entity-permissions', ['model' => $page])
- </div>
- </div>
- </div>
-@stop
-@extends('sidebar-layout')
+@extends('tri-layout')
-@section('sidebar')
- <div class="card">
- <h3>@icon('info') {{ trans('common.details') }}</h3>
+@section('left')
+ <div id="revision-details" class="entity-details mb-xl">
+ <h5>{{ trans('common.details') }}</h5>
<div class="body text-small text-muted">
@include('partials.entity-meta', ['entity' => $revision])
</div>
@section('body')
- <div class="container">
- <div class="row">
- <div class="col-md-9">
- <div class="page-content page-revision">
- @include('pages.page-display')
- </div>
- </div>
- </div>
+ <div class="mb-m">
+ @include('partials.breadcrumbs', ['crumbs' => [
+ $page->$book,
+ $page->chapter,
+ $page,
+ $page->getUrl('/revisions') => trans('entities.pages_revisions'),
+ $revision->getUrl('/changes') => $diff ? trans('entities.pages_revisions_numbered_changes', ['id' => $revision->id]) : null,
+ $revision->getUrl() => !$diff ? trans('entities.pages_revisions_numbered', ['id' => $revision->id]) : null,
+ ]])
</div>
-@stop
+ <div class="card content-wrap">
+ <div class="page-content page-revision">
+ @include('pages.page-display')
+ </div>
+ </div>
-@section('scripts')
- <script>
- setupPageShow(null);
- </script>
@stop
\ No newline at end of file
@extends('simple-layout')
-@section('toolbar')
- <div class="col-sm-12 faded">
- @include('pages._breadcrumbs', ['page' => $page])
- </div>
-@stop
-
@section('body')
<div class="container">
- <p> </p>
- <div class="card">
- <h3>@icon('history') {{ trans('entities.pages_revisions') }}</h3>
- <div class="body">
- @if(count($page->revisions) > 0)
+ <div class="my-l">
+ @include('partials.breadcrumbs', ['crumbs' => [
+ $page->book,
+ $page->chapter,
+ $page,
+ $page->getUrl('/revisions') => trans('entities.pages_revisions')
+ ]])
+ </div>
+
+ <div class="card content-wrap">
+ <h1 class="list-heading">{{ trans('entities.pages_revisions') }}</h1>
+ @if(count($page->revisions) > 0)
- <table class="table">
+ <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)
<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)
- <tr>
- <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>
- <td><small>{{ $revision->created_at->format('jS F, Y H:i:s') }} <br> ({{ $revision->created_at->diffForHumans() }})</small></td>
- <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>
+ <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>
+ <td><small>{{ $revision->created_at->format('jS F, Y H:i:s') }} <br> ({{ $revision->created_at->diffForHumans() }})</small></td>
+ <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>
- @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>
- <a href="{{ $revision->getUrl('restore') }}">{{ trans('entities.pages_revisions_restore') }}</a>
- <span class="text-muted"> | </span>
- <div dropdown class="dropdown-container">
- <a dropdown-toggle>{{ trans('common.delete') }}</a>
- <ul>
- <li class="padded"><small class="text-muted">{{trans('entities.revision_delete_confirm')}}</small></li>
- <li>
- <form action="{{ $revision->getUrl('/delete/') }}" method="POST">
- {!! csrf_field() !!}
- <input type="hidden" name="_method" value="DELETE">
- <button type="submit" class="text-button neg">@icon('delete'){{ trans('common.delete') }}</button>
- </form>
- </li>
- </ul>
- </div>
- @endif
- </td>
- </tr>
- @endforeach
- </table>
+ @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>
+ <a href="{{ $revision->getUrl('restore') }}">{{ trans('entities.pages_revisions_restore') }}</a>
+ <span class="text-muted"> | </span>
+ <div dropdown class="dropdown-container">
+ <a dropdown-toggle>{{ trans('common.delete') }}</a>
+ <ul>
+ <li class="padded"><small class="text-muted">{{trans('entities.revision_delete_confirm')}}</small></li>
+ <li>
+ <form action="{{ $revision->getUrl('/delete/') }}" method="POST">
+ {!! csrf_field() !!}
+ <input type="hidden" name="_method" value="DELETE">
+ <button type="submit" class="text-button neg">@icon('delete'){{ trans('common.delete') }}</button>
+ </form>
+ </li>
+ </ul>
+ </div>
+ @endif
+ </td>
+ </tr>
+ @endforeach
+ </table>
- @else
- <p>{{ trans('entities.pages_revisions_none') }}</p>
- @endif
- </div>
+ @else
+ <p>{{ trans('entities.pages_revisions_none') }}</p>
+ @endif
</div>
</div>
<div>
- <form action="{{ baseUrl("/settings/users/{$currentUser->id}/switch-book-view") }}" method="POST" class="inline">
+ <form action="{{ baseUrl("/settings/users/{$currentUser->id}/switch-${type}-view") }}" method="POST" class="inline">
{!! csrf_field() !!}
{!! method_field('PATCH') !!}
<input type="hidden" value="{{ $view === 'list'? 'grid' : 'list' }}" name="view_type">
@extends('simple-layout')
-@section('toolbar')
- <div class="col-sm-8 faded">
- <div class="breadcrumbs">
- <a href="{{ baseUrl('/shelves') }}" class="text-button">@icon('bookshelf'){{ trans('entities.shelves') }}</a>
- <span class="sep">»</span>
- <a href="{{ baseUrl('/create-shelf') }}" class="text-button">@icon('add'){{ trans('entities.shelves_create') }}</a>
- </div>
- </div>
-@stop
-
@section('body')
<div class="container small">
- <p> </p>
- <div class="card">
- <h3>@icon('add') {{ trans('entities.shelves_create') }}</h3>
- <div class="body">
- <form action="{{ baseUrl("/shelves") }}" method="POST" enctype="multipart/form-data">
- @include('shelves/form', ['shelf' => null, 'books' => $books])
- </form>
- </div>
+
+ <div class="my-l">
+ @include('partials.breadcrumbs', ['crumbs' => [
+ '/shelves' => trans('entities.shelves'),
+ '/create-shelf' => trans('entities.shelves_create')
+ ]])
+ </div>
+
+ <div class="card content-wrap">
+ <h1 class="list-heading">{{ trans('entities.shelves_create') }}</h1>
+ <form action="{{ baseUrl("/shelves") }}" method="POST" enctype="multipart/form-data">
+ @include('shelves.form', ['shelf' => null, 'books' => $books])
+ </form>
</div>
- </div>
- <p class="margin-top large"><br></p>
+ </div>
@include('components.image-manager', ['imageType' => 'cover'])
-
{{ csrf_field() }}
+
<div class="form-group title-input">
<label for="name">{{ trans('common.name') }}</label>
@include('form/text', ['name' => 'name'])
<div class="form-group text-right">
<a href="{{ isset($shelf) ? $shelf->getUrl() : baseUrl('/shelves') }}" class="button outline">{{ trans('common.cancel') }}</a>
- <button type="submit" class="button pos">{{ trans('entities.shelves_save') }}</button>
+ <button type="submit" class="button primary">{{ trans('entities.shelves_save') }}</button>
</div>
\ No newline at end of file
-@extends('sidebar-layout')
+@extends('tri-layout')
-@section('toolbar')
- <div class="col-xs-6 faded">
- <div class="action-buttons text-left">
- @include('shelves/view-toggle', ['shelvesViewType' => $shelvesViewType])
- </div>
+@section('body')
+ <div class="content-wrap card">
+ @include('shelves.list', ['shelves' => $shelves, 'view' => $view])
</div>
- <div class="col-xs-6 faded">
- <div class="action-buttons">
+@stop
+
+@section('right')
+
+ <div class="actions mb-xl">
+ <h5>{{ trans('common.actions') }}</h5>
+ <div class="icon-list text-primary">
+ @include('partials.view-toggle', ['view' => $view, 'type' => 'shelf'])
@if($currentUser->can('bookshelf-create-all'))
- <a href="{{ baseUrl("/create-shelf") }}" class="text-pos text-button">@icon('add'){{ trans('entities.shelves_create') }}</a>
+ <a href="{{ baseUrl("/create-shelf") }}" class="icon-list-item">
+ <span class="icon">@icon('add')</span>
+ <span>{{ trans('entities.shelves_create') }}</span>
+ </a>
@endif
</div>
</div>
+
@stop
-@section('sidebar')
+@section('left')
@if($recents)
- <div id="recents" class="card">
- <h3>@icon('view') {{ trans('entities.recently_viewed') }}</h3>
- @include('partials/entity-list', ['entities' => $recents, 'style' => 'compact'])
+ <div id="recents-shelves">
+ <h5>{{ trans('entities.recently_viewed') }}</h5>
+ @include('partials.entity-list', ['entities' => $recents, 'style' => 'compact'])
</div>
@endif
- <div id="popular" class="card">
- <h3>@icon('popular') {{ trans('entities.shelves_popular') }}</h3>
+ <div id="popular-shelves">
+ <h5>{{ trans('entities.shelves_popular') }}</h5>
@if(count($popular) > 0)
- @include('partials/entity-list', ['entities' => $popular, 'style' => 'compact'])
+ @include('partials.entity-list', ['entities' => $popular, 'style' => 'compact'])
@else
- <div class="body text-muted">{{ trans('entities.shelves_popular_empty') }}</div>
+ <div class="text-muted">{{ trans('entities.shelves_popular_empty') }}</div>
@endif
</div>
- <div id="new" class="card">
- <h3>@icon('star-circle') {{ trans('entities.shelves_new') }}</h3>
+ <div id="new-shelves">
+ <h5>{{ trans('entities.shelves_new') }}</h5>
@if(count($new) > 0)
- @include('partials/entity-list', ['entities' => $new, 'style' => 'compact'])
+ @include('partials.entity-list', ['entities' => $new, 'style' => 'compact'])
@else
- <div class="body text-muted">{{ trans('entities.shelves_new_empty') }}</div>
+ <div class="text-muted">{{ trans('entities.shelves_new_empty') }}</div>
@endif
</div>
-@stop
-
-@section('body')
- @include('shelves/list', ['shelves' => $shelves, 'shelvesViewType' => $shelvesViewType])
- <p><br></p>
@stop
\ No newline at end of file
-<div class="container{{ $shelvesViewType === 'list' ? ' small' : '' }}">
+<div class="container{{ $view === 'list' ? ' small' : '' }}">
+ {{--TODO - Align with books page, Have sorting operations--}}
+ {{--TODO - Create unique list item--}}
<h1>{{ trans('entities.shelves') }}</h1>
@if(count($shelves) > 0)
- @if($shelvesViewType === 'grid')
+ @if($view === 'grid')
<div class="grid third">
@foreach($shelves as $key => $shelf)
@include('shelves/grid-item', ['bookshelf' => $shelf])
+++ /dev/null
-<form action="{{ baseUrl("/settings/users/{$currentUser->id}/switch-shelf-view") }}" method="POST" class="inline">
- {!! csrf_field() !!}
- {!! method_field('PATCH') !!}
- <input type="hidden" value="{{ $shelvesViewType === 'list'? 'grid' : 'list' }}" name="view_type">
- @if ($shelvesViewType === 'list')
- <button type="submit" class="text-pos text-button">@icon('grid'){{ trans('common.grid_view') }}</button>
- @else
- <button type="submit" class="text-pos text-button">@icon('list'){{ trans('common.list_view') }}</button>
- @endif
-</form>
\ No newline at end of file
Route::post('/{bookSlug}/page/{pageSlug}/copy', 'PageController@copy');
Route::get('/{bookSlug}/page/{pageSlug}/delete', 'PageController@showDelete');
Route::get('/{bookSlug}/draft/{pageId}/delete', 'PageController@showDeleteDraft');
- Route::get('/{bookSlug}/page/{pageSlug}/permissions', 'PageController@showRestrict');
- Route::put('/{bookSlug}/page/{pageSlug}/permissions', 'PageController@restrict');
+ Route::get('/{bookSlug}/page/{pageSlug}/permissions', 'PageController@showPermissions');
+ Route::put('/{bookSlug}/page/{pageSlug}/permissions', 'PageController@permissions');
Route::put('/{bookSlug}/page/{pageSlug}', 'PageController@update');
Route::delete('/{bookSlug}/page/{pageSlug}', 'PageController@destroy');
Route::delete('/{bookSlug}/draft/{pageId}', 'PageController@destroyDraft');
Route::get('/{bookSlug}/chapter/{chapterSlug}/move', 'ChapterController@showMove');
Route::put('/{bookSlug}/chapter/{chapterSlug}/move', 'ChapterController@move');
Route::get('/{bookSlug}/chapter/{chapterSlug}/edit', 'ChapterController@edit');
- Route::get('/{bookSlug}/chapter/{chapterSlug}/permissions', 'ChapterController@showRestrict');
+ Route::get('/{bookSlug}/chapter/{chapterSlug}/permissions', 'ChapterController@showPermissions');
Route::get('/{bookSlug}/chapter/{chapterSlug}/export/pdf', 'ChapterController@exportPdf');
Route::get('/{bookSlug}/chapter/{chapterSlug}/export/html', 'ChapterController@exportHtml');
Route::get('/{bookSlug}/chapter/{chapterSlug}/export/plaintext', 'ChapterController@exportPlainText');
- Route::put('/{bookSlug}/chapter/{chapterSlug}/permissions', 'ChapterController@restrict');
+ Route::put('/{bookSlug}/chapter/{chapterSlug}/permissions', 'ChapterController@permissions');
Route::get('/{bookSlug}/chapter/{chapterSlug}/delete', 'ChapterController@showDelete');
Route::delete('/{bookSlug}/chapter/{chapterSlug}', 'ChapterController@destroy');
});