- Primarily moved and re-organised view files.
- Included readme within views to document the convention.
- Fixed some issues with page field select list in previous commit.
- Tweaked some route names while going through.
- Split some views out further.
Closes #2805
*/
class Page extends BookChild
{
- public static $listAttributes = ['name', 'id', 'slug', 'book_id', 'text', 'created_at', 'updated_at'];
- public static $contentAttributes = ['name', 'id', 'slug', 'book_id', 'html', 'text', 'created_at', 'updated_at'];
+ public static $listAttributes = ['name', 'id', 'slug', 'book_id', 'chapter_id', 'draft', 'template', 'text', 'created_at', 'updated_at'];
+ public static $contentAttributes = ['name', 'id', 'slug', 'book_id', 'chapter_id', 'draft', 'template', 'html', 'text', 'created_at', 'updated_at'];
protected $fillable = ['name', 'priority', 'markdown'];
*/
public function getTree(bool $showDrafts = false, bool $renderPages = false): Collection
{
- $pages = $this->getPages($showDrafts);
+ $pages = $this->getPages($showDrafts, $renderPages);
$chapters = Chapter::visible()->where('book_id', '=', $this->book->id)->get();
$all = collect()->concat($pages)->concat($chapters);
$chapterMap = $chapters->keyBy('id');
*/
public function render(bool $blankIncludes = false): string
{
- $content = $this->page->html;
+ $content = $this->page->html ?? '';
if (!config('app.allow_content_scripts')) {
$content = HtmlContentFilter::removeScripts($content);
$book = $this->bookRepo->getBySlug($bookSlug);
$bookChildren = (new BookContents($book))->getTree();
- return view('books.sort-box', ['book' => $book, 'bookChildren' => $bookChildren]);
+ return view('books.parts.sort-box', ['book' => $book, 'bookChildren' => $bookChildren]);
}
/**
$shelves = app(BookshelfRepo::class)->getAllPaginated(18, $commonData['sort'], $commonData['order']);
$data = array_merge($commonData, ['shelves' => $shelves]);
- return view('common.home-shelves', $data);
+ return view('home.shelves', $data);
}
if ($homepageOption === 'books') {
$books = $bookRepo->getAllPaginated(18, $commonData['sort'], $commonData['order']);
$data = array_merge($commonData, ['books' => $books]);
- return view('common.home-book', $data);
+ return view('home.books', $data);
}
if ($homepageOption === 'page') {
$pageContent = new PageContent($customHomepage);
$customHomepage->html = $pageContent->render(true);
- return view('common.home-custom', array_merge($commonData, ['customHomepage' => $customHomepage]));
+ return view('home.specific-page', array_merge($commonData, ['customHomepage' => $customHomepage]));
}
- return view('common.home', $commonData);
+ return view('home.default', $commonData);
}
/**
* Get custom head HTML, Used in ajax calls to show in editor.
- *
- * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
*/
public function customHeadContent()
{
- return view('partials.custom-head');
+ return view('common.custom-head');
}
/**
* Show the view for /robots.txt.
*/
- public function getRobots()
+ public function robots()
{
$sitePublic = setting('app-public', false);
$allowRobots = config('app.allow_robots');
}
return response()
- ->view('common.robots', ['allowRobots' => $allowRobots])
+ ->view('misc.robots', ['allowRobots' => $allowRobots])
->header('Content-Type', 'text/plain');
}
/**
* Show the route for 404 responses.
*/
- public function getNotFound()
+ public function notFound()
{
return response()->view('errors.404', [], 404);
}
$imgData = $this->imageRepo->getEntityFiltered('drawio', $parentTypeFilter, $page, 24, $uploadedToFilter, $searchTerm);
- return view('components.image-manager-list', [
+ return view('pages.parts.image-manager-list', [
'images' => $imgData['images'],
'hasMore' => $imgData['has_more'],
]);
$imgData = $this->imageRepo->getEntityFiltered('gallery', $parentTypeFilter, $page, 24, $uploadedToFilter, $searchTerm);
- return view('components.image-manager-list', [
+ return view('pages.parts.image-manager-list', [
'images' => $imgData['images'],
'hasMore' => $imgData['has_more'],
]);
$this->imageRepo->loadThumbs($image);
- return view('components.image-manager-form', [
+ return view('pages.parts.image-manager-form', [
'image' => $image,
'dependantPages' => null,
]);
$this->imageRepo->loadThumbs($image);
- return view('components.image-manager-form', [
+ return view('pages.parts.image-manager-form', [
'image' => $image,
'dependantPages' => $dependantPages ?? null,
]);
$templates->appends(['search' => $search]);
}
- return view('pages.template-manager-list', [
+ return view('pages.parts.template-manager-list', [
'templates' => $templates,
]);
}
$term = $request->get('term', '');
$results = $this->searchRunner->searchBook($bookId, $term);
- return view('partials.entity-list', ['entities' => $results]);
+ return view('entities.list', ['entities' => $results]);
}
/**
$term = $request->get('term', '');
$results = $this->searchRunner->searchChapter($chapterId, $term);
- return view('partials.entity-list', ['entities' => $results]);
+ return view('entities.list', ['entities' => $results]);
}
/**
$entities = (new Popular())->run(20, 0, $entityTypes, $permission);
}
- return view('search.entity-ajax-list', ['entities' => $entities]);
+ return view('search.parts.entity-ajax-list', ['entities' => $entities]);
}
/**
$entities = (new SiblingFetcher())->fetch($type, $id);
- return view('partials.entity-list-basic', ['entities' => $entities, 'style' => 'compact']);
+ return view('entities.list-basic', ['entities' => $entities, 'style' => 'compact']);
}
}
$users = $query->get();
- return view('components.user-select-list', compact('users'));
+ return view('form.user-select-list', compact('users'));
}
}
]);
// View Composers
- View::composer('partials.breadcrumbs', BreadcrumbsViewComposer::class);
+ View::composer('entities.breadcrumbs', BreadcrumbsViewComposer::class);
}
/**
-@extends('simple-layout')
+@extends('layouts.simple')
@section('body')
<div style="overflow: auto;">
<section code-highlighter class="card content-wrap auto-height">
- <h1 class="list-heading text-capitals mb-l">Getting Started</h1>
-
- <h5 id="authentication" class="text-mono mb-m">Authentication</h5>
- <p>
- To access the API a user has to have the <em>"Access System API"</em> permission enabled on one of their assigned roles.
- Permissions to content accessed via the API is limited by the roles & permissions assigned to the user that's used to access the API.
- </p>
- <p>Authentication to use the API is primarily done using API Tokens. Once the <em>"Access System API"</em> permission has been assigned to a user, a "API Tokens" section should be visible when editing their user profile. Choose "Create Token" and enter an appropriate name and expiry date, relevant for your API usage then press "Save". A "Token ID" and "Token Secret" will be immediately displayed. These values should be used as a header in API HTTP requests in the following format:</p>
- <pre><code class="language-css">Authorization: Token <token_id>:<token_secret></code></pre>
- <p>Here's an example of an authorized cURL request to list books in the system:</p>
- <pre><code class="language-shell">curl --request GET \
- --url https://example.com/api/books \
- --header 'Authorization: Token C6mdvEQTGnebsmVn3sFNeeuelGEBjyQp:NOvD3VlzuSVuBPNaf1xWHmy7nIRlaj22'</code></pre>
- <p>If already logged into the system within the browser, via a user account with permission to access the API, the system will also accept an existing session meaning you can browse API endpoints directly in the browser or use the browser devtools to play with the API.</p>
-
- <hr>
-
- <h5 id="request-format" class="text-mono mb-m">Request Format</h5>
- <p>The API is primarily design to be interfaced using JSON so the majority of API endpoints, that accept data, will read JSON request data although <code>application/x-www-form-urlencoded</code> request data is also accepted. Endpoints that receive file data will need data sent in a <code>multipart/form-data</code> format although this will be highlighted in the documentation for such endpoints.</p>
- <p>For endpoints in this documentation that accept data, a "Body Parameters" table will be available showing the parameters that will accepted in the request. Any rules for the values of such parameters, such as the data-type or if they're required, will be shown alongside the parameter name.</p>
-
- <hr>
-
- <h5 id="listing-endpoints" class="text-mono mb-m">Listing Endpoints</h5>
- <p>Some endpoints will return a list of data models. These endpoints will return an array of the model data under a <code>data</code> property along with a numeric <code>total</code> property to indicate the total number of records found for the query within the system. Here's an example of a listing response:</p>
- <pre><code class="language-json">{
- "data": [
- {
- "id": 1,
- "name": "BookStack User Guide",
- "slug": "bookstack-user-guide",
- "description": "This is a general guide on using BookStack on a day-to-day basis.",
- "created_at": "2019-05-05 21:48:46",
- "updated_at": "2019-12-11 20:57:31",
- "created_by": 1,
- "updated_by": 1,
- "image_id": 3
- }
- ],
- "total": 16
-}</code></pre>
- <p>
- There are a number of standard URL parameters that can be supplied to manipulate and page through the results returned from a listing endpoint:
- </p>
- <table class="table">
- <tr>
- <th>Parameter</th>
- <th>Details</th>
- <th width="30%">Examples</th>
- </tr>
- <tr>
- <td>count</td>
- <td>
- Specify how many records will be returned in the response. <br>
- (Default: {{ config('api.default_item_count') }}, Max: {{ config('api.max_item_count') }})
- </td>
- <td>Limit the count to 50<br><code>?count=50</code></td>
- </tr>
- <tr>
- <td>offset</td>
- <td>
- Specify how many records to skip over in the response. <br>
- (Default: 0)
- </td>
- <td>Skip over the first 100 records<br><code>?offset=100</code></td>
- </tr>
- <tr>
- <td>sort</td>
- <td>
- Specify what field is used to sort the data and the direction of the sort (Ascending or Descending).<br>
- Value is the name of a field, A <code>+</code> or <code>-</code> prefix dictates ordering. <br>
- Direction defaults to ascending. <br>
- Can use most fields shown in the response.
- </td>
- <td>
- Sort by name ascending<br><code>?sort=+name</code> <br> <br>
- Sort by "Created At" date descending<br><code>?sort=-created_at</code>
- </td>
- </tr>
- <tr>
- <td>filter[<field>]</td>
- <td>
- Specify a filter to be applied to the query. Can use most fields shown in the response. <br>
- By default a filter will apply a "where equals" query but the below operations are available using the format filter[<field>:<operation>] <br>
- <table>
- <tr>
- <td>eq</td>
- <td>Where <code><field></code> equals the filter value.</td>
- </tr>
- <tr>
- <td>ne</td>
- <td>Where <code><field></code> does not equal the filter value.</td>
- </tr>
- <tr>
- <td>gt</td>
- <td>Where <code><field></code> is greater than the filter value.</td>
- </tr>
- <tr>
- <td>lt</td>
- <td>Where <code><field></code> is less than the filter value.</td>
- </tr>
- <tr>
- <td>gte</td>
- <td>Where <code><field></code> is greater than or equal to the filter value.</td>
- </tr>
- <tr>
- <td>lte</td>
- <td>Where <code><field></code> is less than or equal to the filter value.</td>
- </tr>
- <tr>
- <td>like</td>
- <td>
- Where <code><field></code> is "like" the filter value. <br>
- <code>%</code> symbols can be used as wildcards.
- </td>
- </tr>
- </table>
- </td>
- <td>
- Filter where id is 5: <br><code>?filter[id]=5</code><br><br>
- Filter where id is not 5: <br><code>?filter[id:ne]=5</code><br><br>
- Filter where name contains "cat": <br><code>?filter[name:like]=%cat%</code><br><br>
- Filter where created after 2020-01-01: <br><code>?filter[created_at:gt]=2020-01-01</code>
- </td>
- </tr>
- </table>
-
- <hr>
-
- <h5 id="error-handling" class="text-mono mb-m">Error Handling</h5>
- <p>
- Successful responses will return a 200 or 204 HTTP response code. Errors will return a 4xx or a 5xx HTTP response code depending on the type of error. Errors follow a standard format as shown below. The message provided may be translated depending on the configured language of the system in addition to the API users' language preference. The code provided in the JSON response will match the HTTP response code.
- </p>
-
- <pre><code class="language-json">{
- "error": {
- "code": 401,
- "message": "No authorization token found on the request"
- }
-}
-</code></pre>
-
+ @include('api-docs.parts.getting-started')
</section>
@foreach($docs as $model => $endpoints)
<h1 class="list-heading text-capitals">{{ $model }}</h1>
@foreach($endpoints as $endpoint)
- <h6 class="text-uppercase text-muted float right">{{ $endpoint['controller_method_kebab'] }}</h6>
- <h5 id="{{ $endpoint['name'] }}" class="text-mono mb-m">
- <span class="api-method" data-method="{{ $endpoint['method'] }}">{{ $endpoint['method'] }}</span>
- @if($endpoint['controller_method_kebab'] === 'list')
- <a style="color: inherit;" target="_blank" rel="noopener" href="{{ url($endpoint['uri']) }}">{{ url($endpoint['uri']) }}</a>
- @else
- {{ url($endpoint['uri']) }}
- @endif
- </h5>
- <p class="mb-m">{{ $endpoint['description'] ?? '' }}</p>
- @if($endpoint['body_params'] ?? false)
- <details class="mb-m">
- <summary class="text-muted">Body Parameters</summary>
- <table class="table">
- <tr>
- <th>Param Name</th>
- <th>Value Rules</th>
- </tr>
- @foreach($endpoint['body_params'] as $paramName => $rules)
- <tr>
- <td>{{ $paramName }}</td>
- <td>
- @foreach($rules as $rule)
- <code class="mr-xs">{{ $rule }}</code>
- @endforeach
- </td>
- </tr>
- @endforeach
- </table>
- </details>
- @endif
- @if($endpoint['example_request'] ?? false)
- <details details-highlighter class="mb-m">
- <summary class="text-muted">Example Request</summary>
- <pre><code class="language-json">{{ $endpoint['example_request'] }}</code></pre>
- </details>
- @endif
- @if($endpoint['example_response'] ?? false)
- <details details-highlighter class="mb-m">
- <summary class="text-muted">Example Response</summary>
- <pre><code class="language-json">{{ $endpoint['example_response'] }}</code></pre>
- </details>
- @endif
- @if(!$loop->last)
- <hr>
- @endif
+ @include('api-docs.parts.endpoint', ['endpoint' => $endpoint, 'loop' => $loop])
@endforeach
</section>
@endforeach
--- /dev/null
+<h6 class="text-uppercase text-muted float right">{{ $endpoint['controller_method_kebab'] }}</h6>
+
+<h5 id="{{ $endpoint['name'] }}" class="text-mono mb-m">
+ <span class="api-method" data-method="{{ $endpoint['method'] }}">{{ $endpoint['method'] }}</span>
+ @if($endpoint['controller_method_kebab'] === 'list')
+ <a style="color: inherit;" target="_blank" rel="noopener" href="{{ url($endpoint['uri']) }}">{{ url($endpoint['uri']) }}</a>
+ @else
+ {{ url($endpoint['uri']) }}
+ @endif
+</h5>
+
+<p class="mb-m">{{ $endpoint['description'] ?? '' }}</p>
+
+@if($endpoint['body_params'] ?? false)
+ <details class="mb-m">
+ <summary class="text-muted">Body Parameters</summary>
+ <table class="table">
+ <tr>
+ <th>Param Name</th>
+ <th>Value Rules</th>
+ </tr>
+ @foreach($endpoint['body_params'] as $paramName => $rules)
+ <tr>
+ <td>{{ $paramName }}</td>
+ <td>
+ @foreach($rules as $rule)
+ <code class="mr-xs">{{ $rule }}</code>
+ @endforeach
+ </td>
+ </tr>
+ @endforeach
+ </table>
+ </details>
+@endif
+
+@if($endpoint['example_request'] ?? false)
+ <details details-highlighter class="mb-m">
+ <summary class="text-muted">Example Request</summary>
+ <pre><code class="language-json">{{ $endpoint['example_request'] }}</code></pre>
+ </details>
+@endif
+
+@if($endpoint['example_response'] ?? false)
+ <details details-highlighter class="mb-m">
+ <summary class="text-muted">Example Response</summary>
+ <pre><code class="language-json">{{ $endpoint['example_response'] }}</code></pre>
+ </details>
+@endif
+
+@if(!$loop->last)
+ <hr>
+@endif
\ No newline at end of file
--- /dev/null
+<h1 class="list-heading text-capitals mb-l">Getting Started</h1>
+
+<h5 id="authentication" class="text-mono mb-m">Authentication</h5>
+<p>
+ To access the API a user has to have the <em>"Access System API"</em> permission enabled on one of their assigned roles.
+ Permissions to content accessed via the API is limited by the roles & permissions assigned to the user that's used to access the API.
+</p>
+<p>Authentication to use the API is primarily done using API Tokens. Once the <em>"Access System API"</em> permission has been assigned to a user, a "API Tokens" section should be visible when editing their user profile. Choose "Create Token" and enter an appropriate name and expiry date, relevant for your API usage then press "Save". A "Token ID" and "Token Secret" will be immediately displayed. These values should be used as a header in API HTTP requests in the following format:</p>
+<pre><code class="language-css">Authorization: Token <token_id>:<token_secret></code></pre>
+<p>Here's an example of an authorized cURL request to list books in the system:</p>
+<pre><code class="language-shell">curl --request GET \
+ --url https://example.com/api/books \
+ --header 'Authorization: Token C6mdvEQTGnebsmVn3sFNeeuelGEBjyQp:NOvD3VlzuSVuBPNaf1xWHmy7nIRlaj22'</code></pre>
+<p>If already logged into the system within the browser, via a user account with permission to access the API, the system will also accept an existing session meaning you can browse API endpoints directly in the browser or use the browser devtools to play with the API.</p>
+
+<hr>
+
+<h5 id="request-format" class="text-mono mb-m">Request Format</h5>
+<p>The API is primarily design to be interfaced using JSON so the majority of API endpoints, that accept data, will read JSON request data although <code>application/x-www-form-urlencoded</code> request data is also accepted. Endpoints that receive file data will need data sent in a <code>multipart/form-data</code> format although this will be highlighted in the documentation for such endpoints.</p>
+<p>For endpoints in this documentation that accept data, a "Body Parameters" table will be available showing the parameters that will accepted in the request. Any rules for the values of such parameters, such as the data-type or if they're required, will be shown alongside the parameter name.</p>
+
+<hr>
+
+<h5 id="listing-endpoints" class="text-mono mb-m">Listing Endpoints</h5>
+<p>Some endpoints will return a list of data models. These endpoints will return an array of the model data under a <code>data</code> property along with a numeric <code>total</code> property to indicate the total number of records found for the query within the system. Here's an example of a listing response:</p>
+<pre><code class="language-json">{
+ "data": [
+ {
+ "id": 1,
+ "name": "BookStack User Guide",
+ "slug": "bookstack-user-guide",
+ "description": "This is a general guide on using BookStack on a day-to-day basis.",
+ "created_at": "2019-05-05 21:48:46",
+ "updated_at": "2019-12-11 20:57:31",
+ "created_by": 1,
+ "updated_by": 1,
+ "image_id": 3
+ }
+ ],
+ "total": 16
+}</code></pre>
+<p>
+ There are a number of standard URL parameters that can be supplied to manipulate and page through the results returned from a listing endpoint:
+</p>
+<table class="table">
+ <tr>
+ <th>Parameter</th>
+ <th>Details</th>
+ <th width="30%">Examples</th>
+ </tr>
+ <tr>
+ <td>count</td>
+ <td>
+ Specify how many records will be returned in the response. <br>
+ (Default: {{ config('api.default_item_count') }}, Max: {{ config('api.max_item_count') }})
+ </td>
+ <td>Limit the count to 50<br><code>?count=50</code></td>
+ </tr>
+ <tr>
+ <td>offset</td>
+ <td>
+ Specify how many records to skip over in the response. <br>
+ (Default: 0)
+ </td>
+ <td>Skip over the first 100 records<br><code>?offset=100</code></td>
+ </tr>
+ <tr>
+ <td>sort</td>
+ <td>
+ Specify what field is used to sort the data and the direction of the sort (Ascending or Descending).<br>
+ Value is the name of a field, A <code>+</code> or <code>-</code> prefix dictates ordering. <br>
+ Direction defaults to ascending. <br>
+ Can use most fields shown in the response.
+ </td>
+ <td>
+ Sort by name ascending<br><code>?sort=+name</code> <br> <br>
+ Sort by "Created At" date descending<br><code>?sort=-created_at</code>
+ </td>
+ </tr>
+ <tr>
+ <td>filter[<field>]</td>
+ <td>
+ Specify a filter to be applied to the query. Can use most fields shown in the response. <br>
+ By default a filter will apply a "where equals" query but the below operations are available using the format filter[<field>:<operation>] <br>
+ <table>
+ <tr>
+ <td>eq</td>
+ <td>Where <code><field></code> equals the filter value.</td>
+ </tr>
+ <tr>
+ <td>ne</td>
+ <td>Where <code><field></code> does not equal the filter value.</td>
+ </tr>
+ <tr>
+ <td>gt</td>
+ <td>Where <code><field></code> is greater than the filter value.</td>
+ </tr>
+ <tr>
+ <td>lt</td>
+ <td>Where <code><field></code> is less than the filter value.</td>
+ </tr>
+ <tr>
+ <td>gte</td>
+ <td>Where <code><field></code> is greater than or equal to the filter value.</td>
+ </tr>
+ <tr>
+ <td>lte</td>
+ <td>Where <code><field></code> is less than or equal to the filter value.</td>
+ </tr>
+ <tr>
+ <td>like</td>
+ <td>
+ Where <code><field></code> is "like" the filter value. <br>
+ <code>%</code> symbols can be used as wildcards.
+ </td>
+ </tr>
+ </table>
+ </td>
+ <td>
+ Filter where id is 5: <br><code>?filter[id]=5</code><br><br>
+ Filter where id is not 5: <br><code>?filter[id:ne]=5</code><br><br>
+ Filter where name contains "cat": <br><code>?filter[name:like]=%cat%</code><br><br>
+ Filter where created after 2020-01-01: <br><code>?filter[created_at:gt]=2020-01-01</code>
+ </td>
+ </tr>
+</table>
+
+<hr>
+
+<h5 id="error-handling" class="text-mono mb-m">Error Handling</h5>
+<p>
+ Successful responses will return a 200 or 204 HTTP response code. Errors will return a 4xx or a 5xx HTTP response code depending on the type of error. Errors follow a standard format as shown below. The message provided may be translated depending on the configured language of the system in addition to the API users' language preference. The code provided in the JSON response will match the HTTP response code.
+</p>
+
+<pre><code class="language-json">{
+ "error": {
+ "code": 401,
+ "message": "No authorization token found on the request"
+ }
+}
+</code></pre>
\ No newline at end of file
<button refs="tabs@toggleLink" type="button" class="tab-item {{ $attachment->external ? 'selected' : '' }}">{{ trans('entities.attachments_set_link') }}</button>
</div>
<div refs="tabs@contentFile" class="mb-m {{ $attachment->external ? 'hidden' : '' }}">
- @include('components.dropzone', [
+ @include('form.dropzone', [
'placeholder' => trans('entities.attachments_edit_drop_upload'),
'url' => url('/attachments/upload/' . $attachment->id),
'successMessage' => trans('entities.attachments_file_updated'),
@include('attachments.manager-list', ['attachments' => $page->attachments->all()])
</div>
<div refs="tabs@contentUpload" class="hidden">
- @include('components.dropzone', [
+ @include('form.dropzone', [
'placeholder' => trans('entities.attachments_dropzone'),
'url' => url('/attachments/upload?uploaded_to=' . $page->id),
'successMessage' => trans('entities.attachments_file_uploaded'),
-@extends('simple-layout')
+@extends('layouts.simple')
@section('content')
-@extends('simple-layout')
+@extends('layouts.simple')
@section('content')
<div class="card content-wrap auto-height">
<h1 class="list-heading">{{ Str::title(trans('auth.log_in')) }}</h1>
- @include('auth.forms.login.' . $authMethod)
+ @include('auth.parts.login-form-' . $authMethod)
@if(count($socialDrivers) > 0)
<hr class="my-l">
<div class="grid half collapse-xs gap-xl v-center">
<div class="text-left ml-xxs">
- @include('components.custom-checkbox', [
+ @include('form.custom-checkbox', [
'name' => 'remember',
'checked' => false,
'value' => 'on',
-@extends('simple-layout')
+@extends('layouts.simple')
@section('content')
<div class="container very-small mt-xl">
-@extends('simple-layout')
+@extends('layouts.simple')
@section('content')
-@extends('simple-layout')
+@extends('layouts.simple')
@section('content')
-@extends('simple-layout')
+@extends('layouts.simple')
@section('content')
<div class="container very-small">
-@extends('simple-layout')
+@extends('layouts.simple')
@section('content')
+++ /dev/null
-<div class="breadcrumbs">
- <a href="{{$book->getUrl()}}" class="text-book text-button">@icon('book'){{ $book->getShortName() }}</a>
-</div>
\ No newline at end of file
-@extends('simple-layout')
+@extends('layouts.simple')
@section('body')
<div class="container small">
<div class="my-s">
@if (isset($bookshelf))
- @include('partials.breadcrumbs', ['crumbs' => [
+ @include('entities.breadcrumbs', ['crumbs' => [
$bookshelf,
$bookshelf->getUrl('/create-book') => [
'text' => trans('entities.books_create'),
]
]])
@else
- @include('partials.breadcrumbs', ['crumbs' => [
+ @include('entities.breadcrumbs', ['crumbs' => [
'/books' => [
'text' => trans('entities.books'),
'icon' => 'book'
<main class="content-wrap card">
<h1 class="list-heading">{{ trans('entities.books_create') }}</h1>
<form action="{{ isset($bookshelf) ? $bookshelf->getUrl('/create-book') : url('/books') }}" method="POST" enctype="multipart/form-data">
- @include('books.form', ['returnLocation' => isset($bookshelf) ? $bookshelf->getUrl() : url('/books')])
+ @include('books.parts.form', ['returnLocation' => isset($bookshelf) ? $bookshelf->getUrl() : url('/books')])
</form>
</main>
</div>
-@extends('simple-layout')
+@extends('layouts.simple')
@section('body')
<div class="container small">
<div class="my-s">
- @include('partials.breadcrumbs', ['crumbs' => [
+ @include('entities.breadcrumbs', ['crumbs' => [
$book,
$book->getUrl('/delete') => [
'text' => trans('entities.books_delete'),
-@extends('simple-layout')
+@extends('layouts.simple')
@section('body')
<div class="container small">
<div class="my-s">
- @include('partials.breadcrumbs', ['crumbs' => [
+ @include('entities.breadcrumbs', ['crumbs' => [
$book,
$book->getUrl('/edit') => [
'text' => trans('entities.books_edit'),
<h1 class="list-heading">{{ trans('entities.books_edit') }}</h1>
<form action="{{ $book->getUrl() }}" method="POST" enctype="multipart/form-data">
<input type="hidden" name="_method" value="PUT">
- @include('books.form', ['model' => $book, 'returnLocation' => $book->getUrl()])
+ @include('books.parts.form', ['model' => $book, 'returnLocation' => $book->getUrl()])
</form>
</main>
</div>
-@extends('export-layout')
+@extends('layouts.export')
@section('title', $book->name)
-@extends('tri-layout')
+@extends('layouts.tri')
@section('body')
- @include('books.list', ['books' => $books, 'view' => $view])
+ @include('books.parts.list', ['books' => $books, 'view' => $view])
@stop
@section('left')
@if($recents)
<div id="recents" class="mb-xl">
<h5>{{ trans('entities.recently_viewed') }}</h5>
- @include('partials.entity-list', ['entities' => $recents, 'style' => 'compact'])
+ @include('entities.list', ['entities' => $recents, 'style' => 'compact'])
</div>
@endif
<div id="popular" class="mb-xl">
<h5>{{ trans('entities.books_popular') }}</h5>
@if(count($popular) > 0)
- @include('partials.entity-list', ['entities' => $popular, 'style' => 'compact'])
+ @include('entities.list', ['entities' => $popular, 'style' => 'compact'])
@else
<div class="body text-muted">{{ trans('entities.books_popular_empty') }}</div>
@endif
<div id="new" class="mb-xl">
<h5>{{ trans('entities.books_new') }}</h5>
@if(count($popular) > 0)
- @include('partials.entity-list', ['entities' => $new, 'style' => 'compact'])
+ @include('entities.list', ['entities' => $new, 'style' => 'compact'])
@else
<div class="body text-muted">{{ trans('entities.books_new_empty') }}</div>
@endif
</a>
@endif
- @include('partials.view-toggle', ['view' => $view, 'type' => 'books'])
+ @include('entities.view-toggle', ['view' => $view, 'type' => 'books'])
</div>
</div>
<div class="collapse-content" collapsible-content>
<p class="small">{{ trans('common.cover_image_description') }}</p>
- @include('components.image-picker', [
+ @include('form.image-picker', [
'defaultImage' => url('/book_default_cover.png'),
'currentImage' => (isset($model) && $model->cover) ? $model->getBookCover() : url('/book_default_cover.png') ,
'name' => 'image',
<label for="tag-manager">{{ trans('entities.book_tags') }}</label>
</button>
<div class="collapse-content" collapsible-content>
- @include('components.tag-manager', ['entity' => $book ?? null])
+ @include('entities.tag-manager', ['entity' => $book ?? null])
</div>
</div>
<h1 class="list-heading">{{ trans('entities.books') }}</h1>
<div class="text-m-right my-m">
- @include('partials.sort', ['options' => [
+ @include('entities.sort', ['options' => [
'name' => trans('common.sort_name'),
'created_at' => trans('common.sort_created_at'),
'updated_at' => trans('common.sort_updated_at'),
@if($view === 'list')
<div class="entity-list">
@foreach($books as $book)
- @include('books.list-item', ['book' => $book])
+ @include('books.parts.list-item', ['book' => $book])
@endforeach
</div>
@else
<div class="grid third">
@foreach($books as $key => $book)
- @include('partials.entity-grid-item', ['entity' => $book])
+ @include('entities.grid-item', ['entity' => $book])
@endforeach
</div>
@endif
-@extends('simple-layout')
+@extends('layouts.simple')
@section('body')
<div class="container">
<div class="my-s">
- @include('partials.breadcrumbs', ['crumbs' => [
+ @include('entities.breadcrumbs', ['crumbs' => [
$book,
$book->getUrl('/permissions') => [
'text' => trans('entities.books_permissions'),
-@extends('tri-layout')
+@extends('layouts.tri')
@section('container-attrs')
component="entity-search"
@section('body')
<div class="mb-s">
- @include('partials.breadcrumbs', ['crumbs' => [
+ @include('entities.breadcrumbs', ['crumbs' => [
$book,
]])
</div>
<div class="entity-list book-contents">
@foreach($bookChildren as $childElement)
@if($childElement->isA('chapter'))
- @include('chapters.list-item', ['chapter' => $childElement])
+ @include('chapters.parts.list-item', ['chapter' => $childElement])
@else
- @include('pages.list-item', ['page' => $childElement])
+ @include('pages.parts.list-item', ['page' => $childElement])
@endif
@endforeach
</div>
@endif
</div>
- @include('partials.entity-search-results')
+ @include('entities.search-results')
</main>
@stop
<div class="mb-xl">
<h5>{{ trans('common.details') }}</h5>
<div class="text-small text-muted blended-links">
- @include('partials.entity-meta', ['entity' => $book])
+ @include('entities.meta', ['entity' => $book])
@if($book->restricted)
<div class="active-restriction">
@if(userCan('restrictions-manage', $book))
<hr class="primary-background">
@if(signedInUser())
- @include('partials.entity-favourite-action', ['entity' => $book])
+ @include('entities.favourite-action', ['entity' => $book])
@endif
- @include('partials.entity-export-menu', ['entity' => $book])
+ @include('entities.export-menu', ['entity' => $book])
</div>
</div>
@section('left')
- @include('partials.entity-search-form', ['label' => trans('entities.books_search_this')])
+ @include('entities.search-form', ['label' => trans('entities.books_search_this')])
@if($book->tags->count() > 0)
<div class="mb-xl">
- @include('components.tag-list', ['entity' => $book])
+ @include('entities.tag-list', ['entity' => $book])
</div>
@endif
@if(count($bookParentShelves) > 0)
<div class="actions mb-xl">
<h5>{{ trans('entities.shelves_long') }}</h5>
- @include('partials.entity-list', ['entities' => $bookParentShelves, 'style' => 'compact'])
+ @include('entities.list', ['entities' => $bookParentShelves, 'style' => 'compact'])
</div>
@endif
@if(count($activity) > 0)
<div class="mb-xl">
<h5>{{ trans('entities.recent_activity') }}</h5>
- @include('partials.activity-list', ['activity' => $activity])
+ @include('common.activity-list', ['activity' => $activity])
</div>
@endif
@stop
-@extends('simple-layout')
+@extends('layouts.simple')
@section('body')
<div class="container">
<div class="my-s">
- @include('partials.breadcrumbs', ['crumbs' => [
+ @include('entities.breadcrumbs', ['crumbs' => [
$book,
$book->getUrl('/sort') => [
'text' => trans('entities.books_sort'),
<div book-sort class="card content-wrap">
<h1 class="list-heading mb-l">{{ trans('entities.books_sort') }}</h1>
<div book-sort-boxes>
- @include('books.sort-box', ['book' => $book, 'bookChildren' => $bookChildren])
+ @include('books.parts.sort-box', ['book' => $book, 'bookChildren' => $bookChildren])
</div>
<form action="{{ $book->getUrl('/sort') }}" method="POST">
<main class="card content-wrap">
<h2 class="list-heading mb-m">{{ trans('entities.books_sort_show_other') }}</h2>
- @include('components.entity-selector', ['name' => 'books_list', 'selectorSize' => 'compact', 'entityTypes' => 'book', 'entityPermission' => 'update', 'showAdd' => true])
+ @include('entities.selector', ['name' => 'books_list', 'selectorSize' => 'compact', 'entityTypes' => 'book', 'entityPermission' => 'update', 'showAdd' => true])
</main>
</div>
-@extends('simple-layout')
+@extends('layouts.simple')
@section('body')
<div class="container small">
<div class="my-s">
- @include('partials.breadcrumbs', ['crumbs' => [
+ @include('entities.breadcrumbs', ['crumbs' => [
$book,
$book->getUrl('create-chapter') => [
'text' => trans('entities.chapters_create'),
<main class="content-wrap card">
<h1 class="list-heading">{{ trans('entities.chapters_create') }}</h1>
<form action="{{ $book->getUrl('/create-chapter') }}" method="POST">
- @include('chapters.form')
+ @include('chapters.parts.form')
</form>
</main>
-@extends('simple-layout')
+@extends('layouts.simple')
@section('body')
<div class="container small">
<div class="my-s">
- @include('partials.breadcrumbs', ['crumbs' => [
+ @include('entities.breadcrumbs', ['crumbs' => [
$chapter->book,
$chapter,
$chapter->getUrl('/delete') => [
-@extends('simple-layout')
+@extends('layouts.simple')
@section('body')
<div class="container small">
<div class="my-s">
- @include('partials.breadcrumbs', ['crumbs' => [
+ @include('entities.breadcrumbs', ['crumbs' => [
$book,
$chapter,
$chapter->getUrl('/edit') => [
<h1 class="list-heading">{{ trans('entities.chapters_edit') }}</h1>
<form action="{{ $chapter->getUrl() }}" method="POST">
<input type="hidden" name="_method" value="PUT">
- @include('chapters.form', ['model' => $chapter])
+ @include('chapters.parts.form', ['model' => $chapter])
</form>
</main>
-@extends('export-layout')
+@extends('layouts.export')
@section('title', $chapter->name)
-@extends('simple-layout')
+@extends('layouts.simple')
@section('body')
<div class="container small">
<div class="my-s">
- @include('partials.breadcrumbs', ['crumbs' => [
+ @include('entities.breadcrumbs', ['crumbs' => [
$chapter->book,
$chapter,
$chapter->getUrl('/move') => [
{!! csrf_field() !!}
<input type="hidden" name="_method" value="PUT">
- @include('components.entity-selector', ['name' => 'entity_selection', 'selectorSize' => 'large', 'entityTypes' => 'book', 'entityPermission' => 'chapter-create'])
+ @include('entities.selector', ['name' => 'entity_selection', 'selectorSize' => 'large', 'entityTypes' => 'book', 'entityPermission' => 'chapter-create'])
<div class="form-group text-right">
<a href="{{ $chapter->getUrl() }}" class="button outline">{{ trans('common.cancel') }}</a>
<ul class="sub-menu inset-list @if($isOpen) open @endif" @if($isOpen) style="display: block;" @endif role="menu">
@foreach($bookChild->visible_pages as $childPage)
<li class="list-item-page {{ $childPage->isA('page') && $childPage->draft ? 'draft' : '' }}" role="presentation">
- @include('partials.entity-list-item-basic', ['entity' => $childPage, 'classes' => $current->matches($childPage)? 'selected' : '' ])
+ @include('entities.list-item-basic', ['entity' => $childPage, 'classes' => $current->matches($childPage)? 'selected' : '' ])
</li>
@endforeach
</ul>
<label for="tags">{{ trans('entities.chapter_tags') }}</label>
</button>
<div class="collapse-content" collapsible-content>
- @include('components.tag-manager', ['entity' => $chapter ?? null])
+ @include('entities.tag-manager', ['entity' => $chapter ?? null])
</div>
</div>
class="text-muted chapter-expansion-toggle">@icon('caret-right') <span>{{ trans_choice('entities.x_pages', $chapter->visible_pages->count()) }}</span></button>
<div class="inset-list">
<div class="entity-list-item-children">
- @include('partials.entity-list', ['entities' => $chapter->visible_pages])
+ @include('entities.list', ['entities' => $chapter->visible_pages])
</div>
</div>
</div>
-@extends('simple-layout')
+@extends('layouts.simple')
@section('body')
<div class="container">
<div class="my-s">
- @include('partials.breadcrumbs', ['crumbs' => [
+ @include('entities.breadcrumbs', ['crumbs' => [
$chapter->book,
$chapter,
$chapter->getUrl('/permissions') => [
-@extends('tri-layout')
+@extends('layouts.tri')
@section('container-attrs')
component="entity-search"
@section('body')
<div class="mb-m print-hidden">
- @include('partials.breadcrumbs', ['crumbs' => [
+ @include('entities.breadcrumbs', ['crumbs' => [
$chapter->book,
$chapter,
]])
@if(count($pages) > 0)
<div class="entity-list book-contents">
@foreach($pages as $page)
- @include('pages.list-item', ['page' => $page])
+ @include('pages.parts.list-item', ['page' => $page])
@endforeach
</div>
@else
@endif
</div>
- @include('partials.entity-search-results')
+ @include('entities.search-results')
</main>
- @include('partials.entity-sibling-navigation', ['next' => $next, 'previous' => $previous])
+ @include('entities.sibling-navigation', ['next' => $next, 'previous' => $previous])
@stop
<div class="mb-xl">
<h5>{{ trans('common.details') }}</h5>
<div class="blended-links text-small text-muted">
- @include('partials.entity-meta', ['entity' => $chapter])
+ @include('entities.meta', ['entity' => $chapter])
@if($book->restricted)
<div class="active-restriction">
<hr class="primary-background"/>
@if(signedInUser())
- @include('partials.entity-favourite-action', ['entity' => $chapter])
+ @include('entities.favourite-action', ['entity' => $chapter])
@endif
- @include('partials.entity-export-menu', ['entity' => $chapter])
+ @include('entities.export-menu', ['entity' => $chapter])
</div>
</div>
@stop
@section('left')
- @include('partials.entity-search-form', ['label' => trans('entities.chapters_search_this')])
+ @include('entities.search-form', ['label' => trans('entities.chapters_search_this')])
@if($chapter->tags->count() > 0)
<div class="mb-xl">
- @include('components.tag-list', ['entity' => $chapter])
+ @include('entities.tag-list', ['entity' => $chapter])
</div>
@endif
- @include('partials.book-tree', ['book' => $book, 'sidebarTree' => $sidebarTree])
+ @include('entities.book-tree', ['book' => $book, 'sidebarTree' => $sidebarTree])
@stop
<div comment-content class="content px-s pb-s">
<div class="form-group loading" style="display: none;">
- @include('partials.loading-icon', ['text' => trans('entities.comment_deleting')])
+ @include('common.loading-icon', ['text' => trans('entities.comment_deleting')])
</div>
{!! $comment->html !!}
</div>
<button type="submit" class="button">{{ trans('entities.comment_save') }}</button>
</div>
<div class="form-group loading" style="display: none;">
- @include('partials.loading-icon', ['text' => trans('entities.comment_saving')])
+ @include('common.loading-icon', ['text' => trans('entities.comment_saving')])
</div>
</form>
</div>
<button type="submit" class="button">{{ trans('entities.comment_save') }}</button>
</div>
<div class="form-group loading" style="display: none;">
- @include('partials.loading-icon', ['text' => trans('entities.comment_saving')])
+ @include('common.loading-icon', ['text' => trans('entities.comment_saving')])
</div>
</form>
</div>
<div class="activity-list">
@foreach($activity as $activityItem)
<div class="activity-list-item">
- @include('partials.activity-item', ['activity' => $activityItem])
+ @include('common.activity-item', ['activity' => $activityItem])
</div>
@endforeach
</div>
-@extends('simple-layout')
+@extends('layouts.simple')
@section('body')
<div class="container small pt-xl">
<h1 class="list-heading">{{ $title }}</h1>
<div class="book-contents">
- @include('partials.entity-list', ['entities' => $entities, 'style' => 'detailed'])
+ @include('entities.list', ['entities' => $entities, 'style' => 'detailed'])
</div>
<div class="text-center">
-@extends('simple-layout')
+@extends('layouts.simple')
@section('body')
<div class="container small pt-xl">
<h1 class="list-heading">{{ $title }}</h1>
<div class="book-contents">
- @include('partials.entity-list', ['entities' => $entities, 'style' => 'detailed'])
+ @include('entities.list', ['entities' => $entities, 'style' => 'detailed'])
</div>
<div class="text-right">
</li>
<li><hr></li>
<li>
- @include('partials.dark-mode-toggle')
+ @include('common.dark-mode-toggle')
</li>
</ul>
</div>
<ul class="sidebar-page-list mt-xs menu entity-list">
@if (userCan('view', $book))
<li class="list-item-book book">
- @include('partials.entity-list-item-basic', ['entity' => $book, 'classes' => ($current->matches($book)? 'selected' : '')])
+ @include('entities.list-item-basic', ['entity' => $book, 'classes' => ($current->matches($book)? 'selected' : '')])
</li>
@endif
@foreach($sidebarTree as $bookChild)
<li class="list-item-{{ $bookChild->getType() }} {{ $bookChild->getType() }} {{ $bookChild->isA('page') && $bookChild->draft ? 'draft' : '' }}">
- @include('partials.entity-list-item-basic', ['entity' => $bookChild, 'classes' => $current->matches($bookChild)? 'selected' : ''])
+ @include('entities.list-item-basic', ['entity' => $bookChild, 'classes' => $current->matches($bookChild)? 'selected' : ''])
@if($bookChild->isA('chapter') && count($bookChild->visible_pages) > 0)
<div class="entity-list-item no-hover">
<span role="presentation" class="icon text-chapter"></span>
<div class="content">
- @include('chapters.child-menu', [
+ @include('chapters.parts.child-menu', [
'chapter' => $bookChild,
'current' => $current,
'isOpen' => $bookChild->matchesOrContains($current)
type="text">
</div>
<div refs="dropdown-search@loading">
- @include('partials.loading-icon')
+ @include('common.loading-icon')
</div>
<div refs="dropdown-search@listContainer" class="dropdown-search-list px-m"></div>
</div>
</a>
@elseif($isEntity && userCan('view', $crumb))
@if($breadcrumbCount > 0)
- @include('partials.breadcrumb-listing', ['entity' => $crumb])
+ @include('entities.breadcrumb-listing', ['entity' => $crumb])
@endif
<a href="{{ $crumb->getUrl() }}" class="text-{{$crumb->getType()}} icon-list-item outline-hover">
<span>@icon($crumb->getType())</span>
<div class="entity-list {{ $style ?? '' }}">
@if(count($entities) > 0)
@foreach($entities as $index => $entity)
- @include('partials.entity-list-item-basic', ['entity' => $entity])
+ @include('entities.list-item-basic', ['entity' => $entity])
@endforeach
@else
<p class="text-muted empty-text">
-@component('partials.entity-list-item-basic', ['entity' => $entity])
+@component('entities.list-item-basic', ['entity' => $entity])
<div class="entity-item-snippet">
@if(($showTags ?? false) && $entity->tags->count() > 0)
<div class="entity-item-tags mt-xs">
- @include('components.tag-list', ['entity' => $entity, 'linked' => false ])
+ @include('entities.tag-list', ['entity' => $entity, 'linked' => false ])
</div>
@endif
@if(count($entities) > 0)
<div class="entity-list {{ $style ?? '' }}">
@foreach($entities as $index => $entity)
- @include('partials.entity-list-item', ['entity' => $entity, 'showPath' => $showPath ?? false, 'showTags' => $showTags ?? false])
+ @include('entities.list-item', ['entity' => $entity, 'showPath' => $showPath ?? false, 'showTags' => $showTags ?? false])
@endforeach
</div>
@else
</div>
<div refs="entity-search@loadingBlock">
- @include('partials.loading-icon')
+ @include('common.loading-icon')
</div>
<div class="book-contents" refs="entity-search@searchResults"></div>
</div>
\ No newline at end of file
<div class="popup-title">{{ trans('entities.entity_select') }}</div>
<button refs="popup@hide" type="button" class="popup-header-close">x</button>
</div>
- @include('components.entity-selector', ['name' => 'entity-selector'])
+ @include('entities.selector', ['name' => 'entity-selector'])
<div class="popup-footer">
<button refs="entity-selector-popup@select" type="button" disabled="true" class="button corner-button">{{ trans('common.select') }}</button>
</div>
option:entity-selector:entity-permission="{{ $entityPermission ?? 'view' }}">
<input refs="entity-selector@input" type="hidden" name="{{$name}}" value="">
<input type="text" placeholder="{{ trans('common.search') }}" @if($autofocus ?? false) autofocus @endif refs="entity-selector@search">
- <div class="text-center loading" refs="entity-selector@loading">@include('partials.loading-icon')</div>
+ <div class="text-center loading" refs="entity-selector@loading">@include('common.loading-icon')</div>
<div refs="entity-selector@results"></div>
@if($showAdd ?? false)
<div class="entity-selector-add">
<div component="sortable-list"
option:sortable-list:handle-selector=".handle">
- @include('components.tag-manager-list', ['tags' => $entity ? $entity->tags->all() : []])
+ @include('entities.tag-manager-list', ['tags' => $entity ? $entity->tags->all() : []])
</div>
<button refs="add-remove-rows@add" type="button" class="text-button">{{ trans('entities.tags_add') }}</button>
-@extends('simple-layout')
+@extends('layouts.simple')
@section('content')
<div class="container mt-l">
<div class="card mb-xl">
<h3 class="card-title">{{ trans('entities.pages_popular') }}</h3>
<div class="px-m">
- @include('partials.entity-list', ['entities' => (new \BookStack\Entities\Queries\Popular)->run(10, 0, ['page']), 'style' => 'compact'])
+ @include('entities.list', ['entities' => (new \BookStack\Entities\Queries\Popular)->run(10, 0, ['page']), 'style' => 'compact'])
</div>
</div>
</div>
<div class="card mb-xl">
<h3 class="card-title">{{ trans('entities.books_popular') }}</h3>
<div class="px-m">
- @include('partials.entity-list', ['entities' => (new \BookStack\Entities\Queries\Popular)->run(10, 0, ['book']), 'style' => 'compact'])
+ @include('entities.list', ['entities' => (new \BookStack\Entities\Queries\Popular)->run(10, 0, ['book']), 'style' => 'compact'])
</div>
</div>
</div>
<div class="card mb-xl">
<h3 class="card-title">{{ trans('entities.chapters_popular') }}</h3>
<div class="px-m">
- @include('partials.entity-list', ['entities' => (new \BookStack\Entities\Queries\Popular)->run(10, 0, ['chapter']), 'style' => 'compact'])
+ @include('entities.list', ['entities' => (new \BookStack\Entities\Queries\Popular)->run(10, 0, ['chapter']), 'style' => 'compact'])
</div>
</div>
</div>
-@extends('base')
+@extends('layouts.base')
@section('content')
-@extends('simple-layout')
+@extends('layouts.simple')
@section('content')
$errors?
$model?
--}}
-@include('components.custom-checkbox', [
+@include('form.custom-checkbox', [
'name' => $name,
'label' => $label,
'value' => 'true',
<div>
<div class="form-group">
<label for="owner">{{ trans('entities.permissions_owner') }}</label>
- @include('components.user-select', ['user' => $model->ownedBy, 'name' => 'owned_by', 'compact' => false])
+ @include('form.user-select', ['user' => $model->ownedBy, 'name' => 'owned_by', 'compact' => false])
</div>
</div>
</div>
$action
$model?
--}}
-@include('components.custom-checkbox', [
+@include('form.custom-checkbox', [
'name' => $name . '[' . $role->id . '][' . $action . ']',
'label' => $label,
'value' => 'true',
<div class="toggle-switch-list dual-column-content">
@foreach($roles as $role)
<div>
- @include('components.custom-checkbox', [
+ @include('form.custom-checkbox', [
'name' => $name . '[' . strval($role->id) . ']',
'label' => $role->display_name,
'value' => $role->id,
type="text">
</div>
<div refs="dropdown-search@loading" class="text-center">
- @include('partials.loading-icon')
+ @include('common.loading-icon')
</div>
<div refs="dropdown-search@listContainer" class="dropdown-search-list"></div>
</div>
-@extends('tri-layout')
+@extends('layouts.tri')
@section('body')
- @include('books.list', ['books' => $books, 'view' => $view])
+ @include('books.parts.list', ['books' => $books, 'view' => $view])
@stop
@section('left')
- @include('common.home-sidebar')
+ @include('home.parts.sidebar')
@stop
@section('right')
<span>{{ trans('entities.books_create') }}</span>
</a>
@endif
- @include('partials.view-toggle', ['view' => $view, 'type' => 'books'])
- @include('components.expand-toggle', ['classes' => 'text-primary', 'target' => '.entity-list.compact .entity-item-snippet', 'key' => 'home-details'])
- @include('partials.dark-mode-toggle', ['classes' => 'icon-list-item text-primary'])
+ @include('entities.view-toggle', ['view' => $view, 'type' => 'books'])
+ @include('home.parts.expand-toggle', ['classes' => 'text-primary', 'target' => '.entity-list.compact .entity-item-snippet', 'key' => 'home-details'])
+ @include('common.dark-mode-toggle', ['classes' => 'icon-list-item text-primary'])
</div>
</div>
@stop
-@extends('simple-layout')
+@extends('layouts.simple')
@section('body')
<div class="grid half">
<div>
<div class="icon-list inline block">
- @include('components.expand-toggle', ['classes' => 'text-muted text-primary', 'target' => '.entity-list.compact .entity-item-snippet', 'key' => 'home-details'])
+ @include('home.parts.expand-toggle', ['classes' => 'text-muted text-primary', 'target' => '.entity-list.compact .entity-item-snippet', 'key' => 'home-details'])
</div>
</div>
<div class="text-m-right">
<div class="icon-list inline block">
- @include('partials.dark-mode-toggle', ['classes' => 'text-muted icon-list-item text-primary'])
+ @include('common.dark-mode-toggle', ['classes' => 'text-muted icon-list-item text-primary'])
</div>
</div>
</div>
<div id="recent-drafts" class="card mb-xl">
<h3 class="card-title">{{ trans('entities.my_recent_drafts') }}</h3>
<div class="px-m">
- @include('partials.entity-list', ['entities' => $draftPages, 'style' => 'compact'])
+ @include('entities.list', ['entities' => $draftPages, 'style' => 'compact'])
</div>
</div>
@endif
<div id="{{ auth()->check() ? 'recently-viewed' : 'recent-books' }}" class="card mb-xl">
<h3 class="card-title">{{ trans('entities.' . (auth()->check() ? 'my_recently_viewed' : 'books_recent')) }}</h3>
<div class="px-m">
- @include('partials.entity-list', [
+ @include('entities.list', [
'entities' => $recents,
'style' => 'compact',
'emptyText' => auth()->check() ? trans('entities.no_pages_viewed') : trans('entities.books_empty')
<a href="{{ url('/favourites') }}" class="no-color">{{ trans('entities.my_most_viewed_favourites') }}</a>
</h3>
<div class="px-m">
- @include('partials.entity-list', [
+ @include('entities.list', [
'entities' => $favourites,
'style' => 'compact',
])
<div id="recent-pages" class="card mb-xl">
<h3 class="card-title"><a class="no-color" href="{{ url("/pages/recently-updated") }}">{{ trans('entities.recently_updated_pages') }}</a></h3>
<div id="recently-updated-pages" class="px-m">
- @include('partials.entity-list', [
+ @include('entities.list', [
'entities' => $recentlyUpdatedPages,
'style' => 'compact',
'emptyText' => trans('entities.no_pages_recently_updated')
<div id="recent-activity">
<div class="card mb-xl">
<h3 class="card-title">{{ trans('entities.recent_activity') }}</h3>
- @include('partials.activity-list', ['activity' => $activity])
+ @include('common.activity-list', ['activity' => $activity])
</div>
</div>
</div>
@if(count($draftPages) > 0)
<div id="recent-drafts" class="mb-xl">
<h5>{{ trans('entities.my_recent_drafts') }}</h5>
- @include('partials.entity-list', ['entities' => $draftPages, 'style' => 'compact'])
+ @include('entities.list', ['entities' => $draftPages, 'style' => 'compact'])
</div>
@endif
<h5>
<a href="{{ url('/favourites') }}" class="no-color">{{ trans('entities.my_most_viewed_favourites') }}</a>
</h5>
- @include('partials.entity-list', [
+ @include('entities.list', [
'entities' => $favourites,
'style' => 'compact',
])
<div class="mb-xl">
<h5>{{ trans('entities.' . (auth()->check() ? 'my_recently_viewed' : 'books_recent')) }}</h5>
- @include('partials.entity-list', [
+ @include('entities.list', [
'entities' => $recents,
'style' => 'compact',
'emptyText' => auth()->check() ? trans('entities.no_pages_viewed') : trans('entities.books_empty')
<div class="mb-xl">
<h5><a class="no-color" href="{{ url("/pages/recently-updated") }}">{{ trans('entities.recently_updated_pages') }}</a></h5>
<div id="recently-updated-pages">
- @include('partials.entity-list', [
+ @include('entities.list', [
'entities' => $recentlyUpdatedPages,
'style' => 'compact',
'emptyText' => trans('entities.no_pages_recently_updated')
<div id="recent-activity" class="mb-xl">
<h5>{{ trans('entities.recent_activity') }}</h5>
- @include('partials.activity-list', ['activity' => $activity])
+ @include('common.activity-list', ['activity' => $activity])
</div>
\ No newline at end of file
-@extends('tri-layout')
+@extends('layouts.tri')
@section('body')
- @include('shelves.list', ['shelves' => $shelves, 'view' => $view])
+ @include('shelves.parts.list', ['shelves' => $shelves, 'view' => $view])
@stop
@section('left')
- @include('common.home-sidebar')
+ @include('home.parts.sidebar')
@stop
@section('right')
<span>{{ trans('entities.shelves_new_action') }}</span>
</a>
@endif
- @include('partials.view-toggle', ['view' => $view, 'type' => 'shelves'])
- @include('components.expand-toggle', ['classes' => 'text-primary', 'target' => '.entity-list.compact .entity-item-snippet', 'key' => 'home-details'])
- @include('partials.dark-mode-toggle', ['classes' => 'icon-list-item text-primary'])
+ @include('entities.view-toggle', ['view' => $view, 'type' => 'shelves'])
+ @include('home.parts.expand-toggle', ['classes' => 'text-primary', 'target' => '.entity-list.compact .entity-item-snippet', 'key' => 'home-details'])
+ @include('common.dark-mode-toggle', ['classes' => 'icon-list-item text-primary'])
</div>
</div>
@stop
-@extends('tri-layout')
+@extends('layouts.tri')
@section('body')
<div class="mt-m">
<main class="content-wrap card">
<div class="page-content" page-display="{{ $customHomepage->id }}">
- @include('pages.page-display', ['page' => $customHomepage])
+ @include('pages.parts.page-display', ['page' => $customHomepage])
</div>
</main>
</div>
@stop
@section('left')
- @include('common.home-sidebar')
+ @include('home.parts.sidebar')
@stop
@section('right')
<div class="actions mb-xl">
<h5>{{ trans('common.actions') }}</h5>
<div class="icon-list text-primary">
- @include('components.expand-toggle', ['classes' => 'text-primary', 'target' => '.entity-list.compact .entity-item-snippet', 'key' => 'home-details'])
- @include('partials.dark-mode-toggle', ['classes' => 'icon-list-item text-primary'])
+ @include('home.parts.expand-toggle', ['classes' => 'text-primary', 'target' => '.entity-list.compact .entity-item-snippet', 'key' => 'home-details'])
+ @include('common.dark-mode-toggle', ['classes' => 'icon-list-item text-primary'])
</div>
</div>
@stop
\ No newline at end of file
@yield('head')
<!-- Custom Styles & Head Content -->
- @include('partials.custom-styles')
- @include('partials.custom-head')
+ @include('common.custom-styles')
+ @include('common.custom-head')
@stack('head')
</head>
<body class="@yield('body-class')">
- @include('common.parts.skip-to-content')
- @include('partials.notifications')
+ @include('common.skip-to-content')
+ @include('common.notifications')
@include('common.header')
<div id="content" components="@yield('content-components')" class="block">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>@yield('title')</title>
- @include('partials.export-styles', ['format' => $format])
- @include('partials.export-custom-head')
+ @include('common.export-styles', ['format' => $format])
+ @include('common.export-custom-head')
</head>
<body>
<div class="page-content">
-@extends('base')
+@extends('layouts.base')
@section('content')
-@extends('base')
+@extends('layouts.base')
@section('body-class', 'tri-layout')
@section('content-components', 'tri-layout')
-@extends('simple-layout')
+@extends('layouts.simple')
@section('body')
-@extends('simple-layout')
+@extends('layouts.simple')
@section('body')
<div class="container small py-xl">
<div class="setting-list">
@foreach(['totp', 'backup_codes'] as $method)
- @include('mfa.setup-method-row', ['method' => $method])
+ @include('mfa.parts.setup-method-row', ['method' => $method])
@endforeach
</div>
-@extends('simple-layout')
+@extends('layouts.simple')
@section('body')
-@extends('simple-layout')
+@extends('layouts.simple')
@section('body')
<div class="container very-small py-xl">
@if($method)
<hr class="my-l">
- @include('mfa.verify.' . $method)
+ @include('mfa.parts.verify-' . $method)
@endif
@if(count($otherMethods) > 0)
-@extends('simple-layout')
+@extends('layouts.simple')
@section('body')
<div class="container small">
<div class="my-s">
- @include('partials.breadcrumbs', ['crumbs' => [
+ @include('entities.breadcrumbs', ['crumbs' => [
$page->book,
$page->chapter,
$page,
<label for="entity_selection">{{ trans('entities.pages_copy_desination') }}</label>
</button>
<div class="collapse-content" collapsible-content>
- @include('components.entity-selector', ['name' => 'entity_selection', 'selectorSize' => 'large', 'entityTypes' => 'book,chapter', 'entityPermission' => 'page-create'])
+ @include('entities.selector', ['name' => 'entity_selection', 'selectorSize' => 'large', 'entityTypes' => 'book,chapter', 'entityPermission' => 'page-create'])
</div>
</div>
-@extends('simple-layout')
+@extends('layouts.simple')
@section('body')
<div class="container small">
<div class="my-s">
- @include('partials.breadcrumbs', ['crumbs' => [
+ @include('entities.breadcrumbs', ['crumbs' => [
$page->book,
$page->chapter,
$page,
-@extends('base')
+@extends('layouts.base')
@section('head')
<script src="{{ url('/libs/tinymce/tinymce.min.js?ver=4.9.4') }}"></script>
@if(!isset($isDraft))
<input type="hidden" name="_method" value="PUT">
@endif
- @include('pages.form', ['model' => $page])
- @include('pages.editor-toolbox')
+ @include('pages.parts.form', ['model' => $page])
+ @include('pages.parts.editor-toolbox')
</form>
</div>
- @include('components.image-manager', ['uploaded_to' => $page->id])
- @include('components.code-editor')
- @include('components.entity-selector-popup')
+ @include('pages.parts.image-manager', ['uploaded_to' => $page->id])
+ @include('pages.parts.code-editor')
+ @include('entities.selector-popup')
@stop
\ No newline at end of file
-@extends('export-layout')
+@extends('layouts.export')
@section('title', $page->name)
@section('content')
- @include('pages.page-display')
+ @include('pages.parts.page-display')
<hr>
<div class="text-muted text-small">
- @include('partials.entity-export-meta', ['entity' => $page])
+ @include('entities.export-meta', ['entity' => $page])
</div>
@endsection
\ No newline at end of file
-@extends('simple-layout')
+@extends('layouts.simple')
@section('body')
<div class="container small">
<div class="my-s">
- @include('partials.breadcrumbs', ['crumbs' => [
+ @include('entities.breadcrumbs', ['crumbs' => [
($parent->isA('chapter') ? $parent->book : null),
$parent,
$parent->getUrl('/create-page') => [
-@extends('simple-layout')
+@extends('layouts.simple')
@section('body')
<div class="container small">
<div class="my-s">
- @include('partials.breadcrumbs', ['crumbs' => [
+ @include('entities.breadcrumbs', ['crumbs' => [
$page->book,
$page->chapter,
$page,
{!! csrf_field() !!}
<input type="hidden" name="_method" value="PUT">
- @include('components.entity-selector', ['name' => 'entity_selection', 'selectorSize' => 'large', 'entityTypes' => 'book,chapter', 'entityPermission' => 'page-create', 'autofocus' => true])
+ @include('entities.selector', ['name' => 'entity_selection', 'selectorSize' => 'large', 'entityTypes' => 'book,chapter', 'entityPermission' => 'page-create', 'autofocus' => true])
<div class="form-group text-right">
<a href="{{ $page->getUrl() }}" class="button outline">{{ trans('common.cancel') }}</a>
<div toolbox-tab-content="tags">
<h4>{{ trans('entities.page_tags') }}</h4>
<div class="px-l">
- @include('components.tag-manager', ['entity' => $page])
+ @include('entities.tag-manager', ['entity' => $page])
</div>
</div>
<h4>{{ trans('entities.templates') }}</h4>
<div class="px-l">
- @include('pages.template-manager', ['page' => $page, 'templates' => $templates])
+ @include('pages.parts.template-manager', ['page' => $page, 'templates' => $templates])
</div>
</div>
{{--WYSIWYG Editor--}}
@if(setting('app-editor') === 'wysiwyg')
- @include('pages.wysiwyg-editor', ['model' => $model])
+ @include('pages.parts.wysiwyg-editor', ['model' => $model])
@endif
{{--Markdown Editor--}}
@if(setting('app-editor') === 'markdown')
- @include('pages.markdown-editor', ['model' => $model])
+ @include('pages.parts.markdown-editor', ['model' => $model])
@endif
</div>
<div class="image-manager-sidebar flex-container-column">
<div refs="image-manager@dropzoneContainer">
- @include('components.dropzone', [
+ @include('form.dropzone', [
'placeholder' => trans('components.image_dropzone'),
'successMessage' => trans('components.image_upload_success'),
'url' => url('/images/gallery?' . http_build_query(['uploaded_to' => $uploaded_to ?? 0]))
-@component('partials.entity-list-item-basic', ['entity' => $page])
+@component('entities.list-item-basic', ['entity' => $page])
<div class="entity-item-snippet">
<p class="text-muted break-text">{{ $page->getExcerpt() }}</p>
</div>
<p class="text-muted small mb-none">
{{ trans('entities.templates_explain_set_as_template') }}
</p>
- @include('components.toggle-switch', [
+ @include('form.toggle-switch', [
'name' => 'template',
'value' => old('template', $page->template ? 'true' : 'false') === 'true',
'label' => trans('entities.templates_set_as_template')
@endif
<div template-manager-list>
- @include('pages.template-manager-list', ['templates' => $templates])
+ @include('pages.parts.template-manager-list', ['templates' => $templates])
</div>
</div>
\ No newline at end of file
-@extends('simple-layout')
+@extends('layouts.simple')
@section('body')
<div class="container">
<div class="my-s">
- @include('partials.breadcrumbs', ['crumbs' => [
+ @include('entities.breadcrumbs', ['crumbs' => [
$page->book,
$page->chapter,
$page,
-@extends('tri-layout')
+@extends('layouts.tri')
@section('left')
<div id="revision-details" class="entity-details mb-xl">
<h5>{{ trans('common.details') }}</h5>
<div class="body text-small text-muted">
- @include('partials.entity-meta', ['entity' => $revision])
+ @include('entities.meta', ['entity' => $revision])
</div>
</div>
@stop
@section('body')
<div class="mb-m print-hidden">
- @include('partials.breadcrumbs', ['crumbs' => [
+ @include('entities.breadcrumbs', ['crumbs' => [
$page->$book,
$page->chapter,
$page,
<main class="card content-wrap">
<div class="page-content page-revision">
- @include('pages.page-display')
+ @include('pages.parts.page-display')
</div>
</main>
-@extends('simple-layout')
+@extends('layouts.simple')
@section('body')
<div class="container">
<div class="my-s">
- @include('partials.breadcrumbs', ['crumbs' => [
+ @include('entities.breadcrumbs', ['crumbs' => [
$page->book,
$page->chapter,
$page,
-@extends('tri-layout')
+@extends('layouts.tri')
@push('social-meta')
<meta property="og:description" content="{{ Str::limit($page->text, 100, '...') }}">
@section('body')
<div class="mb-m print-hidden">
- @include('partials.breadcrumbs', ['crumbs' => [
+ @include('entities.breadcrumbs', ['crumbs' => [
$page->book,
$page->hasChapter() ? $page->chapter : null,
$page,
<main class="content-wrap card">
<div class="page-content clearfix" page-display="{{ $page->id }}">
- @include('pages.pointer', ['page' => $page])
- @include('pages.page-display')
+ @include('pages.parts.pointer', ['page' => $page])
+ @include('pages.parts.page-display')
</div>
</main>
- @include('partials.entity-sibling-navigation', ['next' => $next, 'previous' => $previous])
+ @include('entities.sibling-navigation', ['next' => $next, 'previous' => $previous])
@if ($commentsEnabled)
@if(($previous || $next))
@if($page->tags->count() > 0)
<section>
- @include('components.tag-list', ['entity' => $page])
+ @include('entities.tag-list', ['entity' => $page])
</section>
@endif
</nav>
@endif
- @include('partials.book-tree', ['book' => $book, 'sidebarTree' => $sidebarTree])
+ @include('entities.book-tree', ['book' => $book, 'sidebarTree' => $sidebarTree])
@stop
@section('right')
<div id="page-details" class="entity-details mb-xl">
<h5>{{ trans('common.details') }}</h5>
<div class="body text-small blended-links">
- @include('partials.entity-meta', ['entity' => $page])
+ @include('entities.meta', ['entity' => $page])
@if($book->restricted)
<div class="active-restriction">
<hr class="primary-background"/>
@if(signedInUser())
- @include('partials.entity-favourite-action', ['entity' => $page])
+ @include('entities.favourite-action', ['entity' => $page])
@endif
- @include('partials.entity-export-menu', ['entity' => $page])
+ @include('entities.export-menu', ['entity' => $page])
</div>
</div>
--- /dev/null
+# BookStack Views
+
+All views within this folder are [Laravel blade](https://laravel.com/docs/6.x/blade) views.
+
+### Overriding
+
+Views can be overridden on a per-file basis via the visual theme system.
+More information on this can be found within the `dev/docs/visual-theme-system.md`
+file within this project.
+
+### Convention
+
+Views are broken down into rough domain areas. These aren't too strict although many of the folders
+here will often match up to a HTTP controller.
+
+Within each folder views will be structured like so:
+
+```txt
+- folder/
+ - page-a.blade.php
+ - page-b.blade.php
+ - parts/
+ - partial-a.blade.php
+ - partial-b.blade.php
+ - subdomain/
+ - subdomain-page-a.blade.php
+ - subdomain-page-b.blade.php
+ - parts/
+ - subdomain-partial-a.blade.php
+ - subdomain-partial-b.blade.php
+```
+
+If a folder contains no pages at all (For example: `attachments`, `form`) and only partials, then
+the partials can be within the top-level folder instead of pages to prevent unneeded nesting.
+
+If a partial depends on another partial within the same directory, the naming of the child partials should be an extension of the parent.
+For example:
+
+```txt
+- tag-manager.blade.php
+- tag-manager-list.blade.php
+- tag-manager-input.blade.php
+```
\ No newline at end of file
-@extends('simple-layout')
+@extends('layouts.simple')
@section('body')
<div class="container mt-xl" id="search-system">
$types = explode('|', $options->filters['type'] ?? '');
$hasTypes = $types[0] !== '';
?>
- @include('search.form.type-filter', ['checked' => !$hasTypes || in_array('page', $types), 'entity' => 'page', 'transKey' => 'page'])
- @include('search.form.type-filter', ['checked' => !$hasTypes || in_array('chapter', $types), 'entity' => 'chapter', 'transKey' => 'chapter'])
+ @include('search.parts.type-filter', ['checked' => !$hasTypes || in_array('page', $types), 'entity' => 'page', 'transKey' => 'page'])
+ @include('search.parts.type-filter', ['checked' => !$hasTypes || in_array('chapter', $types), 'entity' => 'chapter', 'transKey' => 'chapter'])
<br>
- @include('search.form.type-filter', ['checked' => !$hasTypes || in_array('book', $types), 'entity' => 'book', 'transKey' => 'book'])
- @include('search.form.type-filter', ['checked' => !$hasTypes || in_array('bookshelf', $types), 'entity' => 'bookshelf', 'transKey' => 'shelf'])
+ @include('search.parts.type-filter', ['checked' => !$hasTypes || in_array('book', $types), 'entity' => 'book', 'transKey' => 'book'])
+ @include('search.parts.type-filter', ['checked' => !$hasTypes || in_array('bookshelf', $types), 'entity' => 'bookshelf', 'transKey' => 'shelf'])
</div>
<h6>{{ trans('entities.search_exact_matches') }}</h6>
- @include('search.form.term-list', ['type' => 'exact', 'currentList' => $options->exacts])
+ @include('search.parts.term-list', ['type' => 'exact', 'currentList' => $options->exacts])
<h6>{{ trans('entities.search_tags') }}</h6>
- @include('search.form.term-list', ['type' => 'tags', 'currentList' => $options->tags])
+ @include('search.parts.term-list', ['type' => 'tags', 'currentList' => $options->tags])
@if(signedInUser())
<h6>{{ trans('entities.search_options') }}</h6>
- @component('search.form.boolean-filter', ['filters' => $options->filters, 'name' => 'viewed_by_me', 'value' => null])
+ @component('search.parts.boolean-filter', ['filters' => $options->filters, 'name' => 'viewed_by_me', 'value' => null])
{{ trans('entities.search_viewed_by_me') }}
@endcomponent
- @component('search.form.boolean-filter', ['filters' => $options->filters, 'name' => 'not_viewed_by_me', 'value' => null])
+ @component('search.parts.boolean-filter', ['filters' => $options->filters, 'name' => 'not_viewed_by_me', 'value' => null])
{{ trans('entities.search_not_viewed_by_me') }}
@endcomponent
- @component('search.form.boolean-filter', ['filters' => $options->filters, 'name' => 'is_restricted', 'value' => null])
+ @component('search.parts.boolean-filter', ['filters' => $options->filters, 'name' => 'is_restricted', 'value' => null])
{{ trans('entities.search_permissions_set') }}
@endcomponent
- @component('search.form.boolean-filter', ['filters' => $options->filters, 'name' => 'created_by', 'value' => 'me'])
+ @component('search.parts.boolean-filter', ['filters' => $options->filters, 'name' => 'created_by', 'value' => 'me'])
{{ trans('entities.search_created_by_me') }}
@endcomponent
- @component('search.form.boolean-filter', ['filters' => $options->filters, 'name' => 'updated_by', 'value' => 'me'])
+ @component('search.parts.boolean-filter', ['filters' => $options->filters, 'name' => 'updated_by', 'value' => 'me'])
{{ trans('entities.search_updated_by_me') }}
@endcomponent
- @component('search.form.boolean-filter', ['filters' => $options->filters, 'name' => 'owned_by', 'value' => 'me'])
+ @component('search.parts.boolean-filter', ['filters' => $options->filters, 'name' => 'owned_by', 'value' => 'me'])
{{ trans('entities.search_owned_by_me') }}
@endcomponent
@endif
<h6>{{ trans('entities.search_date_options') }}</h6>
- @include('search.form.date-filter', ['name' => 'updated_after', 'filters' => $options->filters])
- @include('search.form.date-filter', ['name' => 'updated_before', 'filters' => $options->filters])
- @include('search.form.date-filter', ['name' => 'created_after', 'filters' => $options->filters])
- @include('search.form.date-filter', ['name' => 'created_before', 'filters' => $options->filters])
+ @include('search.parts.date-filter', ['name' => 'updated_after', 'filters' => $options->filters])
+ @include('search.parts.date-filter', ['name' => 'updated_before', 'filters' => $options->filters])
+ @include('search.parts.date-filter', ['name' => 'created_after', 'filters' => $options->filters])
+ @include('search.parts.date-filter', ['name' => 'created_before', 'filters' => $options->filters])
<button type="submit" class="button">{{ trans('entities.search_update') }}</button>
</form>
<h6 class="text-muted">{{ trans_choice('entities.search_total_results_found', $totalResults, ['count' => $totalResults]) }}</h6>
<div class="book-contents">
- @include('partials.entity-list', ['entities' => $entities, 'showPath' => true, 'showTags' => true])
+ @include('entities.list', ['entities' => $entities, 'showPath' => true, 'showTags' => true])
</div>
@if($hasNextPage)
@if(count($entities) > 0)
@foreach($entities as $index => $entity)
- @include('partials.entity-list-item', ['entity' => $entity, 'showPath' => true])
+ @include('entities.list-item', ['entity' => $entity, 'showPath' => true])
@if($index !== count($entities) - 1)
<hr>
@endif
-@extends('simple-layout')
+@extends('layouts.simple')
@section('body')
<div class="container">
<div class="grid left-focus v-center no-row-gap">
<div class="py-m">
- @include('settings.navbar', ['selected' => 'audit'])
+ @include('settings.parts.navbar', ['selected' => 'audit'])
</div>
</div>
component="submit-on-change"
option:submit-on-change:filter='[name="user"]'>
<label for="owner">{{ trans('settings.audit_table_user') }}</label>
- @include('components.user-select', ['user' => $listDetails['user'] ? \BookStack\Auth\User::query()->find($listDetails['user']) : null, 'name' => 'user', 'compact' => true])
+ @include('form.user-select', ['user' => $listDetails['user'] ? \BookStack\Auth\User::query()->find($listDetails['user']) : null, 'name' => 'user', 'compact' => true])
</div>
</form>
</div>
@foreach($activities as $activity)
<tr>
<td>
- @include('partials.table-user', ['user' => $activity->user, 'user_id' => $activity->user_id])
+ @include('settings.parts.table-user', ['user' => $activity->user, 'user_id' => $activity->user_id])
</td>
<td>{{ $activity->type }}</td>
<td width="40%">
-@extends('simple-layout')
+@extends('layouts.simple')
@section('body')
<div class="container small">
- @include('settings.navbar-with-version', ['selected' => 'settings'])
+ @include('settings.parts.navbar-with-version', ['selected' => 'settings'])
<div class="card content-wrap auto-height">
<h2 id="features" class="list-heading">{{ trans('settings.app_features_security') }}</h2>
@endif
</div>
<div>
- @include('components.toggle-switch', [
+ @include('form.toggle-switch', [
'name' => 'setting-app-public',
'value' => setting('app-public'),
'label' => trans('settings.app_public_access_toggle'),
<p class="small">{{ trans('settings.app_secure_images_desc') }}</p>
</div>
<div>
- @include('components.toggle-switch', [
+ @include('form.toggle-switch', [
'name' => 'setting-app-secure-images',
'value' => setting('app-secure-images'),
'label' => trans('settings.app_secure_images_toggle'),
<p class="small">{!! trans('settings.app_disable_comments_desc') !!}</p>
</div>
<div>
- @include('components.toggle-switch', [
+ @include('form.toggle-switch', [
'name' => 'setting-app-disable-comments',
'value' => setting('app-disable-comments'),
'label' => trans('settings.app_disable_comments_toggle'),
</div>
<div class="pt-xs">
<input type="text" value="{{ setting('app-name', 'BookStack') }}" name="setting-app-name" id="setting-app-name">
- @include('components.toggle-switch', [
+ @include('form.toggle-switch', [
'name' => 'setting-app-name-header',
'value' => setting('app-name-header'),
'label' => trans('settings.app_name_header'),
<p class="small">{!! trans('settings.app_logo_desc') !!}</p>
</div>
<div class="pt-xs">
- @include('components.image-picker', [
+ @include('form.image-picker', [
'removeName' => 'setting-app-logo',
'removeValue' => 'none',
'defaultImage' => url('/logo.png'),
</div>
<div class="grid half pt-m">
<div>
- @include('components.setting-entity-color-picker', ['type' => 'bookshelf'])
- @include('components.setting-entity-color-picker', ['type' => 'book'])
- @include('components.setting-entity-color-picker', ['type' => 'chapter'])
+ @include('settings.parts.setting-entity-color-picker', ['type' => 'bookshelf'])
+ @include('settings.parts.setting-entity-color-picker', ['type' => 'book'])
+ @include('settings.parts.setting-entity-color-picker', ['type' => 'chapter'])
</div>
<div>
- @include('components.setting-entity-color-picker', ['type' => 'page'])
- @include('components.setting-entity-color-picker', ['type' => 'page-draft'])
+ @include('settings.parts.setting-entity-color-picker', ['type' => 'page'])
+ @include('settings.parts.setting-entity-color-picker', ['type' => 'page-draft'])
</div>
</div>
</div>
</select>
<div page-picker-container style="display: none;" class="mt-m">
- @include('components.page-picker', ['name' => 'setting-app-homepage', 'placeholder' => trans('settings.app_homepage_select'), 'value' => setting('app-homepage')])
+ @include('settings.parts.page-picker', ['name' => 'setting-app-homepage', 'placeholder' => trans('settings.app_homepage_select'), 'value' => setting('app-homepage')])
</div>
</div>
</div>
<div>
<label for="setting-app-privacy-link" class="setting-list-label">{{ trans('settings.app_footer_links') }}</label>
<p class="small mb-m">{{ trans('settings.app_footer_links_desc') }}</p>
- @include('settings.footer-links', ['name' => 'setting-app-footer-links', 'value' => setting('app-footer-links', [])])
+ @include('settings.parts.footer-links', ['name' => 'setting-app-footer-links', 'value' => setting('app-footer-links', [])])
</div>
<p class="small">{!! trans('settings.reg_enable_desc') !!}</p>
</div>
<div>
- @include('components.toggle-switch', [
+ @include('form.toggle-switch', [
'name' => 'setting-registration-enabled',
'value' => setting('registration-enabled'),
'label' => trans('settings.reg_enable_toggle')
<p class="small">{{ trans('settings.reg_confirm_email_desc') }}</p>
</div>
<div>
- @include('components.toggle-switch', [
+ @include('form.toggle-switch', [
'name' => 'setting-registration-confirmation',
'value' => setting('registration-confirmation'),
'label' => trans('settings.reg_email_confirmation_toggle')
</div>
- @include('components.entity-selector-popup', ['entityTypes' => 'page'])
+ @include('entities.selector-popup', ['entityTypes' => 'page'])
@stop
-@extends('simple-layout')
+@extends('layouts.simple')
@section('body')
<div class="container small">
- @include('settings.navbar-with-version', ['selected' => 'maintenance'])
+ @include('settings.parts.navbar-with-version', ['selected' => 'maintenance'])
<div class="card content-wrap auto-height pb-xl">
<h2 class="list-heading">{{ trans('settings.recycle_bin') }}</h2>
--}}
<div class="flex-container-row v-center wrap">
<div class="py-m flex fit-content">
- @include('settings.navbar', ['selected' => $selected])
+ @include('settings.parts.navbar', ['selected' => $selected])
</div>
<div class="flex"></div>
<div class="text-right p-m flex fit-content">
+++ /dev/null
-@include('partials.entity-display-item', ['entity' => $entity])
-@if($entity->isA('book'))
- @foreach($entity->chapters()->withTrashed()->get() as $chapter)
- @include('partials.entity-display-item', ['entity' => $chapter])
- @endforeach
-@endif
-@if($entity->isA('book') || $entity->isA('chapter'))
- @foreach($entity->pages()->withTrashed()->get() as $page)
- @include('partials.entity-display-item', ['entity' => $page])
- @endforeach
-@endif
\ No newline at end of file
-@extends('simple-layout')
+@extends('layouts.simple')
@section('body')
<div class="container small">
<div class="py-m">
- @include('settings.navbar', ['selected' => 'maintenance'])
+ @include('settings.parts.navbar', ['selected' => 'maintenance'])
</div>
<div class="card content-wrap auto-height">
@if($deletion->deletable instanceof \BookStack\Entities\Models\Entity)
<hr class="mt-m">
<h5>{{ trans('settings.recycle_bin_destroy_list') }}</h5>
- @include('settings.recycle-bin.deletable-entity-list', ['entity' => $deletion->deletable])
+ @include('settings.recycle-bin.parts.deletable-entity-list', ['entity' => $deletion->deletable])
@endif
</div>
-@extends('simple-layout')
+@extends('layouts.simple')
@section('body')
<div class="container">
<div class="py-m">
- @include('settings.navbar', ['selected' => 'maintenance'])
+ @include('settings.parts.navbar', ['selected' => 'maintenance'])
</div>
<div class="card content-wrap auto-height">
</div>
@endif
</td>
- <td>@include('partials.table-user', ['user' => $deletion->deleter, 'user_id' => $deletion->deleted_by])</td>
+ <td>@include('settings.parts.table-user', ['user' => $deletion->deleter, 'user_id' => $deletion->deleted_by])</td>
<td width="200">{{ $deletion->created_at }}</td>
<td width="150" class="text-right">
<div component="dropdown" class="dropdown-container">
--- /dev/null
+@include('settings.recycle-bin.parts.entity-display-item', ['entity' => $entity])
+@if($entity->isA('book'))
+ @foreach($entity->chapters()->withTrashed()->get() as $chapter)
+ @include('settings.recycle-bin.parts.entity-display-item', ['entity' => $chapter])
+ @endforeach
+@endif
+@if($entity->isA('book') || $entity->isA('chapter'))
+ @foreach($entity->pages()->withTrashed()->get() as $page)
+ @include('settings.recycle-bin.parts.entity-display-item', ['entity' => $page])
+ @endforeach
+@endif
\ No newline at end of file
-@extends('simple-layout')
+@extends('layouts.simple')
@section('body')
<div class="container small">
<div class="py-m">
- @include('settings.navbar', ['selected' => 'maintenance'])
+ @include('settings.parts.navbar', ['selected' => 'maintenance'])
</div>
<div class="card content-wrap auto-height">
@endif
</div>
- @include('settings.recycle-bin.deletable-entity-list', ['entity' => $deletion->deletable])
+ @include('settings.recycle-bin.parts.deletable-entity-list', ['entity' => $deletion->deletable])
@endif
</div>
-@extends('simple-layout')
+@extends('layouts.simple')
@section('body')
<div class="container small">
<div class="py-m">
- @include('settings.navbar', ['selected' => 'roles'])
+ @include('settings.parts.navbar', ['selected' => 'roles'])
</div>
<form action="{{ url("/settings/roles/new") }}" method="POST">
- @include('settings.roles.form', ['title' => trans('settings.role_create')])
+ @include('settings.roles.parts.form', ['title' => trans('settings.role_create')])
</form>
</div>
-@extends('simple-layout')
+@extends('layouts.simple')
@section('body')
<div class="container small">
<div class="py-m">
- @include('settings.navbar', ['selected' => 'roles'])
+ @include('settings.parts.navbar', ['selected' => 'roles'])
</div>
<div class="card content-wrap auto-height">
-@extends('simple-layout')
+@extends('layouts.simple')
@section('body')
<div class="container small">
<div class="py-m">
- @include('settings.navbar', ['selected' => 'roles'])
+ @include('settings.parts.navbar', ['selected' => 'roles'])
</div>
<form action="{{ url("/settings/roles/{$role->id}") }}" method="POST">
<input type="hidden" name="_method" value="PUT">
- @include('settings.roles.form', ['model' => $role, 'title' => trans('settings.role_edit'), 'icon' => 'edit'])
+ @include('settings.roles.parts.form', ['model' => $role, 'title' => trans('settings.role_edit'), 'icon' => 'edit'])
</form>
</div>
-@extends('simple-layout')
+@extends('layouts.simple')
@section('body')
<div class="container small">
<div class="py-m">
- @include('settings.navbar', ['selected' => 'roles'])
+ @include('settings.parts.navbar', ['selected' => 'roles'])
</div>
<div class="card content-wrap auto-height">
-@include('components.custom-checkbox', [
+@include('form.custom-checkbox', [
'name' => 'permissions[' . $permission . ']',
'value' => 'true',
'checked' => old('permissions'.$permission, false)|| (!old('display_name', false) && (isset($role) && $role->hasPermission($permission))),
<div class="toggle-switch-list grid half mt-m">
<div>
- <div>@include('settings.roles.checkbox', ['permission' => 'restrictions-manage-all', 'label' => trans('settings.role_manage_entity_permissions')])</div>
- <div>@include('settings.roles.checkbox', ['permission' => 'restrictions-manage-own', 'label' => trans('settings.role_manage_own_entity_permissions')])</div>
- <div>@include('settings.roles.checkbox', ['permission' => 'templates-manage', 'label' => trans('settings.role_manage_page_templates')])</div>
- <div>@include('settings.roles.checkbox', ['permission' => 'access-api', 'label' => trans('settings.role_access_api')])</div>
+ <div>@include('settings.roles.parts.checkbox', ['permission' => 'restrictions-manage-all', 'label' => trans('settings.role_manage_entity_permissions')])</div>
+ <div>@include('settings.roles.parts.checkbox', ['permission' => 'restrictions-manage-own', 'label' => trans('settings.role_manage_own_entity_permissions')])</div>
+ <div>@include('settings.roles.parts.checkbox', ['permission' => 'templates-manage', 'label' => trans('settings.role_manage_page_templates')])</div>
+ <div>@include('settings.roles.parts.checkbox', ['permission' => 'access-api', 'label' => trans('settings.role_access_api')])</div>
</div>
<div>
- <div>@include('settings.roles.checkbox', ['permission' => 'settings-manage', 'label' => trans('settings.role_manage_settings')])</div>
- <div>@include('settings.roles.checkbox', ['permission' => 'users-manage', 'label' => trans('settings.role_manage_users')])</div>
- <div>@include('settings.roles.checkbox', ['permission' => 'user-roles-manage', 'label' => trans('settings.role_manage_roles')])</div>
+ <div>@include('settings.roles.parts.checkbox', ['permission' => 'settings-manage', 'label' => trans('settings.role_manage_settings')])</div>
+ <div>@include('settings.roles.parts.checkbox', ['permission' => 'users-manage', 'label' => trans('settings.role_manage_users')])</div>
+ <div>@include('settings.roles.parts.checkbox', ['permission' => 'user-roles-manage', 'label' => trans('settings.role_manage_roles')])</div>
<p class="text-warn text-small mt-s mb-none">{{ trans('settings.roles_system_warning') }}</p>
</div>
</div>
<a href="#" permissions-table-toggle-all-in-row class="text-small text-primary">{{ trans('common.toggle_all') }}</a>
</td>
<td>
- @include('settings.roles.checkbox', ['permission' => 'bookshelf-create-all', 'label' => trans('settings.role_all')])
+ @include('settings.roles.parts.checkbox', ['permission' => 'bookshelf-create-all', 'label' => trans('settings.role_all')])
</td>
<td>
- @include('settings.roles.checkbox', ['permission' => 'bookshelf-view-own', 'label' => trans('settings.role_own')])
+ @include('settings.roles.parts.checkbox', ['permission' => 'bookshelf-view-own', 'label' => trans('settings.role_own')])
<br>
- @include('settings.roles.checkbox', ['permission' => 'bookshelf-view-all', 'label' => trans('settings.role_all')])
+ @include('settings.roles.parts.checkbox', ['permission' => 'bookshelf-view-all', 'label' => trans('settings.role_all')])
</td>
<td>
- @include('settings.roles.checkbox', ['permission' => 'bookshelf-update-own', 'label' => trans('settings.role_own')])
+ @include('settings.roles.parts.checkbox', ['permission' => 'bookshelf-update-own', 'label' => trans('settings.role_own')])
<br>
- @include('settings.roles.checkbox', ['permission' => 'bookshelf-update-all', 'label' => trans('settings.role_all')])
+ @include('settings.roles.parts.checkbox', ['permission' => 'bookshelf-update-all', 'label' => trans('settings.role_all')])
</td>
<td>
- @include('settings.roles.checkbox', ['permission' => 'bookshelf-delete-own', 'label' => trans('settings.role_own')])
+ @include('settings.roles.parts.checkbox', ['permission' => 'bookshelf-delete-own', 'label' => trans('settings.role_own')])
<br>
- @include('settings.roles.checkbox', ['permission' => 'bookshelf-delete-all', 'label' => trans('settings.role_all')])
+ @include('settings.roles.parts.checkbox', ['permission' => 'bookshelf-delete-all', 'label' => trans('settings.role_all')])
</td>
</tr>
<tr>
<a href="#" permissions-table-toggle-all-in-row class="text-small text-primary">{{ trans('common.toggle_all') }}</a>
</td>
<td>
- @include('settings.roles.checkbox', ['permission' => 'book-create-all', 'label' => trans('settings.role_all')])
+ @include('settings.roles.parts.checkbox', ['permission' => 'book-create-all', 'label' => trans('settings.role_all')])
</td>
<td>
- @include('settings.roles.checkbox', ['permission' => 'book-view-own', 'label' => trans('settings.role_own')])
+ @include('settings.roles.parts.checkbox', ['permission' => 'book-view-own', 'label' => trans('settings.role_own')])
<br>
- @include('settings.roles.checkbox', ['permission' => 'book-view-all', 'label' => trans('settings.role_all')])
+ @include('settings.roles.parts.checkbox', ['permission' => 'book-view-all', 'label' => trans('settings.role_all')])
</td>
<td>
- @include('settings.roles.checkbox', ['permission' => 'book-update-own', 'label' => trans('settings.role_own')])
+ @include('settings.roles.parts.checkbox', ['permission' => 'book-update-own', 'label' => trans('settings.role_own')])
<br>
- @include('settings.roles.checkbox', ['permission' => 'book-update-all', 'label' => trans('settings.role_all')])
+ @include('settings.roles.parts.checkbox', ['permission' => 'book-update-all', 'label' => trans('settings.role_all')])
</td>
<td>
- @include('settings.roles.checkbox', ['permission' => 'book-delete-own', 'label' => trans('settings.role_own')])
+ @include('settings.roles.parts.checkbox', ['permission' => 'book-delete-own', 'label' => trans('settings.role_own')])
<br>
- @include('settings.roles.checkbox', ['permission' => 'book-delete-all', 'label' => trans('settings.role_all')])
+ @include('settings.roles.parts.checkbox', ['permission' => 'book-delete-all', 'label' => trans('settings.role_all')])
</td>
</tr>
<tr>
<a href="#" permissions-table-toggle-all-in-row class="text-small text-primary">{{ trans('common.toggle_all') }}</a>
</td>
<td>
- @include('settings.roles.checkbox', ['permission' => 'chapter-create-own', 'label' => trans('settings.role_own')])
+ @include('settings.roles.parts.checkbox', ['permission' => 'chapter-create-own', 'label' => trans('settings.role_own')])
<br>
- @include('settings.roles.checkbox', ['permission' => 'chapter-create-all', 'label' => trans('settings.role_all')])
+ @include('settings.roles.parts.checkbox', ['permission' => 'chapter-create-all', 'label' => trans('settings.role_all')])
</td>
<td>
- @include('settings.roles.checkbox', ['permission' => 'chapter-view-own', 'label' => trans('settings.role_own')])
+ @include('settings.roles.parts.checkbox', ['permission' => 'chapter-view-own', 'label' => trans('settings.role_own')])
<br>
- @include('settings.roles.checkbox', ['permission' => 'chapter-view-all', 'label' => trans('settings.role_all')])
+ @include('settings.roles.parts.checkbox', ['permission' => 'chapter-view-all', 'label' => trans('settings.role_all')])
</td>
<td>
- @include('settings.roles.checkbox', ['permission' => 'chapter-update-own', 'label' => trans('settings.role_own')])
+ @include('settings.roles.parts.checkbox', ['permission' => 'chapter-update-own', 'label' => trans('settings.role_own')])
<br>
- @include('settings.roles.checkbox', ['permission' => 'chapter-update-all', 'label' => trans('settings.role_all')])
+ @include('settings.roles.parts.checkbox', ['permission' => 'chapter-update-all', 'label' => trans('settings.role_all')])
</td>
<td>
- @include('settings.roles.checkbox', ['permission' => 'chapter-delete-own', 'label' => trans('settings.role_own')])
+ @include('settings.roles.parts.checkbox', ['permission' => 'chapter-delete-own', 'label' => trans('settings.role_own')])
<br>
- @include('settings.roles.checkbox', ['permission' => 'chapter-delete-all', 'label' => trans('settings.role_all')])
+ @include('settings.roles.parts.checkbox', ['permission' => 'chapter-delete-all', 'label' => trans('settings.role_all')])
</td>
</tr>
<tr>
<a href="#" permissions-table-toggle-all-in-row class="text-small text-primary">{{ trans('common.toggle_all') }}</a>
</td>
<td>
- @include('settings.roles.checkbox', ['permission' => 'page-create-own', 'label' => trans('settings.role_own')])
+ @include('settings.roles.parts.checkbox', ['permission' => 'page-create-own', 'label' => trans('settings.role_own')])
<br>
- @include('settings.roles.checkbox', ['permission' => 'page-create-all', 'label' => trans('settings.role_all')])
+ @include('settings.roles.parts.checkbox', ['permission' => 'page-create-all', 'label' => trans('settings.role_all')])
</td>
<td>
- @include('settings.roles.checkbox', ['permission' => 'page-view-own', 'label' => trans('settings.role_own')])
+ @include('settings.roles.parts.checkbox', ['permission' => 'page-view-own', 'label' => trans('settings.role_own')])
<br>
- @include('settings.roles.checkbox', ['permission' => 'page-view-all', 'label' => trans('settings.role_all')])
+ @include('settings.roles.parts.checkbox', ['permission' => 'page-view-all', 'label' => trans('settings.role_all')])
</td>
<td>
- @include('settings.roles.checkbox', ['permission' => 'page-update-own', 'label' => trans('settings.role_own')])
+ @include('settings.roles.parts.checkbox', ['permission' => 'page-update-own', 'label' => trans('settings.role_own')])
<br>
- @include('settings.roles.checkbox', ['permission' => 'page-update-all', 'label' => trans('settings.role_all')])
+ @include('settings.roles.parts.checkbox', ['permission' => 'page-update-all', 'label' => trans('settings.role_all')])
</td>
<td>
- @include('settings.roles.checkbox', ['permission' => 'page-delete-own', 'label' => trans('settings.role_own')])
+ @include('settings.roles.parts.checkbox', ['permission' => 'page-delete-own', 'label' => trans('settings.role_own')])
<br>
- @include('settings.roles.checkbox', ['permission' => 'page-delete-all', 'label' => trans('settings.role_all')])
+ @include('settings.roles.parts.checkbox', ['permission' => 'page-delete-all', 'label' => trans('settings.role_all')])
</td>
</tr>
<tr>
<div>{{ trans('entities.images') }}</div>
<a href="#" permissions-table-toggle-all-in-row class="text-small text-primary">{{ trans('common.toggle_all') }}</a>
</td>
- <td>@include('settings.roles.checkbox', ['permission' => 'image-create-all', 'label' => ''])</td>
+ <td>@include('settings.roles.parts.checkbox', ['permission' => 'image-create-all', 'label' => ''])</td>
<td style="line-height:1.2;"><small class="faded">{{ trans('settings.role_controlled_by_asset') }}</small></td>
<td>
- @include('settings.roles.checkbox', ['permission' => 'image-update-own', 'label' => trans('settings.role_own')])
+ @include('settings.roles.parts.checkbox', ['permission' => 'image-update-own', 'label' => trans('settings.role_own')])
<br>
- @include('settings.roles.checkbox', ['permission' => 'image-update-all', 'label' => trans('settings.role_all')])
+ @include('settings.roles.parts.checkbox', ['permission' => 'image-update-all', 'label' => trans('settings.role_all')])
</td>
<td>
- @include('settings.roles.checkbox', ['permission' => 'image-delete-own', 'label' => trans('settings.role_own')])
+ @include('settings.roles.parts.checkbox', ['permission' => 'image-delete-own', 'label' => trans('settings.role_own')])
<br>
- @include('settings.roles.checkbox', ['permission' => 'image-delete-all', 'label' => trans('settings.role_all')])
+ @include('settings.roles.parts.checkbox', ['permission' => 'image-delete-all', 'label' => trans('settings.role_all')])
</td>
</tr>
<tr>
<div>{{ trans('entities.attachments') }}</div>
<a href="#" permissions-table-toggle-all-in-row class="text-small text-primary">{{ trans('common.toggle_all') }}</a>
</td>
- <td>@include('settings.roles.checkbox', ['permission' => 'attachment-create-all', 'label' => ''])</td>
+ <td>@include('settings.roles.parts.checkbox', ['permission' => 'attachment-create-all', 'label' => ''])</td>
<td style="line-height:1.2;"><small class="faded">{{ trans('settings.role_controlled_by_asset') }}</small></td>
<td>
- @include('settings.roles.checkbox', ['permission' => 'attachment-update-own', 'label' => trans('settings.role_own')])
+ @include('settings.roles.parts.checkbox', ['permission' => 'attachment-update-own', 'label' => trans('settings.role_own')])
<br>
- @include('settings.roles.checkbox', ['permission' => 'attachment-update-all', 'label' => trans('settings.role_all')])
+ @include('settings.roles.parts.checkbox', ['permission' => 'attachment-update-all', 'label' => trans('settings.role_all')])
</td>
<td>
- @include('settings.roles.checkbox', ['permission' => 'attachment-delete-own', 'label' => trans('settings.role_own')])
+ @include('settings.roles.parts.checkbox', ['permission' => 'attachment-delete-own', 'label' => trans('settings.role_own')])
<br>
- @include('settings.roles.checkbox', ['permission' => 'attachment-delete-all', 'label' => trans('settings.role_all')])
+ @include('settings.roles.parts.checkbox', ['permission' => 'attachment-delete-all', 'label' => trans('settings.role_all')])
</td>
</tr>
<tr>
<div>{{ trans('entities.comments') }}</div>
<a href="#" permissions-table-toggle-all-in-row class="text-small text-primary">{{ trans('common.toggle_all') }}</a>
</td>
- <td>@include('settings.roles.checkbox', ['permission' => 'comment-create-all', 'label' => ''])</td>
+ <td>@include('settings.roles.parts.checkbox', ['permission' => 'comment-create-all', 'label' => ''])</td>
<td style="line-height:1.2;"><small class="faded">{{ trans('settings.role_controlled_by_asset') }}</small></td>
<td>
- @include('settings.roles.checkbox', ['permission' => 'comment-update-own', 'label' => trans('settings.role_own')])
+ @include('settings.roles.parts.checkbox', ['permission' => 'comment-update-own', 'label' => trans('settings.role_own')])
<br>
- @include('settings.roles.checkbox', ['permission' => 'comment-update-all', 'label' => trans('settings.role_all')])
+ @include('settings.roles.parts.checkbox', ['permission' => 'comment-update-all', 'label' => trans('settings.role_all')])
</td>
<td>
- @include('settings.roles.checkbox', ['permission' => 'comment-delete-own', 'label' => trans('settings.role_own')])
+ @include('settings.roles.parts.checkbox', ['permission' => 'comment-delete-own', 'label' => trans('settings.role_own')])
<br>
- @include('settings.roles.checkbox', ['permission' => 'comment-delete-all', 'label' => trans('settings.role_all')])
+ @include('settings.roles.parts.checkbox', ['permission' => 'comment-delete-all', 'label' => trans('settings.role_all')])
</td>
</tr>
</table>
+++ /dev/null
-<div class="breadcrumbs">
- <a href="{{$shelf->getUrl()}}" class="text-bookshelf text-button">@icon('bookshelf'){{ $shelf->getShortName() }}</a>
-</div>
\ No newline at end of file
-@extends('simple-layout')
+@extends('layouts.simple')
@section('body')
<div class="container small">
<div class="my-s">
- @include('partials.breadcrumbs', ['crumbs' => [
+ @include('entities.breadcrumbs', ['crumbs' => [
'/shelves' => [
'text' => trans('entities.shelves'),
'icon' => 'bookshelf',
<main class="card content-wrap">
<h1 class="list-heading">{{ trans('entities.shelves_create') }}</h1>
<form action="{{ url("/shelves") }}" method="POST" enctype="multipart/form-data">
- @include('shelves.form', ['shelf' => null, 'books' => $books])
+ @include('shelves.parts.form', ['shelf' => null, 'books' => $books])
</form>
</main>
-@extends('simple-layout')
+@extends('layouts.simple')
@section('body')
<div class="container small">
<div class="my-s">
- @include('partials.breadcrumbs', ['crumbs' => [
+ @include('entities.breadcrumbs', ['crumbs' => [
$shelf,
$shelf->getUrl('/delete') => [
'text' => trans('entities.shelves_delete'),
-@extends('simple-layout')
+@extends('layouts.simple')
@section('body')
<div class="container small">
<div class="my-s">
- @include('partials.breadcrumbs', ['crumbs' => [
+ @include('entities.breadcrumbs', ['crumbs' => [
$shelf,
$shelf->getUrl('/edit') => [
'text' => trans('entities.shelves_edit'),
<h1 class="list-heading">{{ trans('entities.shelves_edit') }}</h1>
<form action="{{ $shelf->getUrl() }}" method="POST" enctype="multipart/form-data">
<input type="hidden" name="_method" value="PUT">
- @include('shelves.form', ['model' => $shelf])
+ @include('shelves.parts.form', ['model' => $shelf])
</form>
</main>
</div>
-@extends('tri-layout')
+@extends('layouts.tri')
@section('body')
- @include('shelves.list', ['shelves' => $shelves, 'view' => $view])
+ @include('shelves.parts.list', ['shelves' => $shelves, 'view' => $view])
@stop
@section('right')
<span>{{ trans('entities.shelves_new_action') }}</span>
</a>
@endif
- @include('partials.view-toggle', ['view' => $view, 'type' => 'shelves'])
+ @include('entities.view-toggle', ['view' => $view, 'type' => 'shelves'])
</div>
</div>
@if($recents)
<div id="recents" class="mb-xl">
<h5>{{ trans('entities.recently_viewed') }}</h5>
- @include('partials.entity-list', ['entities' => $recents, 'style' => 'compact'])
+ @include('entities.list', ['entities' => $recents, 'style' => 'compact'])
</div>
@endif
<div id="popular" class="mb-xl">
<h5>{{ trans('entities.shelves_popular') }}</h5>
@if(count($popular) > 0)
- @include('partials.entity-list', ['entities' => $popular, 'style' => 'compact'])
+ @include('entities.list', ['entities' => $popular, 'style' => 'compact'])
@else
<div class="text-muted">{{ trans('entities.shelves_popular_empty') }}</div>
@endif
<div id="new" class="mb-xl">
<h5>{{ trans('entities.shelves_new') }}</h5>
@if(count($new) > 0)
- @include('partials.entity-list', ['entities' => $new, 'style' => 'compact'])
+ @include('entities.list', ['entities' => $new, 'style' => 'compact'])
@else
<div class="text-muted">{{ trans('entities.shelves_new_empty') }}</div>
@endif
<div class="collapse-content" collapsible-content>
<p class="small">{{ trans('common.cover_image_description') }}</p>
- @include('components.image-picker', [
+ @include('form.image-picker', [
'defaultImage' => url('/book_default_cover.png'),
'currentImage' => (isset($shelf) && $shelf->cover) ? $shelf->getBookCover() : url('/book_default_cover.png') ,
'name' => 'image',
<label for="tag-manager">{{ trans('entities.shelf_tags') }}</label>
</button>
<div class="collapse-content" collapsible-content>
- @include('components.tag-manager', ['entity' => $shelf ?? null])
+ @include('entities.tag-manager', ['entity' => $shelf ?? null])
</div>
</div>
<div class="grid half v-center">
<h1 class="list-heading">{{ trans('entities.shelves') }}</h1>
<div class="text-right">
- @include('partials.sort', ['options' => $sortOptions, 'order' => $order, 'sort' => $sort, 'type' => 'bookshelves'])
+ @include('entities.sort', ['options' => $sortOptions, 'order' => $order, 'sort' => $sort, 'type' => 'bookshelves'])
</div>
</div>
@if ($index !== 0)
<hr class="my-m">
@endif
- @include('shelves.list-item', ['shelf' => $shelf])
+ @include('shelves.parts.list-item', ['shelf' => $shelf])
@endforeach
</div>
@else
<div class="grid third">
@foreach($shelves as $key => $shelf)
- @include('partials.entity-grid-item', ['entity' => $shelf])
+ @include('entities.grid-item', ['entity' => $shelf])
@endforeach
</div>
@endif
-@extends('simple-layout')
+@extends('layouts.simple')
@section('body')
<div class="container small">
<div class="my-s">
- @include('partials.breadcrumbs', ['crumbs' => [
+ @include('entities.breadcrumbs', ['crumbs' => [
$shelf,
$shelf->getUrl('/permissions') => [
'text' => trans('entities.shelves_permissions'),
-@extends('tri-layout')
+@extends('layouts.tri')
@push('social-meta')
<meta property="og:description" content="{{ Str::limit($shelf->description, 100, '...') }}">
@section('body')
<div class="mb-s">
- @include('partials.breadcrumbs', ['crumbs' => [
+ @include('entities.breadcrumbs', ['crumbs' => [
$shelf,
]])
</div>
<h1 class="flex fit-content break-text">{{ $shelf->name }}</h1>
<div class="flex"></div>
<div class="flex fit-content text-m-right my-m ml-m">
- @include('partials.sort', ['options' => [
+ @include('entities.sort', ['options' => [
'default' => trans('common.sort_default'),
'name' => trans('common.sort_name'),
'created_at' => trans('common.sort_created_at'),
@if($view === 'list')
<div class="entity-list">
@foreach($sortedVisibleShelfBooks as $book)
- @include('books.list-item', ['book' => $book])
+ @include('books.parts.list-item', ['book' => $book])
@endforeach
</div>
@else
<div class="grid third">
@foreach($sortedVisibleShelfBooks as $book)
- @include('partials.entity-grid-item', ['entity' => $book])
+ @include('entities.grid-item', ['entity' => $book])
@endforeach
</div>
@endif
@if($shelf->tags->count() > 0)
<div id="tags" class="mb-xl">
- @include('components.tag-list', ['entity' => $shelf])
+ @include('entities.tag-list', ['entity' => $shelf])
</div>
@endif
<div id="details" class="mb-xl">
<h5>{{ trans('common.details') }}</h5>
<div class="text-small text-muted blended-links">
- @include('partials.entity-meta', ['entity' => $shelf])
+ @include('entities.meta', ['entity' => $shelf])
@if($shelf->restricted)
<div class="active-restriction">
@if(userCan('restrictions-manage', $shelf))
@if(count($activity) > 0)
<div class="mb-xl">
<h5>{{ trans('entities.recent_activity') }}</h5>
- @include('partials.activity-list', ['activity' => $activity])
+ @include('common.activity-list', ['activity' => $activity])
</div>
@endif
@stop
</a>
@endif
- @include('partials.view-toggle', ['view' => $view, 'type' => 'shelf'])
+ @include('entities.view-toggle', ['view' => $view, 'type' => 'shelf'])
<hr class="primary-background">
@if(signedInUser())
<hr class="primary-background">
- @include('partials.entity-favourite-action', ['entity' => $shelf])
+ @include('entities.favourite-action', ['entity' => $shelf])
@endif
</div>
-@extends('simple-layout')
+@extends('layouts.simple')
@section('body')
{!! csrf_field() !!}
<div class="setting-list">
- @include('users.api-tokens.form')
+ @include('users.api-tokens.parts.form')
<div>
<p class="text-warn italic">
-@extends('simple-layout')
+@extends('layouts.simple')
@section('body')
<div class="container small pt-xl">
-@extends('simple-layout')
+@extends('layouts.simple')
@section('body')
</div>
@endif
- @include('users.api-tokens.form', ['model' => $token])
+ @include('users.api-tokens.parts.form', ['model' => $token])
</div>
<div class="grid half gap-xl v-center">
-@extends('simple-layout')
+@extends('layouts.simple')
@section('body')
<div class="container small">
<div class="py-m">
- @include('settings.navbar', ['selected' => 'users'])
+ @include('settings.parts.navbar', ['selected' => 'users'])
</div>
<main class="card content-wrap">
{!! csrf_field() !!}
<div class="setting-list">
- @include('users.form')
+ @include('users.parts.form')
</div>
<div class="form-group text-right">
-@extends('simple-layout')
+@extends('layouts.simple')
@section('body')
<div class="container small">
<div class="py-m">
- @include('settings.navbar', ['selected' => 'users'])
+ @include('settings.parts.navbar', ['selected' => 'users'])
</div>
<div class="card content-wrap auto-height">
<p class="small">{{ trans('settings.users_migrate_ownership_desc') }}</p>
</div>
<div>
- @include('components.user-select', ['name' => 'new_owner_id', 'user' => null, 'compact' => false])
+ @include('form.user-select', ['name' => 'new_owner_id', 'user' => null, 'compact' => false])
</div>
</div>
-@extends('simple-layout')
+@extends('layouts.simple')
@section('body')
<div class="container small">
<div class="py-m">
- @include('settings.navbar', ['selected' => 'users'])
+ @include('settings.parts.navbar', ['selected' => 'users'])
</div>
<section class="card content-wrap">
<input type="hidden" name="_method" value="PUT">
<div class="setting-list">
- @include('users.form', ['model' => $user, 'authMethod' => $authMethod])
+ @include('users.parts.form', ['model' => $user, 'authMethod' => $authMethod])
<div class="grid half gap-xl">
<div>
<p class="small">{{ trans('settings.users_avatar_desc') }}</p>
</div>
<div>
- @include('components.image-picker', [
+ @include('form.image-picker', [
'resizeHeight' => '512',
'resizeWidth' => '512',
'showRemove' => false,
@endif
@if((user()->id === $user->id && userCan('access-api')) || userCan('users-manage'))
- @include('users.api-tokens.list', ['user' => $user])
+ @include('users.api-tokens.parts.list', ['user' => $user])
@endif
</div>
-@extends('simple-layout')
+@extends('layouts.simple')
@section('body')
<div class="container small">
<div class="py-m">
- @include('settings.navbar', ['selected' => 'users'])
+ @include('settings.parts.navbar', ['selected' => 'users'])
</div>
<main class="card content-wrap">
{{ trans('settings.users_send_invite_text') }}
</p>
- @include('components.toggle-switch', [
+ @include('form.toggle-switch', [
'name' => 'send_invite',
'value' => old('send_invite', 'true') === 'true',
'label' => trans('settings.users_send_invite_option')
-@extends('simple-layout')
+@extends('layouts.simple')
@section('body')
<div>
<section id="recent-user-activity" class="mb-xl">
<h5>{{ trans('entities.recent_activity') }}</h5>
- @include('partials.activity-list', ['activity' => $activity])
+ @include('common.activity-list', ['activity' => $activity])
</section>
</div>
@endif
</h2>
@if (count($recentlyCreated['pages']) > 0)
- @include('partials.entity-list', ['entities' => $recentlyCreated['pages'], 'showPath' => true])
+ @include('entities.list', ['entities' => $recentlyCreated['pages'], 'showPath' => true])
@else
<p class="text-muted">{{ trans('entities.profile_not_created_pages', ['userName' => $user->name]) }}</p>
@endif
@endif
</h2>
@if (count($recentlyCreated['chapters']) > 0)
- @include('partials.entity-list', ['entities' => $recentlyCreated['chapters'], 'showPath' => true])
+ @include('entities.list', ['entities' => $recentlyCreated['chapters'], 'showPath' => true])
@else
<p class="text-muted">{{ trans('entities.profile_not_created_chapters', ['userName' => $user->name]) }}</p>
@endif
@endif
</h2>
@if (count($recentlyCreated['books']) > 0)
- @include('partials.entity-list', ['entities' => $recentlyCreated['books'], 'showPath' => true])
+ @include('entities.list', ['entities' => $recentlyCreated['books'], 'showPath' => true])
@else
<p class="text-muted">{{ trans('entities.profile_not_created_books', ['userName' => $user->name]) }}</p>
@endif
@endif
</h2>
@if (count($recentlyCreated['shelves']) > 0)
- @include('partials.entity-list', ['entities' => $recentlyCreated['shelves'], 'showPath' => true])
+ @include('entities.list', ['entities' => $recentlyCreated['shelves'], 'showPath' => true])
@else
<p class="text-muted">{{ trans('entities.profile_not_created_shelves', ['userName' => $user->name]) }}</p>
@endif
<?php
Route::get('/status', 'StatusController@show');
-Route::get('/robots.txt', 'HomeController@getRobots');
+Route::get('/robots.txt', 'HomeController@robots');
// Authenticated routes...
Route::group(['middleware' => 'auth'], function () {
Route::get('/password/reset/{token}', 'Auth\ResetPasswordController@showResetForm');
Route::post('/password/reset', 'Auth\ResetPasswordController@reset');
-Route::fallback('HomeController@getNotFound')->name('fallback');
+Route::fallback('HomeController@notFound')->name('fallback');