mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-08-26 04:05:57 +00:00
Converted more views to new layout and made breadcrumbs more flexible
This commit is contained in:
parent
163a57cf70
commit
0efed43389
@ -281,7 +281,7 @@ class UserController extends Controller
|
|||||||
$viewType = 'list';
|
$viewType = 'list';
|
||||||
}
|
}
|
||||||
|
|
||||||
$user = $this->userRepo->getById($id);
|
$user = $this->userRepo->getById($userId);
|
||||||
$key = $listName . '_view_type';
|
$key = $listName . '_view_type';
|
||||||
setting()->putUser($user, $key, $viewType);
|
setting()->putUser($user, $key, $viewType);
|
||||||
|
|
||||||
|
@ -56,6 +56,7 @@ body.flexbox {
|
|||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
margin-bottom: $-xl;
|
margin-bottom: $-xl;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
|
min-height: 60vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tri-layout-container {
|
.tri-layout-container {
|
||||||
@ -63,8 +64,11 @@ body.flexbox {
|
|||||||
grid-template-columns: 1fr minmax(auto, 940px) 1fr;
|
grid-template-columns: 1fr minmax(auto, 940px) 1fr;
|
||||||
grid-template-areas: "a b c";
|
grid-template-areas: "a b c";
|
||||||
.tri-layout-right-contents, .tri-layout-left-contents {
|
.tri-layout-right-contents, .tri-layout-left-contents {
|
||||||
padding-right: $-xl;
|
padding-right: 3vw;
|
||||||
padding-left: $-xl;
|
padding-left: 3vw;
|
||||||
|
max-width: 460px;
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
}
|
}
|
||||||
.tri-layout-right {
|
.tri-layout-right {
|
||||||
grid-area: c;
|
grid-area: c;
|
||||||
@ -113,7 +117,7 @@ body.flexbox {
|
|||||||
padding-left: $-m;
|
padding-left: $-m;
|
||||||
padding-right: $-m;
|
padding-right: $-m;
|
||||||
}
|
}
|
||||||
.tri-layout-right, .tri-layout-left {
|
.tri-layout-right-contents > div, .tri-layout-left-contents > div {
|
||||||
opacity: 0.6;
|
opacity: 0.6;
|
||||||
z-index: 0;
|
z-index: 0;
|
||||||
}
|
}
|
||||||
@ -146,8 +150,8 @@ body.flexbox {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.tri-layout-left, .tri-layout-right {
|
.tri-layout-left-contents > div, .tri-layout-right-contents > div {
|
||||||
opacity: 0.7;
|
opacity: 0.6;
|
||||||
transition: opacity ease-in-out 120ms;
|
transition: opacity ease-in-out 120ms;
|
||||||
&:hover {
|
&:hover {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
|
@ -1,63 +1,17 @@
|
|||||||
.page-list {
|
|
||||||
h4 {
|
.book-contents .entity-list-item {
|
||||||
margin: $-l 0 $-xs 0;
|
.icon {
|
||||||
font-size: 1.666em;
|
margin-top: $-xs;
|
||||||
}
|
}
|
||||||
a.chapter {
|
p {
|
||||||
color: $color-chapter;
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
.inner-page {
|
||||||
|
padding-top: 0;
|
||||||
|
padding-bottom: 0;
|
||||||
}
|
}
|
||||||
.inset-list {
|
.inset-list {
|
||||||
display: none;
|
display: none;
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
h5 {
|
|
||||||
display: block;
|
|
||||||
margin: $-s 0 0 0;
|
|
||||||
border-left: 5px solid $color-page;
|
|
||||||
padding: $-xs 0 $-xs $-m;
|
|
||||||
font-size: 1.1em;
|
|
||||||
font-weight: normal;
|
|
||||||
&.draft {
|
|
||||||
border-left-color: $color-page-draft;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.entity-list-item {
|
|
||||||
margin-bottom: $-m;
|
|
||||||
}
|
|
||||||
hr {
|
|
||||||
margin-top: 0;
|
|
||||||
}
|
|
||||||
.page, .chapter, .book {
|
|
||||||
padding-left: $-l;
|
|
||||||
}
|
|
||||||
.page {
|
|
||||||
border-left: 5px solid $color-page;
|
|
||||||
}
|
|
||||||
.page.draft {
|
|
||||||
border-left: 5px solid $color-page-draft;
|
|
||||||
.text-page {
|
|
||||||
color: $color-page-draft;
|
|
||||||
fill: $color-page-draft;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.chapter {
|
|
||||||
border-left: 5px solid $color-chapter;
|
|
||||||
}
|
|
||||||
.book {
|
|
||||||
border-left: 5px solid $color-book;
|
|
||||||
}
|
|
||||||
.meta {
|
|
||||||
margin-top: -$-m;
|
|
||||||
font-size: 0.95em;
|
|
||||||
}
|
|
||||||
.meta span {
|
|
||||||
margin-right: $-s;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@include smaller-than($s) {
|
|
||||||
.page-list h4 {
|
|
||||||
font-size: 1.333em;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -205,7 +159,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.activity-list-item {
|
.activity-list-item {
|
||||||
padding: $-s $-m;
|
padding: $-s 0;
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: min-content 1fr;
|
grid-template-columns: min-content 1fr;
|
||||||
grid-column-gap: $-m;
|
grid-column-gap: $-m;
|
||||||
@ -213,6 +167,9 @@
|
|||||||
fill: #888;
|
fill: #888;
|
||||||
font-size: 0.9em;
|
font-size: 0.9em;
|
||||||
}
|
}
|
||||||
|
.card .activity-list-item {
|
||||||
|
padding: $-s $-m;
|
||||||
|
}
|
||||||
|
|
||||||
ul.pagination {
|
ul.pagination {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
@ -298,9 +255,12 @@ ul.pagination {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.card a.entity-list-item:hover {
|
.card .entity-list-item:hover {
|
||||||
background-color: #F2F2F2;
|
background-color: #F2F2F2;
|
||||||
}
|
}
|
||||||
|
.card .entity-list-item .entity-list-item:hover {
|
||||||
|
background-color: #EEEEEE;
|
||||||
|
}
|
||||||
|
|
||||||
.entity-list-item-image {
|
.entity-list-item-image {
|
||||||
width: 140px;
|
width: 140px;
|
||||||
|
@ -2,14 +2,11 @@
|
|||||||
|
|
||||||
@section('body')
|
@section('body')
|
||||||
<div class="container small">
|
<div class="container small">
|
||||||
<div class="breadcrumbs my-l">
|
<div class="my-l">
|
||||||
<a href="{{ baseUrl('/books') }}" class="">
|
@include('partials.breadcrumbs', ['crumbs' => [
|
||||||
@icon('book'){{ trans('entities.books') }}
|
'/books' => trans('entities.books'),
|
||||||
</a>
|
'/create-book' => trans('entities.books_create')
|
||||||
<div class="separator">@icon('chevron-right')</div>
|
]])
|
||||||
<a href="{{ baseUrl('/create-book') }}" class="">
|
|
||||||
@icon('add'){{ trans('entities.books_create') }}
|
|
||||||
</a>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="content-wrap card">
|
<div class="content-wrap card">
|
||||||
|
@ -1,24 +1,24 @@
|
|||||||
@extends('simple-layout')
|
@extends('simple-layout')
|
||||||
|
|
||||||
@section('toolbar')
|
|
||||||
<div class="col-sm-12 faded">
|
|
||||||
@include('books._breadcrumbs', ['book' => $book])
|
|
||||||
</div>
|
|
||||||
@stop
|
|
||||||
|
|
||||||
@section('body')
|
@section('body')
|
||||||
|
|
||||||
<div class="container small">
|
<div class="container small">
|
||||||
<p> </p>
|
|
||||||
<div class="card">
|
<div class="my-l">
|
||||||
<h3>@icon('edit') {{ trans('entities.books_edit') }}</h3>
|
@include('partials.breadcrumbs', ['crumbs' => [
|
||||||
<div class="body">
|
$book,
|
||||||
<form action="{{ $book->getUrl() }}" method="POST">
|
$book->getUrl() => trans('entities.books_edit')
|
||||||
<input type="hidden" name="_method" value="PUT">
|
]])
|
||||||
@include('books/form', ['model' => $book])
|
</div>
|
||||||
</form>
|
|
||||||
</div>
|
<div class="content-wrap card">
|
||||||
|
<h1 class="list-heading">{{ trans('entities.books_edit') }}</h1>
|
||||||
|
<form action="{{ $book->getUrl() }}" method="POST">
|
||||||
|
<input type="hidden" name="_method" value="PUT">
|
||||||
|
@include('books/form', ['model' => $book])
|
||||||
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@include('components.image-manager', ['imageType' => 'cover'])
|
|
||||||
|
@include('components.image-manager', ['imageType' => 'cover'])
|
||||||
@stop
|
@stop
|
@ -36,7 +36,7 @@
|
|||||||
@section('right')
|
@section('right')
|
||||||
|
|
||||||
<div class="actions mb-xl">
|
<div class="actions mb-xl">
|
||||||
<h5>Actions</h5>
|
<h5>{{ trans('common.actions') }}</h5>
|
||||||
<div class="icon-list text-primary">
|
<div class="icon-list text-primary">
|
||||||
@if($currentUser->can('book-create-all'))
|
@if($currentUser->can('book-create-all'))
|
||||||
<a href="{{ baseUrl("/create-book") }}" class="icon-list-item">
|
<a href="{{ baseUrl("/create-book") }}" class="icon-list-item">
|
||||||
|
@ -1,67 +1,132 @@
|
|||||||
@extends('sidebar-layout')
|
@extends('tri-layout')
|
||||||
|
|
||||||
@section('toolbar')
|
@section('container-attrs')
|
||||||
<div class="col-sm-6 col-xs-1 faded">
|
id="entity-dashboard"
|
||||||
@include('books._breadcrumbs', ['book' => $book])
|
entity-id="{{ $book->id }}"
|
||||||
|
entity-type="book"
|
||||||
|
@stop
|
||||||
|
|
||||||
|
@section('body')
|
||||||
|
|
||||||
|
<div class="content-wrap card">
|
||||||
|
<h1 class="break-text" v-pre>{{$book->name}}</h1>
|
||||||
|
<div class="book-content" v-show="!searching">
|
||||||
|
<p class="text-muted" v-pre>{!! nl2br(e($book->description)) !!}</p>
|
||||||
|
@if(count($bookChildren) > 0)
|
||||||
|
<div class="entity-list book-contents" v-pre>
|
||||||
|
@foreach($bookChildren as $childElement)
|
||||||
|
@if($childElement->isA('chapter'))
|
||||||
|
@include('chapters.list-item', ['chapter' => $childElement])
|
||||||
|
@else
|
||||||
|
@include('pages.list-item', ['page' => $childElement])
|
||||||
|
@endif
|
||||||
|
@endforeach
|
||||||
|
</div>
|
||||||
|
@else
|
||||||
|
<div class="well">
|
||||||
|
{{--TODO--}}
|
||||||
|
<p class="text-muted italic">{{ trans('entities.books_empty_contents') }}</p>
|
||||||
|
@if(userCan('page-create', $book))
|
||||||
|
<a href="{{ $book->getUrl('/create-page') }}" class="button outline page">@icon('page'){{ 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('/create-chapter') }}" class="button outline chapter">@icon('chapter'){{ trans('entities.books_empty_add_chapter') }}</a>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="search-results" v-cloak v-show="searching">
|
||||||
|
{{--TODO--}}
|
||||||
|
<h3 class="text-muted">{{ trans('entities.search_results') }} <a v-if="searching" v-on:click="clearSearch()" class="text-small">@icon('close'){{ trans('entities.search_clear') }}</a></h3>
|
||||||
|
<div v-if="!searchResults">
|
||||||
|
@include('partials/loading-icon')
|
||||||
|
</div>
|
||||||
|
<div v-html="searchResults"></div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-6 col-xs-11">
|
|
||||||
<div class="action-buttons faded">
|
@stop
|
||||||
<span dropdown class="dropdown-container">
|
|
||||||
<div dropdown-toggle class="text-button text-primary">@icon('export'){{ trans('entities.export') }}</div>
|
|
||||||
|
@section('right')
|
||||||
|
|
||||||
|
<div class="actions mb-xl">
|
||||||
|
<h5>{{ trans('common.actions') }}</h5>
|
||||||
|
<div class="icon-list text-primary">
|
||||||
|
<div dropdown class="dropdown-container">
|
||||||
|
<div dropdown-toggle class="icon-list-item">
|
||||||
|
<span class="icon">@icon('export')</span>
|
||||||
|
<span>{{ trans('entities.export') }}</span>
|
||||||
|
</div>
|
||||||
<ul class="wide">
|
<ul class="wide">
|
||||||
<li><a href="{{ $book->getUrl('/export/html') }}" target="_blank">{{ trans('entities.export_html') }} <span class="text-muted float right">.html</span></a></li>
|
<li><a href="{{ $book->getUrl('/export/html') }}" target="_blank">{{ trans('entities.export_html') }} <span class="text-muted float right">.html</span></a></li>
|
||||||
<li><a href="{{ $book->getUrl('/export/pdf') }}" target="_blank">{{ trans('entities.export_pdf') }} <span class="text-muted float right">.pdf</span></a></li>
|
<li><a href="{{ $book->getUrl('/export/pdf') }}" target="_blank">{{ trans('entities.export_pdf') }} <span class="text-muted float right">.pdf</span></a></li>
|
||||||
<li><a href="{{ $book->getUrl('/export/plaintext') }}" target="_blank">{{ trans('entities.export_text') }} <span class="text-muted float right">.txt</span></a></li>
|
<li><a href="{{ $book->getUrl('/export/plaintext') }}" target="_blank">{{ trans('entities.export_text') }} <span class="text-muted float right">.txt</span></a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</span>
|
</div>
|
||||||
|
|
||||||
@if(userCan('page-create', $book))
|
@if(userCan('page-create', $book))
|
||||||
<a href="{{ $book->getUrl('/create-page') }}" class="text-pos text-button">@icon('add'){{ trans('entities.pages_new') }}</a>
|
<a href="{{ $book->getUrl('/create-page') }}" class="icon-list-item">
|
||||||
|
<span class="icon">@icon('add')</span>
|
||||||
|
<span>{{ trans('entities.pages_new') }}</span>
|
||||||
|
</a>
|
||||||
@endif
|
@endif
|
||||||
@if(userCan('chapter-create', $book))
|
@if(userCan('chapter-create', $book))
|
||||||
<a href="{{ $book->getUrl('/create-chapter') }}" class="text-pos text-button">@icon('add'){{ trans('entities.chapters_new') }}</a>
|
<a href="{{ $book->getUrl('/create-chapter') }}" class="icon-list-item">
|
||||||
|
<span class="icon">@icon('add')</span>
|
||||||
|
<span>{{ trans('entities.chapters_new') }}</span>
|
||||||
|
</a>
|
||||||
@endif
|
@endif
|
||||||
@if(userCan('book-update', $book) || userCan('restrictions-manage', $book) || userCan('book-delete', $book))
|
@if(userCan('book-update', $book))
|
||||||
<div dropdown class="dropdown-container">
|
<a href="{{ $book->getUrl('/edit') }}" class="icon-list-item">
|
||||||
<a dropdown-toggle class="text-primary text-button">@icon('more'){{ trans('common.more') }}</a>
|
<span class="icon">@icon('edit')</span>
|
||||||
<ul>
|
<span>{{ trans('common.edit') }}</span>
|
||||||
@if(userCan('book-update', $book))
|
</a>
|
||||||
<li><a href="{{ $book->getUrl('/edit') }}" class="text-primary">@icon('edit'){{ trans('common.edit') }}</a></li>
|
<a href="{{ $book->getUrl('/sort') }}" class="icon-list-item">
|
||||||
<li><a href="{{ $book->getUrl('/sort') }}" class="text-primary">@icon('sort'){{ trans('common.sort') }}</a></li>
|
<span class="icon">@icon('sort')</span>
|
||||||
@endif
|
<span>{{ trans('common.sort') }}</span>
|
||||||
@if(userCan('restrictions-manage', $book))
|
</a>
|
||||||
<li><a href="{{ $book->getUrl('/permissions') }}" class="text-primary">@icon('lock'){{ trans('entities.permissions') }}</a></li>
|
@endif
|
||||||
@endif
|
@if(userCan('restrictions-manage', $book))
|
||||||
@if(userCan('book-delete', $book))
|
<a href="{{ $book->getUrl('/permissions') }}" class="icon-list-item">
|
||||||
<li><a href="{{ $book->getUrl('/delete') }}" class="text-neg">@icon('delete'){{ trans('common.delete') }}</a></li>
|
<span class="icon">@icon('lock')</span>
|
||||||
@endif
|
<span>{{ trans('entities.permissions') }}</span>
|
||||||
</ul>
|
</a>
|
||||||
</div>
|
@endif
|
||||||
|
@if(userCan('book-delete', $book))
|
||||||
|
<a href="{{ $book->getUrl('/delete') }}" class="icon-list-item">
|
||||||
|
<span class="icon">@icon('delete')</span>
|
||||||
|
<span>{{ trans('common.delete') }}</span>
|
||||||
|
</a>
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@stop
|
@stop
|
||||||
|
|
||||||
@section('sidebar')
|
@section('left')
|
||||||
|
|
||||||
@if($book->tags->count() > 0)
|
@if($book->tags->count() > 0)
|
||||||
<section>
|
<div class="mb-xl">
|
||||||
@include('components.tag-list', ['entity' => $book])
|
@include('components.tag-list', ['entity' => $book])
|
||||||
</section>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
<div class="card">
|
<div class="mb-xl">
|
||||||
<div class="body">
|
<form v-on:submit.prevent="searchBook" class="search-box">
|
||||||
<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') }}">
|
||||||
<input v-model="searchTerm" v-on:change="checkSearchForm()" type="text" name="term" placeholder="{{ trans('entities.books_search_this') }}">
|
<button type="submit">@icon('search')</button>
|
||||||
<button type="submit">@icon('search')</button>
|
<button v-if="searching" v-cloak class="text-neg" v-on:click="clearSearch()" type="button">@icon('close')</button>
|
||||||
<button v-if="searching" v-cloak class="text-neg" v-on:click="clearSearch()" type="button">@icon('close')</button>
|
</form>
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="card entity-details">
|
<div class="mb-xl">
|
||||||
<h3>@icon('info') {{ trans('common.details') }}</h3>
|
<h5>{{ trans('common.details') }}</h5>
|
||||||
<div class="body text-small text-muted blended-links">
|
<div class="text-small text-muted blended-links">
|
||||||
@include('partials.entity-meta', ['entity' => $book])
|
@include('partials.entity-meta', ['entity' => $book])
|
||||||
@if($book->restricted)
|
@if($book->restricted)
|
||||||
<div class="active-restriction">
|
<div class="active-restriction">
|
||||||
@ -76,60 +141,10 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
@if(count($activity) > 0)
|
@if(count($activity) > 0)
|
||||||
<div class="activity card">
|
<div class="mb-xl">
|
||||||
<h3>@icon('time') {{ trans('entities.recent_activity') }}</h3>
|
<h5>{{ trans('entities.recent_activity') }}</h5>
|
||||||
@include('partials/activity-list', ['activity' => $activity])
|
@include('partials/activity-list', ['activity' => $activity])
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
@stop
|
@stop
|
||||||
|
|
||||||
@section('container-attrs')
|
|
||||||
id="entity-dashboard"
|
|
||||||
entity-id="{{ $book->id }}"
|
|
||||||
entity-type="book"
|
|
||||||
@stop
|
|
||||||
|
|
||||||
@section('body')
|
|
||||||
|
|
||||||
<div class="container small nopad">
|
|
||||||
<h1 class="break-text" v-pre>{{$book->name}}</h1>
|
|
||||||
<div class="book-content" v-show="!searching">
|
|
||||||
<p class="text-muted" v-pre>{!! nl2br(e($book->description)) !!}</p>
|
|
||||||
@if(count($bookChildren) > 0)
|
|
||||||
<div class="page-list" v-pre>
|
|
||||||
<hr>
|
|
||||||
@foreach($bookChildren as $childElement)
|
|
||||||
@if($childElement->isA('chapter'))
|
|
||||||
@include('chapters/list-item', ['chapter' => $childElement])
|
|
||||||
@else
|
|
||||||
@include('pages/list-item', ['page' => $childElement])
|
|
||||||
@endif
|
|
||||||
<hr>
|
|
||||||
@endforeach
|
|
||||||
</div>
|
|
||||||
@else
|
|
||||||
<div class="well">
|
|
||||||
<p class="text-muted italic">{{ trans('entities.books_empty_contents') }}</p>
|
|
||||||
@if(userCan('page-create', $book))
|
|
||||||
<a href="{{ $book->getUrl('/create-page') }}" class="button outline page">@icon('page'){{ 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('/create-chapter') }}" class="button outline chapter">@icon('chapter'){{ trans('entities.books_empty_add_chapter') }}</a>
|
|
||||||
@endif
|
|
||||||
</div>
|
|
||||||
@endif
|
|
||||||
|
|
||||||
</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">@icon('close'){{ trans('entities.search_clear') }}</a></h3>
|
|
||||||
<div v-if="!searchResults">
|
|
||||||
@include('partials/loading-icon')
|
|
||||||
</div>
|
|
||||||
<div v-html="searchResults"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
@stop
|
|
||||||
|
@ -1,7 +1,4 @@
|
|||||||
<div class="breadcrumbs">
|
@include('partials.breadcrumbs', ['crumbs' => [
|
||||||
@if (userCan('view', $chapter->book))
|
$chapter->book,
|
||||||
<a href="{{ $chapter->book->getUrl() }}" class="text-book text-button">@icon('book'){{ $chapter->book->getShortName() }}</a>
|
$chapter,
|
||||||
<span class="sep">»</span>
|
]])
|
||||||
@endif
|
|
||||||
<a href="{{ $chapter->getUrl() }}" class="text-chapter text-button">@icon('chapter'){{$chapter->getShortName()}}</a>
|
|
||||||
</div>
|
|
@ -1,31 +1,29 @@
|
|||||||
<div class="chapter entity-list-item" data-entity-type="chapter" data-entity-id="{{$chapter->id}}">
|
<div class="chapter entity-list-item"
|
||||||
<h4>
|
data-entity-type="chapter" data-entity-id="{{$chapter->id}}">
|
||||||
@if (isset($showPath) && $showPath)
|
<div class="icon text-chapter">@icon('chapter')</div>
|
||||||
<a href="{{ $chapter->book->getUrl() }}" class="text-book">
|
<div class="content">
|
||||||
@icon('book'){{ $chapter->book->getShortName() }}
|
<a href="{{ $chapter->getUrl() }}" ><h4 class="entity-list-item-name break-text">{{ $chapter->name }}</h4></a>
|
||||||
</a>
|
<div>
|
||||||
<span class="text-muted"> » </span>
|
|
||||||
@endif
|
|
||||||
<a href="{{ $chapter->getUrl() }}" class="text-chapter entity-list-item-link">
|
|
||||||
@icon('chapter')<span class="entity-list-item-name break-text">{{ $chapter->name }}</span>
|
|
||||||
</a>
|
|
||||||
</h4>
|
|
||||||
|
|
||||||
<div class="entity-item-snippet">
|
<div class="entity-item-snippet">
|
||||||
@if(isset($chapter->searchSnippet))
|
<p class="text-muted break-text">{{ $chapter->getExcerpt() }}</p>
|
||||||
<p class="text-muted break-text">{!! $chapter->searchSnippet !!}</p>
|
</div>
|
||||||
@else
|
|
||||||
<p class="text-muted break-text">{{ $chapter->getExcerpt() }}</p>
|
|
||||||
@endif
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
@if(count($chapter->pages) > 0)
|
||||||
|
<p chapter-toggle class="text-muted">@icon('caret-right') @icon('page') <span>{{ trans_choice('entities.x_pages', $chapter->pages->count()) }}</span></p>
|
||||||
|
<div class="inset-list">
|
||||||
|
@foreach($chapter->pages as $page)
|
||||||
|
<a href="{{ $page->getUrl() }}" class="inner-page {{$page->draft ? 'draft' : ''}} entity-list-item">
|
||||||
|
<div class="icon text-page">@icon('page')</div>
|
||||||
|
<div class="content">
|
||||||
|
<h6 class="entity-list-item-name break-text">{{ $page->name }}</h6>
|
||||||
|
{{ $slot ?? '' }}
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
@endforeach
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
@if(!isset($hidePages) && count($chapter->pages) > 0)
|
|
||||||
<p chapter-toggle class="text-muted">@icon('caret-right') @icon('page') <span>{{ trans_choice('entities.x_pages', $chapter->pages->count()) }}</span></p>
|
|
||||||
<div class="inset-list">
|
|
||||||
@foreach($chapter->pages as $page)
|
|
||||||
<h5 class="@if($page->draft) draft @endif"><a href="{{ $page->getUrl() }}" class="text-page @if($page->draft) draft @endif">@icon('page'){{$page->name}}</a></h5>
|
|
||||||
@endforeach
|
|
||||||
</div>
|
</div>
|
||||||
@endif
|
</div>
|
||||||
</div>
|
</div>
|
@ -1,44 +1,4 @@
|
|||||||
@extends('sidebar-layout')
|
@extends('tri-layout')
|
||||||
|
|
||||||
@section('toolbar')
|
|
||||||
<div class="col-sm-6 col-xs-3 faded" v-pre>
|
|
||||||
@include('chapters._breadcrumbs', ['chapter' => $chapter])
|
|
||||||
</div>
|
|
||||||
<div class="col-sm-6 col-xs-9 faded">
|
|
||||||
<div class="action-buttons">
|
|
||||||
<span dropdown class="dropdown-container">
|
|
||||||
<div dropdown-toggle class="text-button text-primary">@icon('export'){{ trans('entities.export') }}</div>
|
|
||||||
<ul class="wide">
|
|
||||||
<li><a href="{{ $chapter->getUrl('/export/html') }}" target="_blank">{{ trans('entities.export_html') }} <span class="text-muted float right">.html</span></a></li>
|
|
||||||
<li><a href="{{ $chapter->getUrl('/export/pdf') }}" target="_blank">{{ trans('entities.export_pdf') }} <span class="text-muted float right">.pdf</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>
|
|
||||||
</span>
|
|
||||||
@if(userCan('page-create', $chapter))
|
|
||||||
<a href="{{ $chapter->getUrl('/create-page') }}" class="text-pos text-button">@icon('add'){{ trans('entities.pages_new') }}</a>
|
|
||||||
@endif
|
|
||||||
@if(userCan('chapter-update', $chapter))
|
|
||||||
<a href="{{ $chapter->getUrl('/edit') }}" class="text-primary text-button">@icon('edit'){{ trans('common.edit') }}</a>
|
|
||||||
@endif
|
|
||||||
@if((userCan('chapter-update', $chapter) && userCan('chapter-delete', $chapter) )|| userCan('restrictions-manage', $chapter) || userCan('chapter-delete', $chapter))
|
|
||||||
<div dropdown class="dropdown-container">
|
|
||||||
<a dropdown-toggle class="text-primary text-button">@icon('more') {{ trans('common.more') }}</a>
|
|
||||||
<ul>
|
|
||||||
@if(userCan('chapter-update', $chapter) && userCan('chapter-delete', $chapter))
|
|
||||||
<li><a href="{{ $chapter->getUrl('/move') }}" class="text-primary">@icon('folder'){{ trans('common.move') }}</a></li>
|
|
||||||
@endif
|
|
||||||
@if(userCan('restrictions-manage', $chapter))
|
|
||||||
<li><a href="{{ $chapter->getUrl('/permissions') }}" class="text-primary">@icon('lock'){{ trans('entities.permissions') }}</a></li>
|
|
||||||
@endif
|
|
||||||
@if(userCan('chapter-delete', $chapter))
|
|
||||||
<li><a href="{{ $chapter->getUrl('/delete') }}" class="text-neg">@icon('delete'){{ trans('common.delete') }}</a></li>
|
|
||||||
@endif
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
@endif
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
@stop
|
|
||||||
|
|
||||||
@section('container-attrs')
|
@section('container-attrs')
|
||||||
id="entity-dashboard"
|
id="entity-dashboard"
|
||||||
@ -46,27 +6,139 @@
|
|||||||
entity-type="chapter"
|
entity-type="chapter"
|
||||||
@stop
|
@stop
|
||||||
|
|
||||||
@section('sidebar')
|
@section('body')
|
||||||
|
|
||||||
@if($chapter->tags->count() > 0)
|
<div class="mb-m">
|
||||||
<section>
|
@include('chapters._breadcrumbs', ['chapter' => $chapter])
|
||||||
@include('components.tag-list', ['entity' => $chapter])
|
</div>
|
||||||
</section>
|
|
||||||
@endif
|
|
||||||
|
|
||||||
<div class="card">
|
<div class="content-wrap card">
|
||||||
<div class="body">
|
<h1 class="break-text" v-pre>{{ $chapter->name }}</h1>
|
||||||
<form @submit.prevent="searchBook" class="search-box">
|
<div class="chapter-content" v-show="!searching">
|
||||||
<input v-model="searchTerm" @change="checkSearchForm()" type="text" name="term" placeholder="{{ trans('entities.chapters_search_this') }}">
|
<p v-pre class="text-muted break-text">{!! nl2br(e($chapter->description)) !!}</p>
|
||||||
<button type="submit">@icon('search')</button>
|
@if(count($pages) > 0)
|
||||||
<button v-if="searching" v-cloak class="text-neg" @click="clearSearch()" type="button">@icon('close')</button>
|
<div v-pre class="entity-list book-contents">
|
||||||
</form>
|
@foreach($pages as $page)
|
||||||
|
@include('pages.list-item', ['page' => $page])
|
||||||
|
@endforeach
|
||||||
|
</div>
|
||||||
|
@else
|
||||||
|
{{--TODO--}}
|
||||||
|
<div v-pre class="well">
|
||||||
|
<p class="text-muted italic">{{ trans('entities.chapters_empty') }}</p>
|
||||||
|
<p>
|
||||||
|
@if(userCan('page-create', $chapter))
|
||||||
|
<a href="{{ $chapter->getUrl('/create-page') }}" class="button outline page">@icon('page'){{ 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="button outline book">@icon('book'){{ trans('entities.books_empty_sort_current_book') }}</a>
|
||||||
|
@endif
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="search-results" v-cloak v-show="searching">
|
||||||
|
{{--TODO--}}
|
||||||
|
<h3 class="text-muted">{{ trans('entities.search_results') }} <a v-if="searching" @click="clearSearch()" class="text-small">@icon('close'){{ trans('entities.search_clear') }}</a></h3>
|
||||||
|
<div v-if="!searchResults">
|
||||||
|
@include('partials/loading-icon')
|
||||||
|
</div>
|
||||||
|
<div v-html="searchResults"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="card entity-details">
|
@stop
|
||||||
<h3>@icon('info') {{ trans('common.details') }}</h3>
|
|
||||||
<div class="body blended-links text-small text-muted">
|
@section('right')
|
||||||
|
|
||||||
|
<div class="actions mb-xl">
|
||||||
|
<h5>{{ trans('common.actions') }}</h5>
|
||||||
|
<div class="icon-list text-primary">
|
||||||
|
|
||||||
|
<div dropdown class="dropdown-container">
|
||||||
|
<div dropdown-toggle class="icon-list-item">
|
||||||
|
<span class="icon">@icon('export')</span>
|
||||||
|
<span>{{ trans('entities.export') }}</span>
|
||||||
|
</div>
|
||||||
|
<ul class="wide">
|
||||||
|
<li><a href="{{ $chapter->getUrl('/export/html') }}" target="_blank">{{ trans('entities.export_html') }} <span class="text-muted float right">.html</span></a></li>
|
||||||
|
<li><a href="{{ $chapter->getUrl('/export/pdf') }}" target="_blank">{{ trans('entities.export_pdf') }} <span class="text-muted float right">.pdf</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>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@if(userCan('page-create', $chapter))
|
||||||
|
<a href="{{ $chapter->getUrl('/create-page') }}" class="icon-list-item">
|
||||||
|
<span class="icon">@icon('add')</span>
|
||||||
|
<span>{{ trans('entities.pages_new') }}</span>
|
||||||
|
</a>
|
||||||
|
@endif
|
||||||
|
@if(userCan('chapter-update', $chapter))
|
||||||
|
<a href="{{ $chapter->getUrl('/edit') }}" class="icon-list-item">
|
||||||
|
<span class="icon">@icon('edit')</span>
|
||||||
|
<span>{{ trans('common.edit') }}</span>
|
||||||
|
</a>
|
||||||
|
@endif
|
||||||
|
@if(userCan('chapter-update', $chapter) && userCan('chapter-delete', $chapter))
|
||||||
|
<a href="{{ $chapter->getUrl('/move') }}" class="icon-list-item">
|
||||||
|
<span class="icon">@icon('folder')</span>
|
||||||
|
<span>{{ trans('common.move') }}</span>
|
||||||
|
</a>
|
||||||
|
@endif
|
||||||
|
@if(userCan('restrictions-manage', $chapter))
|
||||||
|
<a href="{{ $chapter->getUrl('/permissions') }}" class="icon-list-item">
|
||||||
|
<span class="icon">@icon('lock')</span>
|
||||||
|
<span>{{ trans('entities.permissions') }}</span>
|
||||||
|
</a>
|
||||||
|
@endif
|
||||||
|
@if(userCan('chapter-delete', $chapter))
|
||||||
|
<a href="{{ $chapter->getUrl('/delete') }}" class="icon-list-item">
|
||||||
|
<span class="icon">@icon('delete')</span>
|
||||||
|
<span>{{ trans('common.delete') }}</span>
|
||||||
|
</a>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
{{--@if(userCan('page-create', $book))--}}
|
||||||
|
{{--<a href="{{ $book->getUrl('/create-page') }}" class="icon-list-item">--}}
|
||||||
|
{{--<span class="icon">@icon('add')</span>--}}
|
||||||
|
{{--<span>{{ trans('entities.pages_new') }}</span>--}}
|
||||||
|
{{--</a>--}}
|
||||||
|
{{--@endif--}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-sm-6 col-xs-9 faded">
|
||||||
|
<div class="action-buttons">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@stop
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@section('left')
|
||||||
|
|
||||||
|
@if($chapter->tags->count() > 0)
|
||||||
|
<div class="mb-xl">
|
||||||
|
@include('components.tag-list', ['entity' => $chapter])
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
<div class="mb-xl">
|
||||||
|
<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">@icon('search')</button>
|
||||||
|
<button v-if="searching" v-cloak class="text-neg" @click="clearSearch()" type="button">@icon('close')</button>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="mb-xl">
|
||||||
|
<h5>{{ trans('common.details') }}</h5>
|
||||||
|
<div class="blended-links text-small text-muted">
|
||||||
@include('partials.entity-meta', ['entity' => $chapter])
|
@include('partials.entity-meta', ['entity' => $chapter])
|
||||||
|
|
||||||
@if($book->restricted)
|
@if($book->restricted)
|
||||||
@ -94,46 +166,4 @@
|
|||||||
@include('partials/book-tree', ['book' => $book, 'sidebarTree' => $sidebarTree])
|
@include('partials/book-tree', ['book' => $book, 'sidebarTree' => $sidebarTree])
|
||||||
@stop
|
@stop
|
||||||
|
|
||||||
@section('body')
|
|
||||||
|
|
||||||
<div class="container small nopad">
|
|
||||||
<h1 class="break-text" v-pre>{{ $chapter->name }}</h1>
|
|
||||||
<div class="chapter-content" v-show="!searching">
|
|
||||||
<p v-pre class="text-muted break-text">{!! nl2br(e($chapter->description)) !!}</p>
|
|
||||||
|
|
||||||
@if(count($pages) > 0)
|
|
||||||
<div v-pre class="page-list">
|
|
||||||
<hr>
|
|
||||||
@foreach($pages as $page)
|
|
||||||
@include('pages/list-item', ['page' => $page])
|
|
||||||
<hr>
|
|
||||||
@endforeach
|
|
||||||
</div>
|
|
||||||
@else
|
|
||||||
<div v-pre class="well">
|
|
||||||
<p class="text-muted italic">{{ trans('entities.chapters_empty') }}</p>
|
|
||||||
<p>
|
|
||||||
@if(userCan('page-create', $chapter))
|
|
||||||
<a href="{{ $chapter->getUrl('/create-page') }}" class="button outline page">@icon('page'){{ 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="button outline book">@icon('book'){{ trans('entities.books_empty_sort_current_book') }}</a>
|
|
||||||
@endif
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
@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">@icon('close'){{ trans('entities.search_clear') }}</a></h3>
|
|
||||||
<div v-if="!searchResults">
|
|
||||||
@include('partials/loading-icon')
|
|
||||||
</div>
|
|
||||||
<div v-html="searchResults"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
@stop
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
@include('partials.breadcrumbs', [
|
@include('partials.breadcrumbs', ['crumbs' => [
|
||||||
'page' => $page,
|
$page->book,
|
||||||
'chapter' => $page->hasChapter() ? $page->chapter : null,
|
$page->hasChapter() ? $page->chapter : null,
|
||||||
'book' => $page->book,
|
$page,
|
||||||
])
|
]])
|
@ -1,51 +1,5 @@
|
|||||||
<div class="page {{$page->draft ? 'draft' : ''}} entity-list-item" data-entity-type="page" data-entity-id="{{$page->id}}">
|
@component('partials.entity-list-item-basic', ['entity' => $page])
|
||||||
<div class="entity-icon text-page">@icon('page')</div>
|
<div class="entity-item-snippet">
|
||||||
<div class="content">
|
<p class="text-muted break-text">{{ $page->getExcerpt() }}</p>
|
||||||
|
|
||||||
<h4>
|
|
||||||
@if (isset($showPath) && $showPath)
|
|
||||||
<a href="{{ $page->book->getUrl() }}" class="text-book">
|
|
||||||
@icon('book'){{ $page->book->getShortName() }}
|
|
||||||
</a>
|
|
||||||
<span class="text-muted"> » </span>
|
|
||||||
@if($page->chapter)
|
|
||||||
<a href="{{ $page->chapter->getUrl() }}" class="text-chapter">
|
|
||||||
@icon('chapter'){{ $page->chapter->getShortName() }}
|
|
||||||
</a>
|
|
||||||
<span class="text-muted"> » </span>
|
|
||||||
@endif
|
|
||||||
@endif
|
|
||||||
<a href="{{ $page->getUrl() }}" class="entity-list-item-link"><span class="entity-list-item-name break-text">{{ $page->name }}</span></a>
|
|
||||||
</h4>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="entity-item-snippet">
|
|
||||||
@if(isset($page->searchSnippet))
|
|
||||||
<p class="text-muted break-text">{!! $page->searchSnippet !!}</p>
|
|
||||||
@else
|
|
||||||
<p class="text-muted break-text">{{ $page->getExcerpt() }}</p>
|
|
||||||
@endif
|
|
||||||
</div>
|
|
||||||
|
|
||||||
@if(isset($style) && $style === 'detailed')
|
|
||||||
<div class="row meta text-muted text-small">
|
|
||||||
<div class="col-md-6">
|
|
||||||
@include('partials.entity-meta', ['entity' => $page])
|
|
||||||
</div>
|
|
||||||
<div class="col-md-6">
|
|
||||||
<a class="text-book" href="{{ $page->book->getUrl() }}">@icon('book'){{ $page->book->getShortName(30) }}</a>
|
|
||||||
<br>
|
|
||||||
@if($page->chapter)
|
|
||||||
<a class="text-chapter" href="{{ $page->chapter->getUrl() }}">@icon('chapter'){{ $page->chapter->getShortName(30) }}</a>
|
|
||||||
@else
|
|
||||||
@icon('chapter') {{ trans('entities.pages_not_in_chapter') }}
|
|
||||||
@endif
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
@endif
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@endcomponent
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
@ -1,5 +1,39 @@
|
|||||||
@extends('tri-layout')
|
@extends('tri-layout')
|
||||||
@section('container-classes', 'mt-xl')
|
|
||||||
|
@section('body')
|
||||||
|
|
||||||
|
<div class="mb-m">
|
||||||
|
@include('pages._breadcrumbs', ['page' => $page])
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="content-wrap card">
|
||||||
|
<div class="page-content flex" page-display="{{ $page->id }}">
|
||||||
|
|
||||||
|
<div class="pointer-container" id="pointer">
|
||||||
|
<div class="pointer anim {{ userCan('page-update', $page) ? 'is-page-editable' : ''}}" >
|
||||||
|
<span class="icon text-primary">@icon('link') @icon('include', ['style' => 'display:none;'])</span>
|
||||||
|
<span class="input-group">
|
||||||
|
<input readonly="readonly" type="text" id="pointer-url" placeholder="url">
|
||||||
|
<button class="button icon" data-clipboard-target="#pointer-url" type="button" title="{{ trans('entities.pages_copy_link') }}">@icon('copy')</button>
|
||||||
|
</span>
|
||||||
|
@if(userCan('page-update', $page))
|
||||||
|
<a href="{{ $page->getUrl('/edit') }}" id="pointer-edit" data-edit-href="{{ $page->getUrl('/edit') }}"
|
||||||
|
class="button icon heading-edit-icon" title="{{ trans('entities.pages_edit_content_link')}}">@icon('edit')</a>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@include('pages.page-display')
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@if ($commentsEnabled)
|
||||||
|
<div class="container small nopad comments-container mb-l">
|
||||||
|
@include('comments.comments', ['page' => $page])
|
||||||
|
<div class="clearfix"></div>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
@stop
|
||||||
|
|
||||||
@section('left')
|
@section('left')
|
||||||
|
|
||||||
@ -77,41 +111,6 @@
|
|||||||
@include('partials.book-tree', ['book' => $book, 'sidebarTree' => $sidebarTree])
|
@include('partials.book-tree', ['book' => $book, 'sidebarTree' => $sidebarTree])
|
||||||
@stop
|
@stop
|
||||||
|
|
||||||
@section('body')
|
|
||||||
|
|
||||||
<div class="mb-m">
|
|
||||||
@include('pages._breadcrumbs', ['page' => $page])
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="content-wrap card">
|
|
||||||
<div class="page-content flex" page-display="{{ $page->id }}">
|
|
||||||
|
|
||||||
<div class="pointer-container" id="pointer">
|
|
||||||
<div class="pointer anim {{ userCan('page-update', $page) ? 'is-page-editable' : ''}}" >
|
|
||||||
<span class="icon text-primary">@icon('link') @icon('include', ['style' => 'display:none;'])</span>
|
|
||||||
<span class="input-group">
|
|
||||||
<input readonly="readonly" type="text" id="pointer-url" placeholder="url">
|
|
||||||
<button class="button icon" data-clipboard-target="#pointer-url" type="button" title="{{ trans('entities.pages_copy_link') }}">@icon('copy')</button>
|
|
||||||
</span>
|
|
||||||
@if(userCan('page-update', $page))
|
|
||||||
<a href="{{ $page->getUrl('/edit') }}" id="pointer-edit" data-edit-href="{{ $page->getUrl('/edit') }}"
|
|
||||||
class="button icon heading-edit-icon" title="{{ trans('entities.pages_edit_content_link')}}">@icon('edit')</a>
|
|
||||||
@endif
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
@include('pages.page-display')
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
@if ($commentsEnabled)
|
|
||||||
<div class="container small nopad comments-container mb-l">
|
|
||||||
@include('comments.comments', ['page' => $page])
|
|
||||||
<div class="clearfix"></div>
|
|
||||||
</div>
|
|
||||||
@endif
|
|
||||||
@stop
|
|
||||||
|
|
||||||
@section('right')
|
@section('right')
|
||||||
<div class="actions mb-xl">
|
<div class="actions mb-xl">
|
||||||
<h5>Actions</h5>
|
<h5>Actions</h5>
|
||||||
|
@ -1,19 +1,42 @@
|
|||||||
<div class="breadcrumbs text-center">
|
<div class="breadcrumbs text-center">
|
||||||
@if (isset($book) && userCan('view', $book))
|
<?php $breadcrumbCount = 0; ?>
|
||||||
<a href="{{ $book->getUrl() }}" class="text-book">
|
@foreach($crumbs as $key => $crumb)
|
||||||
@icon('book'){{ $book->getShortName() }}
|
@if (is_null($crumb))
|
||||||
</a>
|
<?php continue; ?>
|
||||||
<div class="separator">@icon('chevron-right')</div>
|
@endif
|
||||||
@endif
|
@if ($breadcrumbCount !== 0)
|
||||||
@if(isset($chapter) && userCan('view', $chapter))
|
<div class="separator">@icon('chevron-right')</div>
|
||||||
<a href="{{ $chapter->getUrl() }}" class="text-chapter">
|
@endif
|
||||||
@icon('chapter'){{ $chapter->getShortName() }}
|
|
||||||
</a>
|
@if (is_string($crumb))
|
||||||
<div class="separator">@icon('chevron-right')</div>
|
<a href="{{ baseUrl($key) }}">
|
||||||
@endif
|
{{ $crumb }}
|
||||||
@if(isset($page) && userCan('view', $page))
|
</a>
|
||||||
<a href="{{ $page->getUrl() }}" class="text-page">
|
@else
|
||||||
@icon('page'){{ $page->getShortName() }}
|
<a href="{{ $crumb->getUrl() }}" class="text-{{$crumb->getType()}}">
|
||||||
</a>
|
@icon($crumb->getType()){{ $crumb->getShortName() }}
|
||||||
@endif
|
</a>
|
||||||
|
@endif
|
||||||
|
<?php $breadcrumbCount++; ?>
|
||||||
|
@endforeach
|
||||||
|
|
||||||
|
{{--@if (isset($book) && userCan('view', $book))--}}
|
||||||
|
{{--<a href="{{ $book->getUrl() }}" class="text-book">--}}
|
||||||
|
{{--@icon('book'){{ $book->getShortName() }}--}}
|
||||||
|
{{--</a>--}}
|
||||||
|
{{--<div class="separator">@icon('chevron-right')</div>--}}
|
||||||
|
{{--@endif--}}
|
||||||
|
{{--@if(isset($chapter) && userCan('view', $chapter))--}}
|
||||||
|
{{--<a href="{{ $chapter->getUrl() }}" class="text-chapter">--}}
|
||||||
|
{{--@icon('chapter'){{ $chapter->getShortName() }}--}}
|
||||||
|
{{--</a>--}}
|
||||||
|
{{--@if (isset($page))--}}
|
||||||
|
{{--<div class="separator">@icon('chevron-right')</div>--}}
|
||||||
|
{{--@endif--}}
|
||||||
|
{{--@endif--}}
|
||||||
|
{{--@if(isset($page) && userCan('view', $page))--}}
|
||||||
|
{{--<a href="{{ $page->getUrl() }}" class="text-page">--}}
|
||||||
|
{{--@icon('page'){{ $page->getShortName() }}--}}
|
||||||
|
{{--</a>--}}
|
||||||
|
{{--@endif--}}
|
||||||
</div>
|
</div>
|
@ -4,11 +4,11 @@
|
|||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
|
|
||||||
<div class="toolbar px-xl">
|
{{--<div class="toolbar px-xl">--}}
|
||||||
@yield('toolbar')
|
{{--@yield('toolbar')--}}
|
||||||
</div>
|
{{--</div>--}}
|
||||||
|
|
||||||
<div class="tri-layout-container @yield('container-classes')" tri-layout @yield('container-attrs') >
|
<div class="tri-layout-container mt-xl" tri-layout @yield('container-attrs') >
|
||||||
|
|
||||||
<div class="tri-layout-left print-hidden " id="sidebar">
|
<div class="tri-layout-left print-hidden " id="sidebar">
|
||||||
<div class="tri-layout-left-contents">
|
<div class="tri-layout-left-contents">
|
||||||
|
Loading…
Reference in New Issue
Block a user