mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-08-07 23:03:00 +03:00
@@ -33,7 +33,7 @@
|
||||
<header id="header">
|
||||
<div class="container fluid">
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<div class="col-sm-4 col-md-3">
|
||||
<a href="{{ baseUrl('/') }}" class="logo">
|
||||
@if(setting('app-logo', '') !== 'none')
|
||||
<img class="logo-image" src="{{ setting('app-logo', '') === '' ? baseUrl('/logo.png') : baseUrl(setting('app-logo', '')) }}" alt="Logo">
|
||||
@@ -43,7 +43,7 @@
|
||||
@endif
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<div class="col-sm-8 col-md-9">
|
||||
<div class="float right">
|
||||
<div class="header-search">
|
||||
<form action="{{ baseUrl('/search') }}" method="GET" class="search-box">
|
||||
@@ -52,6 +52,9 @@
|
||||
</form>
|
||||
</div>
|
||||
<div class="links text-center">
|
||||
@if(userCan('bookshelf-view-all') || userCan('bookshelf-view-own'))
|
||||
<a href="{{ baseUrl('/shelves') }}">@icon('bookshelf'){{ trans('entities.shelves') }}</a>
|
||||
@endif
|
||||
<a href="{{ baseUrl('/books') }}">@icon('book'){{ trans('entities.books') }}</a>
|
||||
@if(signedInUser() && userCan('settings-manage'))
|
||||
<a href="{{ baseUrl('/settings') }}">@icon('settings'){{ trans('settings.settings') }}</a>
|
||||
|
@@ -1,9 +1,5 @@
|
||||
|
||||
@if($booksViewType === 'list')
|
||||
<div class="container small">
|
||||
@else
|
||||
<div class="container">
|
||||
@endif
|
||||
<div class="container{{ $booksViewType === 'list' ? ' small' : '' }}">
|
||||
<h1>{{ trans('entities.books') }}</h1>
|
||||
@if(count($books) > 0)
|
||||
@if($booksViewType === 'list')
|
||||
@@ -25,7 +21,7 @@
|
||||
@else
|
||||
<p class="text-muted">{{ trans('entities.books_empty') }}</p>
|
||||
@if(userCan('books-create-all'))
|
||||
<a href="{{ baseUrl("/create-book") }}" class="text-pos">@icon('edit'){{ trans('entities.create_one_now') }}</a>
|
||||
<a href="{{ baseUrl("/create-book") }}" class="text-pos">@icon('edit'){{ trans('entities.create_now') }}</a>
|
||||
@endif
|
||||
@endif
|
||||
</div>
|
@@ -25,7 +25,7 @@
|
||||
<a dropdown-toggle class="text-primary text-button">@icon('more'){{ trans('common.more') }}</a>
|
||||
<ul>
|
||||
@if(userCan('book-update', $book))
|
||||
<li><a href="{{$book->getEditUrl()}}" class="text-primary">@icon('edit'){{ trans('common.edit') }}</a></li>
|
||||
<li><a href="{{ $book->getUrl('/edit') }}" class="text-primary">@icon('edit'){{ trans('common.edit') }}</a></li>
|
||||
<li><a href="{{ $book->getUrl('/sort') }}" class="text-primary">@icon('sort'){{ trans('common.sort') }}</a></li>
|
||||
@endif
|
||||
@if(userCan('restrictions-manage', $book))
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<form action="{{ baseUrl("/settings/users/{$currentUser->id}/switch-book-view") }}" method="POST" class="inline">
|
||||
{!! csrf_field() !!}
|
||||
{!! method_field('PATCH') !!}
|
||||
<input type="hidden" value="{{ $booksViewType === 'list'? 'grid' : 'list' }}" name="book_view_type">
|
||||
<input type="hidden" value="{{ $booksViewType === 'list'? 'grid' : 'list' }}" name="view_type">
|
||||
@if ($booksViewType === 'list')
|
||||
<button type="submit" class="text-pos text-button">@icon('grid'){{ trans('common.grid_view') }}</button>
|
||||
@else
|
||||
|
18
resources/views/common/home-shelves.blade.php
Normal file
18
resources/views/common/home-shelves.blade.php
Normal file
@@ -0,0 +1,18 @@
|
||||
@extends('sidebar-layout')
|
||||
|
||||
@section('toolbar')
|
||||
<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">@icon('expand-text'){{ trans('common.toggle_details') }}</a>
|
||||
@include('shelves/view-toggle', ['shelvesViewType' => $shelvesViewType])
|
||||
</div>
|
||||
</div>
|
||||
@stop
|
||||
|
||||
@section('sidebar')
|
||||
@include('common/home-sidebar')
|
||||
@stop
|
||||
|
||||
@section('body')
|
||||
@include('shelves/list', ['shelves' => $shelves, 'shelvesViewType' => $shelvesViewType])
|
||||
@stop
|
@@ -10,7 +10,7 @@
|
||||
|
||||
@section('body')
|
||||
|
||||
<div class="container">
|
||||
<div class="container" id="home-default">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-sm-4">
|
||||
|
@@ -8,6 +8,8 @@
|
||||
@include('books/list-item', ['book' => $entity])
|
||||
@elseif($entity->isA('chapter'))
|
||||
@include('chapters/list-item', ['chapter' => $entity, 'hidePages' => true])
|
||||
@elseif($entity->isA('bookshelf'))
|
||||
@include('shelves/list-item', ['bookshelf' => $entity])
|
||||
@endif
|
||||
|
||||
@if($index !== count($entities) - 1)
|
||||
|
@@ -76,12 +76,22 @@
|
||||
<input type="text" value="{{ setting('app-color') }}" name="setting-app-color" id="setting-app-color" placeholder="#0288D1">
|
||||
<input type="hidden" value="{{ setting('app-color-light') }}" name="setting-app-color-light" id="setting-app-color-light">
|
||||
</div>
|
||||
<div class="form-group" id="homepage-control">
|
||||
<div homepage-control class="form-group" id="homepage-control">
|
||||
<label for="setting-app-homepage">{{ trans('settings.app_homepage') }}</label>
|
||||
<p class="small">{{ trans('settings.app_homepage_desc') }}</p>
|
||||
@include('components.page-picker', ['name' => 'setting-app-homepage', 'placeholder' => trans('settings.app_homepage_default'), 'value' => setting('app-homepage')])
|
||||
<p class="small">{{ trans('settings.app_homepage_books') }}</p>
|
||||
@include('components.toggle-switch', ['name' => 'setting-app-book-homepage', 'value' => setting('app-book-homepage')])
|
||||
|
||||
<select name="setting-app-homepage-type" id="setting-app-homepage-type">
|
||||
<option @if(setting('app-homepage-type') === 'default') selected @endif value="default">{{ trans('common.default') }}</option>
|
||||
<option @if(setting('app-homepage-type') === 'books') selected @endif value="books">{{ trans('entities.books') }}</option>
|
||||
<option @if(setting('app-homepage-type') === 'bookshelves') selected @endif value="bookshelves">{{ trans('entities.shelves') }}</option>
|
||||
<option @if(setting('app-homepage-type') === 'page') selected @endif value="page">{{ trans('entities.pages_specific') }}</option>
|
||||
</select>
|
||||
|
||||
<br><br>
|
||||
|
||||
<div page-picker-container style="display: none;">
|
||||
@include('components.page-picker', ['name' => 'setting-app-homepage', 'placeholder' => trans('settings.app_homepage_select'), 'value' => setting('app-homepage')])
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@@ -36,6 +36,10 @@
|
||||
<h5>{{ trans('settings.role_asset') }}</h5>
|
||||
<p>{{ trans('settings.role_asset_desc') }}</p>
|
||||
|
||||
@if (isset($role) && $role->system_name === 'admin')
|
||||
<p>{{ trans('settings.role_asset_admins') }}</p>
|
||||
@endif
|
||||
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th width="20%"></th>
|
||||
@@ -44,6 +48,24 @@
|
||||
<th width="20%">{{ trans('common.edit') }}</th>
|
||||
<th width="20%">{{ trans('common.delete') }}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ trans('entities.shelves_long') }}</td>
|
||||
<td>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'bookshelf-create-all']) {{ trans('settings.role_all') }}</label>
|
||||
</td>
|
||||
<td>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'bookshelf-view-own']) {{ trans('settings.role_own') }}</label>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'bookshelf-view-all']) {{ trans('settings.role_all') }}</label>
|
||||
</td>
|
||||
<td>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'bookshelf-update-own']) {{ trans('settings.role_own') }}</label>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'bookshelf-update-all']) {{ trans('settings.role_all') }}</label>
|
||||
</td>
|
||||
<td>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'bookshelf-delete-own']) {{ trans('settings.role_own') }}</label>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'bookshelf-delete-all']) {{ trans('settings.role_all') }}</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ trans('entities.books') }}</td>
|
||||
<td>
|
||||
|
3
resources/views/shelves/_breadcrumbs.blade.php
Normal file
3
resources/views/shelves/_breadcrumbs.blade.php
Normal file
@@ -0,0 +1,3 @@
|
||||
<div class="breadcrumbs">
|
||||
<a href="{{$shelf->getUrl()}}" class="text-bookshelf text-button">@icon('bookshelf'){{ $shelf->getShortName() }}</a>
|
||||
</div>
|
31
resources/views/shelves/create.blade.php
Normal file
31
resources/views/shelves/create.blade.php
Normal file
@@ -0,0 +1,31 @@
|
||||
@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>
|
||||
</div>
|
||||
|
||||
<p class="margin-top large"><br></p>
|
||||
|
||||
@include('components.image-manager', ['imageType' => 'cover'])
|
||||
|
||||
@stop
|
30
resources/views/shelves/delete.blade.php
Normal file
30
resources/views/shelves/delete.blade.php
Normal file
@@ -0,0 +1,30 @@
|
||||
@extends('simple-layout')
|
||||
|
||||
@section('toolbar')
|
||||
<div class="col-sm-12 faded">
|
||||
@include('shelves._breadcrumbs', ['shelf' => $shelf])
|
||||
</div>
|
||||
@stop
|
||||
|
||||
@section('body')
|
||||
|
||||
<div class="container small">
|
||||
<p> </p>
|
||||
<div class="card">
|
||||
<h3>@icon('delete') {{ trans('entities.shelves_delete') }}</h3>
|
||||
<div class="body">
|
||||
<p>{{ trans('entities.shelves_delete_explain', ['name' => $shelf->name]) }}</p>
|
||||
<p class="text-neg">{{ trans('entities.shelves_delete_confirmation') }}</p>
|
||||
|
||||
<form action="{{ $shelf->getUrl() }}" method="POST">
|
||||
{!! csrf_field() !!}
|
||||
<input type="hidden" name="_method" value="DELETE">
|
||||
|
||||
<a href="{{ $shelf->getUrl() }}" class="button outline">{{ trans('common.cancel') }}</a>
|
||||
<button type="submit" class="button">{{ trans('common.confirm') }}</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@stop
|
24
resources/views/shelves/edit.blade.php
Normal file
24
resources/views/shelves/edit.blade.php
Normal file
@@ -0,0 +1,24 @@
|
||||
@extends('simple-layout')
|
||||
|
||||
@section('toolbar')
|
||||
<div class="col-sm-12 faded">
|
||||
@include('shelves._breadcrumbs', ['shelf' => $shelf])
|
||||
</div>
|
||||
@stop
|
||||
|
||||
@section('body')
|
||||
|
||||
<div class="container small">
|
||||
<p> </p>
|
||||
<div class="card">
|
||||
<h3>@icon('edit') {{ trans('entities.shelves_edit') }}</h3>
|
||||
<div class="body">
|
||||
<form action="{{ $shelf->getUrl() }}" method="POST">
|
||||
<input type="hidden" name="_method" value="PUT">
|
||||
@include('shelves/form', ['model' => $shelf])
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include('components.image-manager', ['imageType' => 'cover'])
|
||||
@stop
|
80
resources/views/shelves/export.blade.php
Normal file
80
resources/views/shelves/export.blade.php
Normal file
@@ -0,0 +1,80 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<title>{{ $book->name }}</title>
|
||||
|
||||
<style>
|
||||
@if (!app()->environment('testing'))
|
||||
{!! file_get_contents(public_path('/dist/export-styles.css')) !!}
|
||||
@endif
|
||||
.page-break {
|
||||
page-break-after: always;
|
||||
}
|
||||
.chapter-hint {
|
||||
color: #888;
|
||||
margin-top: 32px;
|
||||
}
|
||||
.chapter-hint + h1 {
|
||||
margin-top: 0;
|
||||
}
|
||||
ul.contents ul li {
|
||||
list-style: circle;
|
||||
}
|
||||
@media screen {
|
||||
.page-break {
|
||||
border-top: 1px solid #DDD;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@yield('head')
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-8 col-md-offset-2">
|
||||
<div class="page-content">
|
||||
|
||||
<h1 style="font-size: 4.8em">{{$book->name}}</h1>
|
||||
|
||||
<p>{{ $book->description }}</p>
|
||||
|
||||
@if(count($bookChildren) > 0)
|
||||
<ul class="contents">
|
||||
@foreach($bookChildren as $bookChild)
|
||||
<li><a href="#{{$bookChild->getType()}}-{{$bookChild->id}}">{{ $bookChild->name }}</a></li>
|
||||
@if($bookChild->isA('chapter') && count($bookChild->pages) > 0)
|
||||
<ul>
|
||||
@foreach($bookChild->pages as $page)
|
||||
<li><a href="#page-{{$page->id}}">{{ $page->name }}</a></li>
|
||||
@endforeach
|
||||
</ul>
|
||||
@endif
|
||||
@endforeach
|
||||
</ul>
|
||||
@endif
|
||||
|
||||
@foreach($bookChildren as $bookChild)
|
||||
<div class="page-break"></div>
|
||||
<h1 id="{{$bookChild->getType()}}-{{$bookChild->id}}">{{ $bookChild->name }}</h1>
|
||||
@if($bookChild->isA('chapter'))
|
||||
<p>{{ $bookChild->description }}</p>
|
||||
@if(count($bookChild->pages) > 0)
|
||||
@foreach($bookChild->pages as $page)
|
||||
<div class="page-break"></div>
|
||||
<div class="chapter-hint">{{$bookChild->name}}</div>
|
||||
<h1 id="page-{{$page->id}}">{{ $page->name }}</h1>
|
||||
{!! $page->html !!}
|
||||
@endforeach
|
||||
@endif
|
||||
@else
|
||||
{!! $bookChild->html !!}
|
||||
@endif
|
||||
@endforeach
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
84
resources/views/shelves/form.blade.php
Normal file
84
resources/views/shelves/form.blade.php
Normal file
@@ -0,0 +1,84 @@
|
||||
|
||||
{{ 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 description-input">
|
||||
<label for="description">{{ trans('common.description') }}</label>
|
||||
@include('form/textarea', ['name' => 'description'])
|
||||
</div>
|
||||
|
||||
<div shelf-sort class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="books">{{ trans('entities.shelves_books') }}</label>
|
||||
<input type="hidden" id="books-input" name="books"
|
||||
value="{{ isset($shelf) ? $shelf->books->implode('id', ',') : '' }}">
|
||||
<div class="scroll-box">
|
||||
<div class="scroll-box-item text-small text-muted instruction">
|
||||
{{ trans('entities.shelves_drag_books') }}
|
||||
</div>
|
||||
<div class="scroll-box-item scroll-box-placeholder" style="display: none;">
|
||||
<a href="#" class="text-muted">@icon('book') ...</a>
|
||||
</div>
|
||||
@if (isset($shelfBooks) && count($shelfBooks) > 0)
|
||||
@foreach ($shelfBooks as $book)
|
||||
<div data-id="{{ $book->id }}" class="scroll-box-item">
|
||||
<a href="{{ $book->getUrl() }}" class="text-book">@icon('book'){{ $book->name }}</a>
|
||||
</div>
|
||||
@endforeach
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="books">{{ trans('entities.shelves_add_books') }}</label>
|
||||
<div class="scroll-box">
|
||||
@foreach ($books as $book)
|
||||
<div data-id="{{ $book->id }}" class="scroll-box-item">
|
||||
<a href="{{ $book->getUrl() }}" class="text-book">@icon('book'){{ $book->name }}</a>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="form-group" collapsible id="logo-control">
|
||||
<div class="collapse-title text-primary" collapsible-trigger>
|
||||
<label for="user-avatar">{{ trans('common.cover_image') }}</label>
|
||||
</div>
|
||||
<div class="collapse-content" collapsible-content>
|
||||
<p class="small">{{ trans('common.cover_image_description') }}</p>
|
||||
|
||||
@include('components.image-picker', [
|
||||
'resizeHeight' => '512',
|
||||
'resizeWidth' => '512',
|
||||
'showRemove' => false,
|
||||
'defaultImage' => baseUrl('/book_default_cover.png'),
|
||||
'currentImage' => isset($shelf) ? $shelf->getBookCover() : baseUrl('/book_default_cover.png') ,
|
||||
'currentId' => isset($shelf) && $shelf->image_id ? $shelf->image_id : 0,
|
||||
'name' => 'image_id',
|
||||
'imageClass' => 'cover'
|
||||
])
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" collapsible id="tags-control">
|
||||
<div class="collapse-title text-primary" collapsible-trigger>
|
||||
<label for="tag-manager">{{ trans('entities.shelf_tags') }}</label>
|
||||
</div>
|
||||
<div class="collapse-content" collapsible-content>
|
||||
@include('components.tag-manager', ['entity' => $shelf ?? null, 'entityType' => 'bookshelf'])
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<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>
|
||||
</div>
|
18
resources/views/shelves/grid-item.blade.php
Normal file
18
resources/views/shelves/grid-item.blade.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<div class="bookshelf-grid-item grid-card" data-entity-type="bookshelf" data-entity-id="{{$bookshelf->id}}">
|
||||
<div class="featured-image-container">
|
||||
<a href="{{$bookshelf->getUrl()}}" title="{{$bookshelf->name}}">
|
||||
<img src="{{$bookshelf->getBookCover()}}" alt="{{$bookshelf->name}}">
|
||||
</a>
|
||||
</div>
|
||||
<div class="grid-card-content">
|
||||
<h2><a class="break-text" href="{{$bookshelf->getUrl()}}" title="{{$bookshelf->name}}">{{$bookshelf->getShortName(35)}}</a></h2>
|
||||
@if(isset($bookshelf->searchSnippet))
|
||||
<p >{!! $bookshelf->searchSnippet !!}</p>
|
||||
@else
|
||||
<p >{{ $bookshelf->getExcerpt(130) }}</p>
|
||||
@endif
|
||||
</div>
|
||||
<div class="grid-card-footer text-muted text-small">
|
||||
<span>@include('partials.entity-meta', ['entity' => $bookshelf])</span>
|
||||
</div>
|
||||
</div>
|
48
resources/views/shelves/index.blade.php
Normal file
48
resources/views/shelves/index.blade.php
Normal file
@@ -0,0 +1,48 @@
|
||||
@extends('sidebar-layout')
|
||||
|
||||
@section('toolbar')
|
||||
<div class="col-xs-6 faded">
|
||||
<div class="action-buttons text-left">
|
||||
@include('shelves/view-toggle', ['shelvesViewType' => $shelvesViewType])
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6 faded">
|
||||
<div class="action-buttons">
|
||||
@if($currentUser->can('bookshelf-create-all'))
|
||||
<a href="{{ baseUrl("/create-shelf") }}" class="text-pos text-button">@icon('add'){{ trans('entities.shelves_create') }}</a>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@stop
|
||||
|
||||
@section('sidebar')
|
||||
@if($recents)
|
||||
<div id="recents" class="card">
|
||||
<h3>@icon('view') {{ trans('entities.recently_viewed') }}</h3>
|
||||
@include('partials/entity-list', ['entities' => $recents, 'style' => 'compact'])
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div id="popular" class="card">
|
||||
<h3>@icon('popular') {{ trans('entities.shelves_popular') }}</h3>
|
||||
@if(count($popular) > 0)
|
||||
@include('partials/entity-list', ['entities' => $popular, 'style' => 'compact'])
|
||||
@else
|
||||
<div class="body text-muted">{{ trans('entities.shelves_popular_empty') }}</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div id="new" class="card">
|
||||
<h3>@icon('star-circle') {{ trans('entities.shelves_new') }}</h3>
|
||||
@if(count($new) > 0)
|
||||
@include('partials/entity-list', ['entities' => $new, 'style' => 'compact'])
|
||||
@else
|
||||
<div class="body text-muted">{{ trans('entities.shelves_new_empty') }}</div>
|
||||
@endif
|
||||
</div>
|
||||
@stop
|
||||
|
||||
@section('body')
|
||||
@include('shelves/list', ['shelves' => $shelves, 'shelvesViewType' => $shelvesViewType])
|
||||
<p><br></p>
|
||||
@stop
|
10
resources/views/shelves/list-item.blade.php
Normal file
10
resources/views/shelves/list-item.blade.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<div class="shelf entity-list-item" data-entity-type="bookshelf" data-entity-id="{{$bookshelf->id}}">
|
||||
<h4 class="text-shelf"><a class="text-bookshelf entity-list-item-link" href="{{$bookshelf->getUrl()}}">@icon('bookshelf')<span class="entity-list-item-name break-text">{{$bookshelf->name}}</span></a></h4>
|
||||
<div class="entity-item-snippet">
|
||||
@if(isset($bookshelf->searchSnippet))
|
||||
<p class="text-muted break-text">{!! $bookshelf->searchSnippet !!}</p>
|
||||
@else
|
||||
<p class="text-muted break-text">{{ $bookshelf->getExcerpt() }}</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
26
resources/views/shelves/list.blade.php
Normal file
26
resources/views/shelves/list.blade.php
Normal file
@@ -0,0 +1,26 @@
|
||||
|
||||
<div class="container{{ $shelvesViewType === 'list' ? ' small' : '' }}">
|
||||
<h1>{{ trans('entities.shelves') }}</h1>
|
||||
@if(count($shelves) > 0)
|
||||
@if($shelvesViewType === 'grid')
|
||||
<div class="grid third">
|
||||
@foreach($shelves as $key => $shelf)
|
||||
@include('shelves/grid-item', ['bookshelf' => $shelf])
|
||||
@endforeach
|
||||
</div>
|
||||
@else
|
||||
@foreach($shelves as $shelf)
|
||||
@include('shelves/list-item', ['bookshelf' => $shelf])
|
||||
<hr>
|
||||
@endforeach
|
||||
@endif
|
||||
<div>
|
||||
{!! $shelves->render() !!}
|
||||
</div>
|
||||
@else
|
||||
<p class="text-muted">{{ trans('entities.shelves_empty') }}</p>
|
||||
@if(userCan('bookshelf-create-all'))
|
||||
<a href="{{ baseUrl("/create-shelf") }}" class="button outline">@icon('edit'){{ trans('entities.create_now') }}</a>
|
||||
@endif
|
||||
@endif
|
||||
</div>
|
34
resources/views/shelves/restrictions.blade.php
Normal file
34
resources/views/shelves/restrictions.blade.php
Normal file
@@ -0,0 +1,34 @@
|
||||
@extends('simple-layout')
|
||||
|
||||
@section('toolbar')
|
||||
<div class="col-sm-12 faded">
|
||||
@include('shelves._breadcrumbs', ['shelf' => $shelf])
|
||||
</div>
|
||||
@stop
|
||||
|
||||
@section('body')
|
||||
|
||||
<div class="container small">
|
||||
<p> </p>
|
||||
<div class="card">
|
||||
<h3>@icon('lock') {{ trans('entities.shelves_permissions') }}</h3>
|
||||
<div class="body">
|
||||
@include('form/restriction-form', ['model' => $shelf])
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<div class="card">
|
||||
<h3>@icon('copy') {{ trans('entities.shelves_copy_permissions_to_books') }}</h3>
|
||||
<div class="body">
|
||||
<p>{{ trans('entities.shelves_copy_permissions_explain') }}</p>
|
||||
<form action="{{ $shelf->getUrl('/copy-permissions') }}" method="post" class="text-right">
|
||||
{{ csrf_field() }}
|
||||
<button class="button">{{ trans('entities.shelves_copy_permissions') }}</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@stop
|
88
resources/views/shelves/show.blade.php
Normal file
88
resources/views/shelves/show.blade.php
Normal file
@@ -0,0 +1,88 @@
|
||||
@extends('sidebar-layout')
|
||||
|
||||
@section('toolbar')
|
||||
<div class="col-sm-6 col-xs-1 faded">
|
||||
@include('shelves._breadcrumbs', ['shelf' => $shelf])
|
||||
</div>
|
||||
<div class="col-sm-6 col-xs-11">
|
||||
<div class="action-buttons faded">
|
||||
@if(userCan('bookshelf-update', $shelf))
|
||||
<a href="{{ $shelf->getUrl('/edit') }}" class="text-button text-primary">@icon('edit'){{ trans('common.edit') }}</a>
|
||||
@endif
|
||||
@if(userCan('restrictions-manage', $shelf) || userCan('bookshelf-delete', $shelf))
|
||||
<div dropdown class="dropdown-container">
|
||||
<a dropdown-toggle class="text-primary text-button">@icon('more'){{ trans('common.more') }}</a>
|
||||
<ul>
|
||||
@if(userCan('restrictions-manage', $shelf))
|
||||
<li><a href="{{ $shelf->getUrl('/permissions') }}" class="text-primary">@icon('lock'){{ trans('entities.permissions') }}</a></li>
|
||||
@endif
|
||||
@if(userCan('bookshelf-delete', $shelf))
|
||||
<li><a href="{{ $shelf->getUrl('/delete') }}" class="text-neg">@icon('delete'){{ trans('common.delete') }}</a></li>
|
||||
@endif
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@stop
|
||||
|
||||
@section('sidebar')
|
||||
|
||||
@if($shelf->tags->count() > 0)
|
||||
<section>
|
||||
@include('components.tag-list', ['entity' => $shelf])
|
||||
</section>
|
||||
@endif
|
||||
|
||||
<div class="card entity-details">
|
||||
<h3>@icon('info') {{ trans('common.details') }}</h3>
|
||||
<div class="body text-small text-muted blended-links">
|
||||
@include('partials.entity-meta', ['entity' => $shelf])
|
||||
@if($shelf->restricted)
|
||||
<div class="active-restriction">
|
||||
@if(userCan('restrictions-manage', $shelf))
|
||||
<a href="{{ $shelf->getUrl('/permissions') }}">@icon('lock'){{ trans('entities.shelves_permissions_active') }}</a>
|
||||
@else
|
||||
@icon('lock'){{ trans('entities.shelves_permissions_active') }}
|
||||
@endif
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if(count($activity) > 0)
|
||||
<div class="activity card">
|
||||
<h3>@icon('time') {{ trans('entities.recent_activity') }}</h3>
|
||||
@include('partials/activity-list', ['activity' => $activity])
|
||||
</div>
|
||||
@endif
|
||||
@stop
|
||||
|
||||
@section('body')
|
||||
|
||||
<div class="container small nopad">
|
||||
<h1 class="break-text">{{$shelf->name}}</h1>
|
||||
<div class="book-content">
|
||||
<p class="text-muted">{!! nl2br(e($shelf->description)) !!}</p>
|
||||
@if(count($books) > 0)
|
||||
<div class="page-list">
|
||||
<hr>
|
||||
@foreach($books as $book)
|
||||
@include('books/list-item', ['book' => $book])
|
||||
<hr>
|
||||
@endforeach
|
||||
</div>
|
||||
@else
|
||||
<p>
|
||||
<hr>
|
||||
<span class="text-muted italic">{{ trans('entities.shelves_empty_contents') }}</span>
|
||||
@if(userCan('bookshelf-create', $shelf))
|
||||
<br>
|
||||
<a href="{{ $shelf->getUrl('/edit') }}" class="button outline bookshelf">{{ trans('entities.shelves_edit_and_assign') }}</a>
|
||||
@endif
|
||||
</p>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
|
||||
@stop
|
10
resources/views/shelves/view-toggle.blade.php
Normal file
10
resources/views/shelves/view-toggle.blade.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<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>
|
Reference in New Issue
Block a user