mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-08-25 19:56:05 +00:00
Rolled out new design further
This commit is contained in:
parent
295f520f21
commit
3da8c01c1f
@ -36,7 +36,7 @@ class BookController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
$books = $this->entityRepo->getAllPaginated('book', 10);
|
$books = $this->entityRepo->getAllPaginated('book', 20);
|
||||||
$recents = $this->signedIn ? $this->entityRepo->getRecentlyViewed('book', 4, 0) : false;
|
$recents = $this->signedIn ? $this->entityRepo->getRecentlyViewed('book', 4, 0) : false;
|
||||||
$popular = $this->entityRepo->getPopular('book', 4, 0);
|
$popular = $this->entityRepo->getPopular('book', 4, 0);
|
||||||
$this->setPageTitle('Books');
|
$this->setPageTitle('Books');
|
||||||
@ -84,7 +84,12 @@ class BookController extends Controller
|
|||||||
$bookChildren = $this->entityRepo->getBookChildren($book);
|
$bookChildren = $this->entityRepo->getBookChildren($book);
|
||||||
Views::add($book);
|
Views::add($book);
|
||||||
$this->setPageTitle($book->getShortName());
|
$this->setPageTitle($book->getShortName());
|
||||||
return view('books/show', ['book' => $book, 'current' => $book, 'bookChildren' => $bookChildren]);
|
return view('books/show', [
|
||||||
|
'book' => $book,
|
||||||
|
'current' => $book,
|
||||||
|
'bookChildren' => $bookChildren,
|
||||||
|
'activity' => Activity::entityActivity($book, 20, 0)
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -29,13 +29,11 @@ class HomeController extends Controller
|
|||||||
$activity = Activity::latest(10);
|
$activity = Activity::latest(10);
|
||||||
$draftPages = $this->signedIn ? $this->entityRepo->getUserDraftPages(6) : [];
|
$draftPages = $this->signedIn ? $this->entityRepo->getUserDraftPages(6) : [];
|
||||||
$recentFactor = count($draftPages) > 0 ? 0.5 : 1;
|
$recentFactor = count($draftPages) > 0 ? 0.5 : 1;
|
||||||
$recents = $this->signedIn ? Views::getUserRecentlyViewed(12*$recentFactor, 0) : $this->entityRepo->getRecentlyCreated('book', 10*$recentFactor);
|
$recents = $this->signedIn ? Views::getUserRecentlyViewed(12*$recentFactor, 0) : $this->entityRepo->getRecentlyCreated('book', 12*$recentFactor);
|
||||||
$recentlyCreatedPages = $this->entityRepo->getRecentlyCreated('page', 5);
|
$recentlyUpdatedPages = $this->entityRepo->getRecentlyUpdated('page', 12);
|
||||||
$recentlyUpdatedPages = $this->entityRepo->getRecentlyUpdated('page', 5);
|
|
||||||
return view('home', [
|
return view('home', [
|
||||||
'activity' => $activity,
|
'activity' => $activity,
|
||||||
'recents' => $recents,
|
'recents' => $recents,
|
||||||
'recentlyCreatedPages' => $recentlyCreatedPages,
|
|
||||||
'recentlyUpdatedPages' => $recentlyUpdatedPages,
|
'recentlyUpdatedPages' => $recentlyUpdatedPages,
|
||||||
'draftPages' => $draftPages
|
'draftPages' => $draftPages
|
||||||
]);
|
]);
|
||||||
|
@ -171,6 +171,10 @@ header .search-box {
|
|||||||
background-color: $primary-faded;
|
background-color: $primary-faded;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.toolbar-container {
|
||||||
|
background-color: #FFF;
|
||||||
|
}
|
||||||
|
|
||||||
.breadcrumbs .text-button, .action-buttons .text-button {
|
.breadcrumbs .text-button, .action-buttons .text-button {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
padding: $-s;
|
padding: $-s;
|
||||||
|
@ -16,6 +16,9 @@ body {
|
|||||||
line-height: 1.6;
|
line-height: 1.6;
|
||||||
color: #616161;
|
color: #616161;
|
||||||
-webkit-font-smoothing: antialiased;
|
-webkit-font-smoothing: antialiased;
|
||||||
|
&.shaded {
|
||||||
|
background-color: #F2F2F2;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
button {
|
button {
|
||||||
|
@ -310,6 +310,11 @@ ul.pagination {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.card .entity-list-item {
|
||||||
|
padding-left: $-m;
|
||||||
|
padding-right: $-m;
|
||||||
|
}
|
||||||
|
|
||||||
.entity-list.compact {
|
.entity-list.compact {
|
||||||
font-size: 0.6em;
|
font-size: 0.6em;
|
||||||
h4, a {
|
h4, a {
|
||||||
|
@ -10,6 +10,7 @@ return [
|
|||||||
'save' => 'Save',
|
'save' => 'Save',
|
||||||
'continue' => 'Continue',
|
'continue' => 'Continue',
|
||||||
'select' => 'Select',
|
'select' => 'Select',
|
||||||
|
'more' => 'More',
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Form Labels
|
* Form Labels
|
||||||
@ -35,7 +36,6 @@ return [
|
|||||||
'remove' => 'Remove',
|
'remove' => 'Remove',
|
||||||
'add' => 'Add',
|
'add' => 'Add',
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Misc
|
* Misc
|
||||||
*/
|
*/
|
||||||
@ -44,6 +44,7 @@ return [
|
|||||||
'no_items' => 'No items available',
|
'no_items' => 'No items available',
|
||||||
'back_to_top' => 'Back to top',
|
'back_to_top' => 'Back to top',
|
||||||
'toggle_details' => 'Toggle Details',
|
'toggle_details' => 'Toggle Details',
|
||||||
|
'details' => 'Details',
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Header
|
* Header
|
||||||
|
@ -1,59 +1,50 @@
|
|||||||
@extends('base')
|
@extends('sidebar-layout')
|
||||||
|
|
||||||
@section('content')
|
@section('toolbar')
|
||||||
|
<div class="col-xs-1"></div>
|
||||||
<div class="faded-small toolbar">
|
<div class="col-xs-11 faded">
|
||||||
<div class="container">
|
<div class="action-buttons">
|
||||||
<div class="row">
|
@if($currentUser->can('book-create-all'))
|
||||||
<div class="col-xs-1"></div>
|
<a href="{{ baseUrl("/books/create") }}" class="text-pos text-button"><i class="zmdi zmdi-plus"></i>{{ trans('entities.books_create') }}</a>
|
||||||
<div class="col-xs-11 faded">
|
@endif
|
||||||
<div class="action-buttons">
|
|
||||||
@if($currentUser->can('book-create-all'))
|
|
||||||
<a href="{{ baseUrl("/books/create") }}" class="text-pos text-button"><i class="zmdi zmdi-plus"></i>{{ trans('entities.books_create') }}</a>
|
|
||||||
@endif
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@stop
|
||||||
|
|
||||||
|
@section('sidebar')
|
||||||
<div class="container" ng-non-bindable>
|
@if($recents)
|
||||||
<div class="row">
|
<div id="recents" class="card">
|
||||||
<div class="col-sm-7">
|
<h3><i class="zmdi zmdi-eye"></i> {{ trans('entities.recently_viewed') }}</h3>
|
||||||
<h1>{{ trans('entities.books') }}</h1>
|
@include('partials/entity-list', ['entities' => $recents, 'style' => 'compact'])
|
||||||
@if(count($books) > 0)
|
|
||||||
@foreach($books as $book)
|
|
||||||
@include('books/list-item', ['book' => $book])
|
|
||||||
<hr>
|
|
||||||
@endforeach
|
|
||||||
{!! $books->render() !!}
|
|
||||||
@else
|
|
||||||
<p class="text-muted">{{ trans('entities.books_empty') }}</p>
|
|
||||||
@if(userCan('books-create-all'))
|
|
||||||
<a href="{{ baseUrl("/books/create") }}" class="text-pos"><i class="zmdi zmdi-edit"></i>{{ trans('entities.create_one_now') }}</a>
|
|
||||||
@endif
|
|
||||||
@endif
|
|
||||||
</div>
|
|
||||||
<div class="col-sm-4 col-sm-offset-1">
|
|
||||||
<div id="recents">
|
|
||||||
@if($recents)
|
|
||||||
<div class="margin-top"> </div>
|
|
||||||
<h3>{{ trans('entities.recently_viewed') }}</h3>
|
|
||||||
@include('partials/entity-list', ['entities' => $recents])
|
|
||||||
@endif
|
|
||||||
</div>
|
|
||||||
<div class="margin-top large"> </div>
|
|
||||||
<div id="popular">
|
|
||||||
<h3>{{ trans('entities.books_popular') }}</h3>
|
|
||||||
@if(count($popular) > 0)
|
|
||||||
@include('partials/entity-list', ['entities' => $popular])
|
|
||||||
@else
|
|
||||||
<p class="text-muted">{{ trans('entities.books_popular_empty') }}</p>
|
|
||||||
@endif
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
<div id="popular" class="card">
|
||||||
|
<h3><i class="zmdi zmdi-fire"></i> {{ trans('entities.books_popular') }}</h3>
|
||||||
|
@if(count($popular) > 0)
|
||||||
|
@include('partials/entity-list', ['entities' => $popular, 'style' => 'compact'])
|
||||||
|
@else
|
||||||
|
<div class="body text-muted">{{ trans('entities.books_popular_empty') }}</div>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
@stop
|
||||||
|
|
||||||
|
@section('body')
|
||||||
|
|
||||||
|
<div class="container small" ng-non-bindable>
|
||||||
|
<h1>{{ trans('entities.books') }}</h1>
|
||||||
|
@if(count($books) > 0)
|
||||||
|
@foreach($books as $book)
|
||||||
|
@include('books/list-item', ['book' => $book])
|
||||||
|
<hr>
|
||||||
|
@endforeach
|
||||||
|
{!! $books->render() !!}
|
||||||
|
@else
|
||||||
|
<p class="text-muted">{{ trans('entities.books_empty') }}</p>
|
||||||
|
@if(userCan('books-create-all'))
|
||||||
|
<a href="{{ baseUrl("/books/create") }}" class="text-pos"><i class="zmdi zmdi-edit"></i>{{ trans('entities.create_one_now') }}</a>
|
||||||
|
@endif
|
||||||
|
@endif
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@stop
|
@stop
|
@ -1,128 +1,138 @@
|
|||||||
@extends('base')
|
@extends('sidebar-layout')
|
||||||
|
|
||||||
@section('content')
|
@section('toolbar')
|
||||||
|
<div class="col-sm-6 col-xs-1 faded">
|
||||||
<div class="faded-small toolbar">
|
@include('books._breadcrumbs', ['book' => $book])
|
||||||
<div class="container">
|
</div>
|
||||||
<div class="row">
|
<div class="col-sm-6 col-xs-11">
|
||||||
<div class="col-sm-6 col-xs-1 faded">
|
<div class="action-buttons faded">
|
||||||
@include('books._breadcrumbs', ['book' => $book])
|
<span dropdown class="dropdown-container">
|
||||||
</div>
|
<div dropdown-toggle class="text-button text-primary"><i class="zmdi zmdi-open-in-new"></i>{{ trans('entities.export') }}</div>
|
||||||
<div class="col-sm-6 col-xs-11">
|
<ul class="wide">
|
||||||
<div class="action-buttons faded">
|
<li><a href="{{ $book->getUrl('/export/html') }}" target="_blank">{{ trans('entities.export_html') }} <span class="text-muted float right">.html</span></a></li>
|
||||||
<span dropdown class="dropdown-container">
|
<li><a href="{{ $book->getUrl('/export/pdf') }}" target="_blank">{{ trans('entities.export_pdf') }} <span class="text-muted float right">.pdf</span></a></li>
|
||||||
<div dropdown-toggle class="text-button text-primary"><i class="zmdi zmdi-open-in-new"></i>{{ trans('entities.export') }}</div>
|
<li><a href="{{ $book->getUrl('/export/plaintext') }}" target="_blank">{{ trans('entities.export_text') }} <span class="text-muted float right">.txt</span></a></li>
|
||||||
<ul class="wide">
|
</ul>
|
||||||
<li><a href="{{ $book->getUrl('/export/html') }}" target="_blank">{{ trans('entities.export_html') }} <span class="text-muted float right">.html</span></a></li>
|
</span>
|
||||||
<li><a href="{{ $book->getUrl('/export/pdf') }}" target="_blank">{{ trans('entities.export_pdf') }} <span class="text-muted float right">.pdf</span></a></li>
|
@if(userCan('page-create', $book))
|
||||||
<li><a href="{{ $book->getUrl('/export/plaintext') }}" target="_blank">{{ trans('entities.export_text') }} <span class="text-muted float right">.txt</span></a></li>
|
<a href="{{ $book->getUrl('/page/create') }}" class="text-pos text-button"><i class="zmdi zmdi-plus"></i>{{ trans('entities.pages_new') }}</a>
|
||||||
</ul>
|
@endif
|
||||||
</span>
|
@if(userCan('chapter-create', $book))
|
||||||
@if(userCan('page-create', $book))
|
<a href="{{ $book->getUrl('/chapter/create') }}" class="text-pos text-button"><i class="zmdi zmdi-plus"></i>{{ trans('entities.chapters_new') }}</a>
|
||||||
<a href="{{ $book->getUrl('/page/create') }}" class="text-pos text-button"><i class="zmdi zmdi-plus"></i>{{ trans('entities.pages_new') }}</a>
|
@endif
|
||||||
@endif
|
@if(userCan('book-update', $book) || userCan('restrictions-manage', $book) || userCan('book-delete', $book))
|
||||||
@if(userCan('chapter-create', $book))
|
<div dropdown class="dropdown-container">
|
||||||
<a href="{{ $book->getUrl('/chapter/create') }}" class="text-pos text-button"><i class="zmdi zmdi-plus"></i>{{ trans('entities.chapters_new') }}</a>
|
<a dropdown-toggle class="text-primary text-button"><i class="zmdi zmdi-more-vert"></i>{{ trans('common.more') }}</a>
|
||||||
@endif
|
<ul>
|
||||||
@if(userCan('book-update', $book))
|
@if(userCan('book-update', $book))
|
||||||
<a href="{{$book->getEditUrl()}}" class="text-primary text-button"><i class="zmdi zmdi-edit"></i>{{ trans('common.edit') }}</a>
|
<li><a href="{{$book->getEditUrl()}}" class="text-primary"><i class="zmdi zmdi-edit"></i>{{ trans('common.edit') }}</a></li>
|
||||||
|
<li><a href="{{ $book->getUrl('/sort') }}" class="text-primary"><i class="zmdi zmdi-sort"></i>{{ trans('common.sort') }}</a></li>
|
||||||
@endif
|
@endif
|
||||||
@if(userCan('book-update', $book) || userCan('restrictions-manage', $book) || userCan('book-delete', $book))
|
@if(userCan('restrictions-manage', $book))
|
||||||
<div dropdown class="dropdown-container">
|
<li><a href="{{ $book->getUrl('/permissions') }}" class="text-primary"><i class="zmdi zmdi-lock-outline"></i>{{ trans('entities.permissions') }}</a></li>
|
||||||
<a dropdown-toggle class="text-primary text-button"><i class="zmdi zmdi-more-vert"></i></a>
|
|
||||||
<ul>
|
|
||||||
@if(userCan('book-update', $book))
|
|
||||||
<li><a href="{{ $book->getUrl('/sort') }}" class="text-primary"><i class="zmdi zmdi-sort"></i>{{ trans('common.sort') }}</a></li>
|
|
||||||
@endif
|
|
||||||
@if(userCan('restrictions-manage', $book))
|
|
||||||
<li><a href="{{ $book->getUrl('/permissions') }}" class="text-primary"><i class="zmdi zmdi-lock-outline"></i>{{ trans('entities.permissions') }}</a></li>
|
|
||||||
@endif
|
|
||||||
@if(userCan('book-delete', $book))
|
|
||||||
<li><a href="{{ $book->getUrl('/delete') }}" class="text-neg"><i class="zmdi zmdi-delete"></i>{{ trans('common.delete') }}</a></li>
|
|
||||||
@endif
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
@endif
|
@endif
|
||||||
</div>
|
@if(userCan('book-delete', $book))
|
||||||
|
<li><a href="{{ $book->getUrl('/delete') }}" class="text-neg"><i class="zmdi zmdi-delete"></i>{{ trans('common.delete') }}</a></li>
|
||||||
|
@endif
|
||||||
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
@endif
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@stop
|
||||||
|
|
||||||
|
@section('sidebar')
|
||||||
|
|
||||||
|
<div class="card">
|
||||||
|
<div class="body">
|
||||||
|
<form v-on:submit.prevent="searchBook" class="search-box">
|
||||||
|
<input v-model="searchTerm" v-on:change="checkSearchForm()" type="text" name="term" placeholder="{{ trans('entities.books_search_this') }}">
|
||||||
|
<button type="submit"><i class="zmdi zmdi-search"></i></button>
|
||||||
|
<button v-if="searching" v-cloak class="text-neg" v-on:click="clearSearch()" type="button"><i class="zmdi zmdi-close"></i></button>
|
||||||
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@if($book->restricted)
|
||||||
<div ng-non-bindable class="container" id="entity-dashboard" entity-id="{{ $book->id }}" entity-type="book">
|
<div class="card">
|
||||||
<div class="row">
|
<h3><i class="zmdi zmdi-key"></i> {{ trans('entities.permissions') }}</h3>
|
||||||
<div class="col-md-7">
|
<div class="body">
|
||||||
|
<p class="text-muted">
|
||||||
<h1>{{$book->name}}</h1>
|
@if(userCan('restrictions-manage', $book))
|
||||||
<div class="book-content" v-show="!searching">
|
<a href="{{ $book->getUrl('/permissions') }}"><i class="zmdi zmdi-lock-outline"></i>{{ trans('entities.books_permissions_active') }}</a>
|
||||||
<p class="text-muted" v-pre>{!! nl2br(e($book->description)) !!}</p>
|
@else
|
||||||
|
<i class="zmdi zmdi-lock-outline"></i>{{ trans('entities.books_permissions_active') }}
|
||||||
<div class="page-list" v-pre>
|
@endif
|
||||||
<hr>
|
</p>
|
||||||
@if(count($bookChildren) > 0)
|
|
||||||
@foreach($bookChildren as $childElement)
|
|
||||||
@if($childElement->isA('chapter'))
|
|
||||||
@include('chapters/list-item', ['chapter' => $childElement])
|
|
||||||
@else
|
|
||||||
@include('pages/list-item', ['page' => $childElement])
|
|
||||||
@endif
|
|
||||||
<hr>
|
|
||||||
@endforeach
|
|
||||||
@else
|
|
||||||
<p class="text-muted">{{ trans('entities.books_empty_contents') }}</p>
|
|
||||||
<p>
|
|
||||||
@if(userCan('page-create', $book))
|
|
||||||
<a href="{{ $book->getUrl('/page/create') }}" class="text-page"><i class="zmdi zmdi-file-text"></i>{{ trans('entities.books_empty_create_page') }}</a>
|
|
||||||
@endif
|
|
||||||
@if(userCan('page-create', $book) && userCan('chapter-create', $book))
|
|
||||||
<em class="text-muted">-{{ trans('entities.books_empty_or') }}-</em>
|
|
||||||
@endif
|
|
||||||
@if(userCan('chapter-create', $book))
|
|
||||||
<a href="{{ $book->getUrl('/chapter/create') }}" class="text-chapter"><i class="zmdi zmdi-collection-bookmark"></i>{{ trans('entities.books_empty_add_chapter') }}</a>
|
|
||||||
@endif
|
|
||||||
</p>
|
|
||||||
<hr>
|
|
||||||
@endif
|
|
||||||
@include('partials.entity-meta', ['entity' => $book])
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="search-results" v-cloak v-show="searching">
|
|
||||||
<h3 class="text-muted">{{ trans('entities.search_results') }} <a v-if="searching" v-on:click="clearSearch()" class="text-small"><i class="zmdi zmdi-close"></i>{{ trans('entities.search_clear') }}</a></h3>
|
|
||||||
<div v-if="!searchResults">
|
|
||||||
@include('partials/loading-icon')
|
|
||||||
</div>
|
|
||||||
<div v-html="searchResults"></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
<div class="col-md-4 col-md-offset-1">
|
@if(count($activity) > 0)
|
||||||
<div class="margin-top large"></div>
|
<div class="activity card">
|
||||||
|
<h3><i class="zmdi zmdi-time"></i> {{ trans('entities.recent_activity') }}</h3>
|
||||||
|
<div class="body">
|
||||||
|
@include('partials/activity-list', ['activity' => $activity])
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
@if($book->restricted)
|
<div class="card">
|
||||||
<p class="text-muted">
|
<h3><i class="zmdi zmdi-info-outline"></i> {{ trans('common.details') }}</h3>
|
||||||
@if(userCan('restrictions-manage', $book))
|
<div class="body">
|
||||||
<a href="{{ $book->getUrl('/permissions') }}"><i class="zmdi zmdi-lock-outline"></i>{{ trans('entities.books_permissions_active') }}</a>
|
@include('partials.entity-meta', ['entity' => $book])
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@stop
|
||||||
|
|
||||||
|
@section('container-attrs')
|
||||||
|
id="entity-dashboard"
|
||||||
|
entity-id="{{ $book->id }}"
|
||||||
|
entity-type="book"
|
||||||
|
@stop
|
||||||
|
|
||||||
|
@section('body')
|
||||||
|
|
||||||
|
<div ng-non-bindable class="container small">
|
||||||
|
<h1>{{$book->name}}</h1>
|
||||||
|
<div class="book-content" v-show="!searching">
|
||||||
|
<p class="text-muted" v-pre>{!! nl2br(e($book->description)) !!}</p>
|
||||||
|
|
||||||
|
<div class="page-list" v-pre>
|
||||||
|
<hr>
|
||||||
|
@if(count($bookChildren) > 0)
|
||||||
|
@foreach($bookChildren as $childElement)
|
||||||
|
@if($childElement->isA('chapter'))
|
||||||
|
@include('chapters/list-item', ['chapter' => $childElement])
|
||||||
@else
|
@else
|
||||||
<i class="zmdi zmdi-lock-outline"></i>{{ trans('entities.books_permissions_active') }}
|
@include('pages/list-item', ['page' => $childElement])
|
||||||
|
@endif
|
||||||
|
<hr>
|
||||||
|
@endforeach
|
||||||
|
@else
|
||||||
|
<p class="text-muted">{{ trans('entities.books_empty_contents') }}</p>
|
||||||
|
<p>
|
||||||
|
@if(userCan('page-create', $book))
|
||||||
|
<a href="{{ $book->getUrl('/page/create') }}" class="text-page"><i class="zmdi zmdi-file-text"></i>{{ trans('entities.books_empty_create_page') }}</a>
|
||||||
|
@endif
|
||||||
|
@if(userCan('page-create', $book) && userCan('chapter-create', $book))
|
||||||
|
<em class="text-muted">-{{ trans('entities.books_empty_or') }}-</em>
|
||||||
|
@endif
|
||||||
|
@if(userCan('chapter-create', $book))
|
||||||
|
<a href="{{ $book->getUrl('/chapter/create') }}" class="text-chapter"><i class="zmdi zmdi-collection-bookmark"></i>{{ trans('entities.books_empty_add_chapter') }}</a>
|
||||||
@endif
|
@endif
|
||||||
</p>
|
</p>
|
||||||
|
<hr>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
<form v-on:submit.prevent="searchBook" class="search-box">
|
|
||||||
<input v-model="searchTerm" v-on:change="checkSearchForm()" type="text" name="term" placeholder="{{ trans('entities.books_search_this') }}">
|
|
||||||
<button type="submit"><i class="zmdi zmdi-search"></i></button>
|
|
||||||
<button v-if="searching" v-cloak class="text-neg" v-on:click="clearSearch()" type="button"><i class="zmdi zmdi-close"></i></button>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
<div class="activity">
|
|
||||||
<h3>{{ trans('entities.recent_activity') }}</h3>
|
|
||||||
@include('partials/activity-list', ['activity' => Activity::entityActivity($book, 20, 0)])
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="search-results" v-cloak v-show="searching">
|
||||||
|
<h3 class="text-muted">{{ trans('entities.search_results') }} <a v-if="searching" v-on:click="clearSearch()" class="text-small"><i class="zmdi zmdi-close"></i>{{ trans('entities.search_clear') }}</a></h3>
|
||||||
|
<div v-if="!searchResults">
|
||||||
|
@include('partials/loading-icon')
|
||||||
|
</div>
|
||||||
|
<div v-html="searchResults"></div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@stop
|
@stop
|
||||||
|
@ -1,15 +1,11 @@
|
|||||||
@extends('base')
|
@extends('sidebar-layout')
|
||||||
|
|
||||||
@section('content')
|
@section('toolbar')
|
||||||
|
<div class="col-sm-6 col-xs-3 faded" ng-non-bindable>
|
||||||
<div class="faded-small toolbar">
|
@include('chapters._breadcrumbs', ['chapter' => $chapter])
|
||||||
<div class="container">
|
</div>
|
||||||
<div class="row">
|
<div class="col-sm-6 col-xs-9 faded">
|
||||||
<div class="col-sm-6 col-xs-3 faded" ng-non-bindable>
|
<div class="action-buttons">
|
||||||
@include('chapters._breadcrumbs', ['chapter' => $chapter])
|
|
||||||
</div>
|
|
||||||
<div class="col-sm-6 col-xs-9 faded">
|
|
||||||
<div class="action-buttons">
|
|
||||||
<span dropdown class="dropdown-container">
|
<span dropdown class="dropdown-container">
|
||||||
<div dropdown-toggle class="text-button text-primary"><i class="zmdi zmdi-open-in-new"></i>{{ trans('entities.export') }}</div>
|
<div dropdown-toggle class="text-button text-primary"><i class="zmdi zmdi-open-in-new"></i>{{ trans('entities.export') }}</div>
|
||||||
<ul class="wide">
|
<ul class="wide">
|
||||||
@ -18,116 +14,126 @@
|
|||||||
<li><a href="{{ $chapter->getUrl('/export/plaintext') }}" target="_blank">{{ trans('entities.export_text') }} <span class="text-muted float right">.txt</span></a></li>
|
<li><a href="{{ $chapter->getUrl('/export/plaintext') }}" target="_blank">{{ trans('entities.export_text') }} <span class="text-muted float right">.txt</span></a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</span>
|
</span>
|
||||||
@if(userCan('page-create', $chapter))
|
@if(userCan('page-create', $chapter))
|
||||||
<a href="{{ $chapter->getUrl('/create-page') }}" class="text-pos text-button"><i class="zmdi zmdi-plus"></i>{{ trans('entities.pages_new') }}</a>
|
<a href="{{ $chapter->getUrl('/create-page') }}" class="text-pos text-button"><i class="zmdi zmdi-plus"></i>{{ trans('entities.pages_new') }}</a>
|
||||||
@endif
|
@endif
|
||||||
|
@if(userCan('chapter-update', $chapter))
|
||||||
|
<a href="{{ $chapter->getUrl('/edit') }}" class="text-primary text-button"><i class="zmdi zmdi-edit"></i>{{ trans('common.edit') }}</a>
|
||||||
|
@endif
|
||||||
|
@if(userCan('chapter-update', $chapter) || userCan('restrictions-manage', $chapter) || userCan('chapter-delete', $chapter))
|
||||||
|
<div dropdown class="dropdown-container">
|
||||||
|
<a dropdown-toggle class="text-primary text-button"><i class="zmdi zmdi-more-vert"></i> {{ trans('common.more') }}</a>
|
||||||
|
<ul>
|
||||||
@if(userCan('chapter-update', $chapter))
|
@if(userCan('chapter-update', $chapter))
|
||||||
<a href="{{ $chapter->getUrl('/edit') }}" class="text-primary text-button"><i class="zmdi zmdi-edit"></i>{{ trans('common.edit') }}</a>
|
<li><a href="{{ $chapter->getUrl('/move') }}" class="text-primary"><i class="zmdi zmdi-folder"></i>{{ trans('common.move') }}</a></li>
|
||||||
@endif
|
@endif
|
||||||
@if(userCan('chapter-update', $chapter) || userCan('restrictions-manage', $chapter) || userCan('chapter-delete', $chapter))
|
@if(userCan('restrictions-manage', $chapter))
|
||||||
<div dropdown class="dropdown-container">
|
<li><a href="{{ $chapter->getUrl('/permissions') }}" class="text-primary"><i class="zmdi zmdi-lock-outline"></i>{{ trans('entities.permissions') }}</a></li>
|
||||||
<a dropdown-toggle class="text-primary text-button"><i class="zmdi zmdi-more-vert"></i></a>
|
|
||||||
<ul>
|
|
||||||
@if(userCan('chapter-update', $chapter))
|
|
||||||
<li><a href="{{ $chapter->getUrl('/move') }}" class="text-primary"><i class="zmdi zmdi-folder"></i>{{ trans('common.move') }}</a></li>
|
|
||||||
@endif
|
|
||||||
@if(userCan('restrictions-manage', $chapter))
|
|
||||||
<li><a href="{{ $chapter->getUrl('/permissions') }}" class="text-primary"><i class="zmdi zmdi-lock-outline"></i>{{ trans('entities.permissions') }}</a></li>
|
|
||||||
@endif
|
|
||||||
@if(userCan('chapter-delete', $chapter))
|
|
||||||
<li><a href="{{ $chapter->getUrl('/delete') }}" class="text-neg"><i class="zmdi zmdi-delete"></i>{{ trans('common.delete') }}</a></li>
|
|
||||||
@endif
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
@endif
|
@endif
|
||||||
</div>
|
@if(userCan('chapter-delete', $chapter))
|
||||||
|
<li><a href="{{ $chapter->getUrl('/delete') }}" class="text-neg"><i class="zmdi zmdi-delete"></i>{{ trans('common.delete') }}</a></li>
|
||||||
|
@endif
|
||||||
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
@endif
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@stop
|
||||||
|
|
||||||
|
@section('container-attrs')
|
||||||
|
id="entity-dashboard"
|
||||||
|
entity-id="{{ $chapter->id }}"
|
||||||
|
entity-type="chapter"
|
||||||
|
@stop
|
||||||
|
|
||||||
|
@section('sidebar')
|
||||||
|
<div class="card">
|
||||||
|
<div class="body">
|
||||||
|
<form @submit.prevent="searchBook" class="search-box">
|
||||||
|
<input v-model="searchTerm" @change="checkSearchForm()" type="text" name="term" placeholder="{{ trans('entities.chapters_search_this') }}">
|
||||||
|
<button type="submit"><i class="zmdi zmdi-search"></i></button>
|
||||||
|
<button v-if="searching" v-cloak class="text-neg" @click="clearSearch()" type="button"><i class="zmdi zmdi-close"></i></button>
|
||||||
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@if($book->restricted || $chapter->restricted)
|
||||||
<div class="container" id="entity-dashboard" ng-non-bindable entity-id="{{ $chapter->id }}" entity-type="chapter">
|
<div class="card">
|
||||||
<div class="row">
|
<h3><i class="zmdi zmdi-key"></i> {{ trans('entities.permissions') }}</h3>
|
||||||
<div class="col-md-7">
|
<div class="body">
|
||||||
<h1>{{ $chapter->name }}</h1>
|
@if($book->restricted)
|
||||||
<div class="chapter-content" v-show="!searching">
|
<p class="text-muted">
|
||||||
<p class="text-muted">{!! nl2br(e($chapter->description)) !!}</p>
|
@if(userCan('restrictions-manage', $book))
|
||||||
|
<a href="{{ $book->getUrl('/permissions') }}"><i class="zmdi zmdi-lock-outline"></i>{{ trans('entities.books_permissions_active') }}</a>
|
||||||
@if(count($pages) > 0)
|
@else
|
||||||
<div class="page-list">
|
<i class="zmdi zmdi-lock-outline"></i>{{ trans('entities.books_permissions_active') }}
|
||||||
<hr>
|
|
||||||
@foreach($pages as $page)
|
|
||||||
@include('pages/list-item', ['page' => $page])
|
|
||||||
<hr>
|
|
||||||
@endforeach
|
|
||||||
</div>
|
|
||||||
@else
|
|
||||||
<hr>
|
|
||||||
<p class="text-muted">{{ trans('entities.chapters_empty') }}</p>
|
|
||||||
<p>
|
|
||||||
@if(userCan('page-create', $chapter))
|
|
||||||
<a href="{{ $chapter->getUrl('/create-page') }}" class="text-page"><i class="zmdi zmdi-file-text"></i>{{ trans('entities.books_empty_create_page') }}</a>
|
|
||||||
@endif
|
|
||||||
@if(userCan('page-create', $chapter) && userCan('book-update', $book))
|
|
||||||
<em class="text-muted">-{{ trans('entities.books_empty_or') }}-</em>
|
|
||||||
@endif
|
|
||||||
@if(userCan('book-update', $book))
|
|
||||||
<a href="{{ $book->getUrl('/sort') }}" class="text-book"><i class="zmdi zmdi-book"></i>{{ trans('entities.books_empty_sort_current_book') }}</a>
|
|
||||||
@endif
|
|
||||||
</p>
|
|
||||||
<hr>
|
|
||||||
@endif
|
|
||||||
|
|
||||||
@include('partials.entity-meta', ['entity' => $chapter])
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="search-results" v-cloak v-show="searching">
|
|
||||||
<h3 class="text-muted">{{ trans('entities.search_results') }} <a v-if="searching" v-on:click="clearSearch()" class="text-small"><i class="zmdi zmdi-close"></i>{{ trans('entities.search_clear') }}</a></h3>
|
|
||||||
<div v-if="!searchResults">
|
|
||||||
@include('partials/loading-icon')
|
|
||||||
</div>
|
|
||||||
<div v-html="searchResults"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-4 col-md-offset-1">
|
|
||||||
<div class="margin-top large"></div>
|
|
||||||
@if($book->restricted || $chapter->restricted)
|
|
||||||
<div class="text-muted">
|
|
||||||
|
|
||||||
@if($book->restricted)
|
|
||||||
<p class="text-muted">
|
|
||||||
@if(userCan('restrictions-manage', $book))
|
|
||||||
<a href="{{ $book->getUrl('/permissions') }}"><i class="zmdi zmdi-lock-outline"></i>{{ trans('entities.books_permissions_active') }}</a>
|
|
||||||
@else
|
|
||||||
<i class="zmdi zmdi-lock-outline"></i>{{ trans('entities.books_permissions_active') }}
|
|
||||||
@endif
|
|
||||||
</p>
|
|
||||||
@endif
|
@endif
|
||||||
|
</p>
|
||||||
@if($chapter->restricted)
|
|
||||||
@if(userCan('restrictions-manage', $chapter))
|
|
||||||
<a href="{{ $chapter->getUrl('/permissions') }}"><i class="zmdi zmdi-lock-outline"></i>{{ trans('entities.chapters_permissions_active') }}</a>
|
|
||||||
@else
|
|
||||||
<i class="zmdi zmdi-lock-outline"></i>{{ trans('entities.chapters_permissions_active') }}
|
|
||||||
@endif
|
|
||||||
@endif
|
|
||||||
</div>
|
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
<form v-on:submit.prevent="searchBook" class="search-box">
|
@if($chapter->restricted)
|
||||||
<input v-model="searchTerm" v-on:change="checkSearchForm()" type="text" name="term" placeholder="{{ trans('entities.chapters_search_this') }}">
|
<p class="text-muted">
|
||||||
<button type="submit"><i class="zmdi zmdi-search"></i></button>
|
@if(userCan('restrictions-manage', $chapter))
|
||||||
<button v-if="searching" v-cloak class="text-neg" v-on:click="clearSearch()" type="button"><i class="zmdi zmdi-close"></i></button>
|
<a href="{{ $chapter->getUrl('/permissions') }}"><i class="zmdi zmdi-lock-outline"></i>{{ trans('entities.chapters_permissions_active') }}</a>
|
||||||
</form>
|
@else
|
||||||
|
<i class="zmdi zmdi-lock-outline"></i>{{ trans('entities.chapters_permissions_active') }}
|
||||||
@include('pages/sidebar-tree-list', ['book' => $book, 'sidebarTree' => $sidebarTree])
|
@endif
|
||||||
|
</p>
|
||||||
|
@endif
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
<div class="card">
|
||||||
|
<h3><i class="zmdi zmdi-info-outline"></i> {{ trans('common.details') }}</h3>
|
||||||
|
<div class="body">
|
||||||
|
@include('partials.entity-meta', ['entity' => $chapter])
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@include('pages/sidebar-tree-list', ['book' => $book, 'sidebarTree' => $sidebarTree])
|
||||||
|
@stop
|
||||||
|
|
||||||
|
@section('body')
|
||||||
|
|
||||||
|
<div class="container small" ng-non-bindable >
|
||||||
|
<h1>{{ $chapter->name }}</h1>
|
||||||
|
<div class="chapter-content" v-show="!searching">
|
||||||
|
<p class="text-muted">{!! nl2br(e($chapter->description)) !!}</p>
|
||||||
|
|
||||||
|
@if(count($pages) > 0)
|
||||||
|
<div class="page-list">
|
||||||
|
<hr>
|
||||||
|
@foreach($pages as $page)
|
||||||
|
@include('pages/list-item', ['page' => $page])
|
||||||
|
<hr>
|
||||||
|
@endforeach
|
||||||
|
</div>
|
||||||
|
@else
|
||||||
|
<hr>
|
||||||
|
<p class="text-muted">{{ trans('entities.chapters_empty') }}</p>
|
||||||
|
<p>
|
||||||
|
@if(userCan('page-create', $chapter))
|
||||||
|
<a href="{{ $chapter->getUrl('/create-page') }}" class="text-page"><i class="zmdi zmdi-file-text"></i>{{ trans('entities.books_empty_create_page') }}</a>
|
||||||
|
@endif
|
||||||
|
@if(userCan('page-create', $chapter) && userCan('book-update', $book))
|
||||||
|
<em class="text-muted">-{{ trans('entities.books_empty_or') }}-</em>
|
||||||
|
@endif
|
||||||
|
@if(userCan('book-update', $book))
|
||||||
|
<a href="{{ $book->getUrl('/sort') }}" class="text-book"><i class="zmdi zmdi-book"></i>{{ trans('entities.books_empty_sort_current_book') }}</a>
|
||||||
|
@endif
|
||||||
|
</p>
|
||||||
|
<hr>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="search-results" v-cloak v-show="searching">
|
||||||
|
<h3 class="text-muted">{{ trans('entities.search_results') }} <a v-if="searching" @click="clearSearch()" class="text-small"><i class="zmdi zmdi-close"></i>{{ trans('entities.search_clear') }}</a></h3>
|
||||||
|
<div v-if="!searchResults">
|
||||||
|
@include('partials/loading-icon')
|
||||||
|
</div>
|
||||||
|
<div v-html="searchResults"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
@stop
|
@stop
|
||||||
|
@ -1,64 +1,56 @@
|
|||||||
@extends('base')
|
@extends('simple-layout')
|
||||||
|
|
||||||
@section('content')
|
@section('toolbar')
|
||||||
|
<div class="col-sm-6 faded">
|
||||||
<div class="faded-small toolbar">
|
<div class="action-buttons text-left">
|
||||||
<div class="container">
|
<a expand-toggle=".entity-list.compact .entity-item-snippet" class="text-primary text-button"><i class="zmdi zmdi-wrap-text"></i>{{ trans('common.toggle_details') }}</a>
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-6 faded">
|
|
||||||
<div class="action-buttons text-left">
|
|
||||||
<a expand-toggle=".entity-list.compact .entity-item-snippet" class="text-primary text-button"><i class="zmdi zmdi-wrap-text"></i>{{ trans('common.toggle_details') }}</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@stop
|
||||||
|
|
||||||
|
@section('body')
|
||||||
|
|
||||||
<div class="container" ng-non-bindable>
|
<div class="container" ng-non-bindable>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
<div class="col-sm-4">
|
<div class="col-sm-4">
|
||||||
<div id="recent-drafts">
|
@if(count($draftPages) > 0)
|
||||||
@if(count($draftPages) > 0)
|
<div id="recent-drafts" class="card">
|
||||||
<h4>{{ trans('entities.my_recent_drafts') }}</h4>
|
<h3>{{ trans('entities.my_recent_drafts') }}</h3>
|
||||||
@include('partials/entity-list', ['entities' => $draftPages, 'style' => 'compact'])
|
@include('partials/entity-list', ['entities' => $draftPages, 'style' => 'compact'])
|
||||||
@endif
|
</div>
|
||||||
</div>
|
|
||||||
@if($signedIn)
|
|
||||||
<h4>{{ trans('entities.my_recently_viewed') }}</h4>
|
|
||||||
@else
|
|
||||||
<h4>{{ trans('entities.books_recent') }}</h4>
|
|
||||||
@endif
|
@endif
|
||||||
@include('partials/entity-list', [
|
|
||||||
'entities' => $recents,
|
<div class="card">
|
||||||
'style' => 'compact',
|
<h3>{{ trans('entities.' . ($signedIn ? 'my_recently_viewed' : 'books_recent')) }}</h3>
|
||||||
'emptyText' => $signedIn ? trans('entities.no_pages_viewed') : trans('entities.books_empty')
|
@include('partials/entity-list', [
|
||||||
])
|
'entities' => $recents,
|
||||||
|
'style' => 'compact',
|
||||||
|
'emptyText' => $signedIn ? trans('entities.no_pages_viewed') : trans('entities.books_empty')
|
||||||
|
])
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-sm-4">
|
<div class="col-sm-4">
|
||||||
<h4><a class="no-color" href="{{ baseUrl("/pages/recently-created") }}">{{ trans('entities.recently_created_pages') }}</a></h4>
|
<div class="card">
|
||||||
<div id="recently-created-pages">
|
<h3><a class="no-color" href="{{ baseUrl("/pages/recently-updated") }}">{{ trans('entities.recently_updated_pages') }}</a></h3>
|
||||||
@include('partials/entity-list', [
|
<div id="recently-updated-pages">
|
||||||
'entities' => $recentlyCreatedPages,
|
@include('partials/entity-list', [
|
||||||
'style' => 'compact',
|
'entities' => $recentlyUpdatedPages,
|
||||||
'emptyText' => trans('entities.no_pages_recently_created')
|
'style' => 'compact',
|
||||||
])
|
'emptyText' => trans('entities.no_pages_recently_updated')
|
||||||
</div>
|
])
|
||||||
|
</div>
|
||||||
<h4><a class="no-color" href="{{ baseUrl("/pages/recently-updated") }}">{{ trans('entities.recently_updated_pages') }}</a></h4>
|
|
||||||
<div id="recently-updated-pages">
|
|
||||||
@include('partials/entity-list', [
|
|
||||||
'entities' => $recentlyUpdatedPages,
|
|
||||||
'style' => 'compact',
|
|
||||||
'emptyText' => trans('entities.no_pages_recently_updated')
|
|
||||||
])
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-sm-4" id="recent-activity">
|
<div class="col-sm-4" id="recent-activity">
|
||||||
<h4>{{ trans('entities.recent_activity') }}</h4>
|
<div class="card">
|
||||||
@include('partials/activity-list', ['activity' => $activity])
|
<h3>{{ trans('entities.recent_activity') }}</h3>
|
||||||
|
<div class="body">
|
||||||
|
@include('partials/activity-list', ['activity' => $activity])
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -6,14 +6,14 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-sm-4 col-xs-7 faded">
|
<div class="col-sm-4 col-xs-7 faded">
|
||||||
<div class="action-buttons">
|
<div class="action-buttons">
|
||||||
<span dropdown class="dropdown-container">
|
<span dropdown class="dropdown-container">
|
||||||
<div dropdown-toggle class="text-button text-primary"><i class="zmdi zmdi-open-in-new"></i>{{ trans('entities.export') }}</div>
|
<div dropdown-toggle class="text-button text-primary"><i class="zmdi zmdi-open-in-new"></i>{{ trans('entities.export') }}</div>
|
||||||
<ul class="wide">
|
<ul class="wide">
|
||||||
<li><a href="{{ $page->getUrl('/export/html') }}" target="_blank">{{ trans('entities.export_html') }} <span class="text-muted float right">.html</span></a></li>
|
<li><a href="{{ $page->getUrl('/export/html') }}" target="_blank">{{ trans('entities.export_html') }} <span class="text-muted float right">.html</span></a></li>
|
||||||
<li><a href="{{ $page->getUrl('/export/pdf') }}" target="_blank">{{ trans('entities.export_pdf') }} <span class="text-muted float right">.pdf</span></a></li>
|
<li><a href="{{ $page->getUrl('/export/pdf') }}" target="_blank">{{ trans('entities.export_pdf') }} <span class="text-muted float right">.pdf</span></a></li>
|
||||||
<li><a href="{{ $page->getUrl('/export/plaintext') }}" target="_blank">{{ trans('entities.export_text') }} <span class="text-muted float right">.txt</span></a></li>
|
<li><a href="{{ $page->getUrl('/export/plaintext') }}" target="_blank">{{ trans('entities.export_text') }} <span class="text-muted float right">.txt</span></a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</span>
|
</span>
|
||||||
@if(userCan('page-update', $page))
|
@if(userCan('page-update', $page))
|
||||||
<a href="{{ $page->getUrl('/edit') }}" class="text-primary text-button" ><i class="zmdi zmdi-edit"></i>{{ trans('common.edit') }}</a>
|
<a href="{{ $page->getUrl('/edit') }}" class="text-primary text-button" ><i class="zmdi zmdi-edit"></i>{{ trans('common.edit') }}</a>
|
||||||
@endif
|
@endif
|
||||||
@ -41,38 +41,50 @@
|
|||||||
|
|
||||||
@section('sidebar')
|
@section('sidebar')
|
||||||
@if($book->restricted || ($page->chapter && $page->chapter->restricted) || $page->restricted)
|
@if($book->restricted || ($page->chapter && $page->chapter->restricted) || $page->restricted)
|
||||||
<div class="text-muted">
|
<div class="card">
|
||||||
|
<h3><i class="zmdi zmdi-key"></i> {{ trans('entities.permissions') }}</h3>
|
||||||
|
<div class="body">
|
||||||
|
<div class="text-muted">
|
||||||
|
|
||||||
@if($book->restricted)
|
@if($book->restricted)
|
||||||
@if(userCan('restrictions-manage', $book))
|
@if(userCan('restrictions-manage', $book))
|
||||||
<a href="{{ $book->getUrl('/permissions') }}"><i class="zmdi zmdi-lock-outline"></i>{{ trans('entities.books_permissions_active') }}</a>
|
<a href="{{ $book->getUrl('/permissions') }}"><i class="zmdi zmdi-lock-outline"></i>{{ trans('entities.books_permissions_active') }}</a>
|
||||||
@else
|
@else
|
||||||
<i class="zmdi zmdi-lock-outline"></i>{{ trans('entities.books_permissions_active') }}
|
<i class="zmdi zmdi-lock-outline"></i>{{ trans('entities.books_permissions_active') }}
|
||||||
@endif
|
@endif
|
||||||
<br>
|
<br>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
@if($page->chapter && $page->chapter->restricted)
|
@if($page->chapter && $page->chapter->restricted)
|
||||||
@if(userCan('restrictions-manage', $page->chapter))
|
@if(userCan('restrictions-manage', $page->chapter))
|
||||||
<a href="{{ $page->chapter->getUrl('/permissions') }}"><i class="zmdi zmdi-lock-outline"></i>{{ trans('entities.chapters_permissions_active') }}</a>
|
<a href="{{ $page->chapter->getUrl('/permissions') }}"><i class="zmdi zmdi-lock-outline"></i>{{ trans('entities.chapters_permissions_active') }}</a>
|
||||||
@else
|
@else
|
||||||
<i class="zmdi zmdi-lock-outline"></i>{{ trans('entities.chapters_permissions_active') }}
|
<i class="zmdi zmdi-lock-outline"></i>{{ trans('entities.chapters_permissions_active') }}
|
||||||
@endif
|
@endif
|
||||||
<br>
|
<br>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
@if($page->restricted)
|
@if($page->restricted)
|
||||||
@if(userCan('restrictions-manage', $page))
|
@if(userCan('restrictions-manage', $page))
|
||||||
<a href="{{ $page->getUrl('/permissions') }}"><i class="zmdi zmdi-lock-outline"></i>{{ trans('entities.pages_permissions_active') }}</a>
|
<a href="{{ $page->getUrl('/permissions') }}"><i class="zmdi zmdi-lock-outline"></i>{{ trans('entities.pages_permissions_active') }}</a>
|
||||||
@else
|
@else
|
||||||
<i class="zmdi zmdi-lock-outline"></i>{{ trans('entities.pages_permissions_active') }}
|
<i class="zmdi zmdi-lock-outline"></i>{{ trans('entities.pages_permissions_active') }}
|
||||||
@endif
|
@endif
|
||||||
<br>
|
<br>
|
||||||
@endif
|
@endif
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
@include('pages/sidebar-tree-list', ['book' => $book, 'sidebarTree' => $sidebarTree, 'pageNav' => $pageNav])
|
@include('pages/sidebar-tree-list', ['book' => $book, 'sidebarTree' => $sidebarTree, 'pageNav' => $pageNav])
|
||||||
|
|
||||||
|
<div class="card">
|
||||||
|
<h3><i class="zmdi zmdi-info-outline"></i> {{ trans('common.details') }}</h3>
|
||||||
|
<div class="body">
|
||||||
|
@include('partials.entity-meta', ['entity' => $book])
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@stop
|
@stop
|
||||||
|
|
||||||
@section('body')
|
@section('body')
|
||||||
@ -88,10 +100,6 @@
|
|||||||
|
|
||||||
@include('pages/page-display')
|
@include('pages/page-display')
|
||||||
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
@include('partials.entity-meta', ['entity' => $page])
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="container small">
|
<div class="container small">
|
||||||
@include('comments/comments', ['pageId' => $page->id])
|
@include('comments/comments', ['pageId' => $page->id])
|
||||||
|
@ -2,16 +2,18 @@
|
|||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
|
|
||||||
<div class="faded-small toolbar">
|
<div class="toolbar-container">
|
||||||
<div class="container fluid">
|
<div class="faded-small toolbar">
|
||||||
<div class="row">
|
<div class="container fluid">
|
||||||
@yield('toolbar')
|
<div class="row">
|
||||||
|
@yield('toolbar')
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="flex-fill flex">
|
<div class="flex-fill flex" @yield('container-attrs') >
|
||||||
|
|
||||||
<div class="sidebar flex print-hidden">
|
<div class="sidebar flex print-hidden">
|
||||||
<div class="scroll-body">
|
<div class="scroll-body">
|
||||||
@ -20,9 +22,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="content flex">
|
<div class="content flex">
|
||||||
<div class="scroll-body">
|
@yield('body')
|
||||||
@yield('body')
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
27
resources/views/simple-layout.blade.php
Normal file
27
resources/views/simple-layout.blade.php
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
@extends('base')
|
||||||
|
|
||||||
|
@section('body-class', 'shaded')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
|
||||||
|
<div class="toolbar-container">
|
||||||
|
<div class="faded-small toolbar">
|
||||||
|
<div class="container fluid">
|
||||||
|
<div class="row">
|
||||||
|
@yield('toolbar')
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="flex-fill flex">
|
||||||
|
<div class="content flex">
|
||||||
|
<div class="scroll-body">
|
||||||
|
@yield('body')
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
@stop
|
Loading…
Reference in New Issue
Block a user