Skip to content

NOW MANAGED ON CODEBERG

Reorgranised blade view files to form a convention

Dan Browna61c9c5e98b0
diff --git a/app/Entities/Models/Page.php b/app/Entities/Models/Page.php
index a3a04f403..aeee50d0f 100644
--- a/app/Entities/Models/Page.php
+++ b/app/Entities/Models/Page.php
@@ -25,8 +25,8 @@ use Permissions;
*/
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'];
diff --git a/app/Entities/Tools/BookContents.php b/app/Entities/Tools/BookContents.php
index 0b8e714fc..8622d5e12 100644
--- a/app/Entities/Tools/BookContents.php
+++ b/app/Entities/Tools/BookContents.php
@@ -45,7 +45,7 @@ class BookContents
*/
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');
diff --git a/app/Entities/Tools/PageContent.php b/app/Entities/Tools/PageContent.php
index 9a53e2d24..7a7dd407b 100644
--- a/app/Entities/Tools/PageContent.php
+++ b/app/Entities/Tools/PageContent.php
@@ -223,7 +223,7 @@ class PageContent
*/
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);
diff --git a/app/Http/Controllers/BookSortController.php b/app/Http/Controllers/BookSortController.php
index bc67a8e1c..0bd394778 100644
--- a/app/Http/Controllers/BookSortController.php
+++ b/app/Http/Controllers/BookSortController.php
@@ -43,7 +43,7 @@ class BookSortController extends Controller
$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]);
}
/**
diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php
index c2ee826c3..6706de575 100644
--- a/app/Http/Controllers/HomeController.php
+++ b/app/Http/Controllers/HomeController.php
@@ -82,7 +82,7 @@ class HomeController extends Controller
$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') {
@@ -90,7 +90,7 @@ class HomeController extends Controller
$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') {
@@ -100,26 +100,24 @@ class HomeController extends Controller
$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');
@@ -129,14 +127,14 @@ class HomeController extends Controller
}
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);
}
diff --git a/app/Http/Controllers/Images/DrawioImageController.php b/app/Http/Controllers/Images/DrawioImageController.php
index 2a4576df1..d99bb8e6f 100644
--- a/app/Http/Controllers/Images/DrawioImageController.php
+++ b/app/Http/Controllers/Images/DrawioImageController.php
@@ -30,7 +30,7 @@ class DrawioImageController extends Controller
$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'],
]);
diff --git a/app/Http/Controllers/Images/GalleryImageController.php b/app/Http/Controllers/Images/GalleryImageController.php
index 0f0b330ee..5484411d3 100644
--- a/app/Http/Controllers/Images/GalleryImageController.php
+++ b/app/Http/Controllers/Images/GalleryImageController.php
@@ -33,7 +33,7 @@ class GalleryImageController extends Controller
$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'],
]);
diff --git a/app/Http/Controllers/Images/ImageController.php b/app/Http/Controllers/Images/ImageController.php
index 4c9737887..4070a0e2f 100644
--- a/app/Http/Controllers/Images/ImageController.php
+++ b/app/Http/Controllers/Images/ImageController.php
@@ -65,7 +65,7 @@ class ImageController extends Controller
$this->imageRepo->loadThumbs($image);
- return view('components.image-manager-form', [
+ return view('pages.parts.image-manager-form', [
'image' => $image,
'dependantPages' => null,
]);
@@ -87,7 +87,7 @@ class ImageController extends Controller
$this->imageRepo->loadThumbs($image);
- return view('components.image-manager-form', [
+ return view('pages.parts.image-manager-form', [
'image' => $image,
'dependantPages' => $dependantPages ?? null,
]);
diff --git a/app/Http/Controllers/PageTemplateController.php b/app/Http/Controllers/PageTemplateController.php
index 232d0d442..1e24c29ee 100644
--- a/app/Http/Controllers/PageTemplateController.php
+++ b/app/Http/Controllers/PageTemplateController.php
@@ -31,7 +31,7 @@ class PageTemplateController extends Controller
$templates->appends(['search' => $search]);
}
- return view('pages.template-manager-list', [
+ return view('pages.parts.template-manager-list', [
'templates' => $templates,
]);
}
diff --git a/app/Http/Controllers/SearchController.php b/app/Http/Controllers/SearchController.php
index d4431e166..d12c23b5a 100644
--- a/app/Http/Controllers/SearchController.php
+++ b/app/Http/Controllers/SearchController.php
@@ -54,7 +54,7 @@ class SearchController extends Controller
$term = $request->get('term', '');
$results = $this->searchRunner->searchBook($bookId, $term);
- return view('partials.entity-list', ['entities' => $results]);
+ return view('entities.list', ['entities' => $results]);
}
/**
@@ -65,7 +65,7 @@ class SearchController extends Controller
$term = $request->get('term', '');
$results = $this->searchRunner->searchChapter($chapterId, $term);
- return view('partials.entity-list', ['entities' => $results]);
+ return view('entities.list', ['entities' => $results]);
}
/**
@@ -86,7 +86,7 @@ class SearchController extends Controller
$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]);
}
/**
@@ -99,6 +99,6 @@ class SearchController extends Controller
$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']);
}
}
diff --git a/app/Http/Controllers/UserSearchController.php b/app/Http/Controllers/UserSearchController.php
index 4150caf04..f7ed9e57a 100644
--- a/app/Http/Controllers/UserSearchController.php
+++ b/app/Http/Controllers/UserSearchController.php
@@ -27,6 +27,6 @@ class UserSearchController extends Controller
$users = $query->get();
- return view('components.user-select-list', compact('users'));
+ return view('form.user-select-list', compact('users'));
}
}
diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php
index f7c8fe492..145a7645b 100644
--- a/app/Providers/AppServiceProvider.php
+++ b/app/Providers/AppServiceProvider.php
@@ -54,7 +54,7 @@ class AppServiceProvider extends ServiceProvider
]);
// View Composers
- View::composer('partials.breadcrumbs', BreadcrumbsViewComposer::class);
+ View::composer('entities.breadcrumbs', BreadcrumbsViewComposer::class);
}
/**
diff --git a/resources/views/api-docs/index.blade.php b/resources/views/api-docs/index.blade.php
index 56f7135c3..5bec265e8 100644
--- a/resources/views/api-docs/index.blade.php
+++ b/resources/views/api-docs/index.blade.php
@@ -1,4 +1,4 @@
-@extends('simple-layout')
+@extends('layouts.simple')
@section('body')
@@ -37,148 +37,7 @@
<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 &lt;token_id&gt;:&lt;token_secret&gt;</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[&lt;field&gt;]</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[&lt;field&gt;:&lt;operation&gt;] <br>
- <table>
- <tr>
- <td>eq</td>
- <td>Where <code>&lt;field&gt;</code> equals the filter value.</td>
- </tr>
- <tr>
- <td>ne</td>
- <td>Where <code>&lt;field&gt;</code> does not equal the filter value.</td>
- </tr>
- <tr>
- <td>gt</td>
- <td>Where <code>&lt;field&gt;</code> is greater than the filter value.</td>
- </tr>
- <tr>
- <td>lt</td>
- <td>Where <code>&lt;field&gt;</code> is less than the filter value.</td>
- </tr>
- <tr>
- <td>gte</td>
- <td>Where <code>&lt;field&gt;</code> is greater than or equal to the filter value.</td>
- </tr>
- <tr>
- <td>lte</td>
- <td>Where <code>&lt;field&gt;</code> is less than or equal to the filter value.</td>
- </tr>
- <tr>
- <td>like</td>
- <td>
- Where <code>&lt;field&gt;</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)
@@ -186,52 +45,7 @@
<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
diff --git a/resources/views/api-docs/parts/endpoint.blade.php b/resources/views/api-docs/parts/endpoint.blade.php
new file mode 100644
index 000000000..c1bce805b
--- /dev/null
+++ b/resources/views/api-docs/parts/endpoint.blade.php
@@ -0,0 +1,52 @@
+<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
diff --git a/resources/views/api-docs/parts/getting-started.blade.php b/resources/views/api-docs/parts/getting-started.blade.php
new file mode 100644
index 000000000..ba0f85fc7
--- /dev/null
+++ b/resources/views/api-docs/parts/getting-started.blade.php
@@ -0,0 +1,141 @@
+<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 &lt;token_id&gt;:&lt;token_secret&gt;</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[&lt;field&gt;]</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[&lt;field&gt;:&lt;operation&gt;] <br>
+ <table>
+ <tr>
+ <td>eq</td>
+ <td>Where <code>&lt;field&gt;</code> equals the filter value.</td>
+ </tr>
+ <tr>
+ <td>ne</td>
+ <td>Where <code>&lt;field&gt;</code> does not equal the filter value.</td>
+ </tr>
+ <tr>
+ <td>gt</td>
+ <td>Where <code>&lt;field&gt;</code> is greater than the filter value.</td>
+ </tr>
+ <tr>
+ <td>lt</td>
+ <td>Where <code>&lt;field&gt;</code> is less than the filter value.</td>
+ </tr>
+ <tr>
+ <td>gte</td>
+ <td>Where <code>&lt;field&gt;</code> is greater than or equal to the filter value.</td>
+ </tr>
+ <tr>
+ <td>lte</td>
+ <td>Where <code>&lt;field&gt;</code> is less than or equal to the filter value.</td>
+ </tr>
+ <tr>
+ <td>like</td>
+ <td>
+ Where <code>&lt;field&gt;</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
diff --git a/resources/views/attachments/manager-edit-form.blade.php b/resources/views/attachments/manager-edit-form.blade.php
index ee86dc240..15837448a 100644
--- a/resources/views/attachments/manager-edit-form.blade.php
+++ b/resources/views/attachments/manager-edit-form.blade.php
@@ -22,7 +22,7 @@
<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'),
diff --git a/resources/views/attachments/manager.blade.php b/resources/views/attachments/manager.blade.php
index 4628f7495..024cb583c 100644
--- a/resources/views/attachments/manager.blade.php
+++ b/resources/views/attachments/manager.blade.php
@@ -18,7 +18,7 @@
@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'),
diff --git a/resources/views/auth/invite-set-password.blade.php b/resources/views/auth/invite-set-password.blade.php
index fbe62f21e..c29ed5706 100644
--- a/resources/views/auth/invite-set-password.blade.php
+++ b/resources/views/auth/invite-set-password.blade.php
@@ -1,4 +1,4 @@
-@extends('simple-layout')
+@extends('layouts.simple')
@section('content')
diff --git a/resources/views/auth/login.blade.php b/resources/views/auth/login.blade.php
index 4212c1964..de99bb3f2 100644
--- a/resources/views/auth/login.blade.php
+++ b/resources/views/auth/login.blade.php
@@ -1,4 +1,4 @@
-@extends('simple-layout')
+@extends('layouts.simple')
@section('content')
@@ -9,7 +9,7 @@
<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">
diff --git a/resources/views/auth/forms/login/ldap.blade.php b/resources/views/auth/parts/login-form-ldap.blade.php
similarity index 100%
rename from resources/views/auth/forms/login/ldap.blade.php
rename to resources/views/auth/parts/login-form-ldap.blade.php
diff --git a/resources/views/auth/forms/login/saml2.blade.php b/resources/views/auth/parts/login-form-saml2.blade.php
similarity index 100%
rename from resources/views/auth/forms/login/saml2.blade.php
rename to resources/views/auth/parts/login-form-saml2.blade.php
diff --git a/resources/views/auth/forms/login/standard.blade.php b/resources/views/auth/parts/login-form-standard.blade.php
similarity index 95%
rename from resources/views/auth/forms/login/standard.blade.php
rename to resources/views/auth/parts/login-form-standard.blade.php
index 87603e2cb..71989dc2f 100644
--- a/resources/views/auth/forms/login/standard.blade.php
+++ b/resources/views/auth/parts/login-form-standard.blade.php
@@ -18,7 +18,7 @@
<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',
diff --git a/resources/views/auth/passwords/email.blade.php b/resources/views/auth/passwords/email.blade.php
index 8273ed235..d42b9e3c6 100644
--- a/resources/views/auth/passwords/email.blade.php
+++ b/resources/views/auth/passwords/email.blade.php
@@ -1,4 +1,4 @@
-@extends('simple-layout')
+@extends('layouts.simple')
@section('content')
<div class="container very-small mt-xl">
diff --git a/resources/views/auth/passwords/reset.blade.php b/resources/views/auth/passwords/reset.blade.php
index 930544cde..de332f9e1 100644
--- a/resources/views/auth/passwords/reset.blade.php
+++ b/resources/views/auth/passwords/reset.blade.php
@@ -1,4 +1,4 @@
-@extends('simple-layout')
+@extends('layouts.simple')
@section('content')
diff --git a/resources/views/auth/register-confirm.blade.php b/resources/views/auth/register-confirm.blade.php
index 8fbf8abbb..0de877a53 100644
--- a/resources/views/auth/register-confirm.blade.php
+++ b/resources/views/auth/register-confirm.blade.php
@@ -1,4 +1,4 @@
-@extends('simple-layout')
+@extends('layouts.simple')
@section('content')
diff --git a/resources/views/auth/register.blade.php b/resources/views/auth/register.blade.php
index d3483c6e6..91ec0b621 100644
--- a/resources/views/auth/register.blade.php
+++ b/resources/views/auth/register.blade.php
@@ -1,4 +1,4 @@
-@extends('simple-layout')
+@extends('layouts.simple')
@section('content')
<div class="container very-small">
diff --git a/resources/views/auth/user-unconfirmed.blade.php b/resources/views/auth/user-unconfirmed.blade.php
index 5f1edd2b9..2f780b8a3 100644
--- a/resources/views/auth/user-unconfirmed.blade.php
+++ b/resources/views/auth/user-unconfirmed.blade.php
@@ -1,4 +1,4 @@
-@extends('simple-layout')
+@extends('layouts.simple')
@section('content')
diff --git a/resources/views/books/_breadcrumbs.blade.php b/resources/views/books/_breadcrumbs.blade.php
deleted file mode 100644
index e4ecc36c6..000000000
--- a/resources/views/books/_breadcrumbs.blade.php
+++ /dev/null
@@ -1,3 +0,0 @@
-<div class="breadcrumbs">
- <a href="{{$book->getUrl()}}" class="text-book text-button">@icon('book'){{ $book->getShortName() }}</a>
-</div>
\ No newline at end of file
diff --git a/resources/views/books/create.blade.php b/resources/views/books/create.blade.php
index db3e90e51..eead4191c 100644
--- a/resources/views/books/create.blade.php
+++ b/resources/views/books/create.blade.php
@@ -1,10 +1,10 @@
-@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'),
@@ -12,7 +12,7 @@
]
]])
@else
- @include('partials.breadcrumbs', ['crumbs' => [
+ @include('entities.breadcrumbs', ['crumbs' => [
'/books' => [
'text' => trans('entities.books'),
'icon' => 'book'
@@ -28,7 +28,7 @@
<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>
diff --git a/resources/views/books/delete.blade.php b/resources/views/books/delete.blade.php
index be3f742cb..b0f3590c1 100644
--- a/resources/views/books/delete.blade.php
+++ b/resources/views/books/delete.blade.php
@@ -1,11 +1,11 @@
-@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'),
diff --git a/resources/views/books/edit.blade.php b/resources/views/books/edit.blade.php
index ac11b58e2..403977121 100644
--- a/resources/views/books/edit.blade.php
+++ b/resources/views/books/edit.blade.php
@@ -1,11 +1,11 @@
-@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'),
@@ -18,7 +18,7 @@
<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>
diff --git a/resources/views/books/export.blade.php b/resources/views/books/export.blade.php
index 9cd5618a5..0b6b4a58c 100644
--- a/resources/views/books/export.blade.php
+++ b/resources/views/books/export.blade.php
@@ -1,4 +1,4 @@
-@extends('export-layout')
+@extends('layouts.export')
@section('title', $book->name)
diff --git a/resources/views/books/index.blade.php b/resources/views/books/index.blade.php
index 81fb66cfc..5f1bd3743 100644
--- a/resources/views/books/index.blade.php
+++ b/resources/views/books/index.blade.php
@@ -1,21 +1,21 @@
-@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
@@ -24,7 +24,7 @@
<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
@@ -43,7 +43,7 @@
</a>
@endif
- @include('partials.view-toggle', ['view' => $view, 'type' => 'books'])
+ @include('entities.view-toggle', ['view' => $view, 'type' => 'books'])
</div>
</div>
diff --git a/resources/views/books/form.blade.php b/resources/views/books/parts/form.blade.php
similarity index 92%
rename from resources/views/books/form.blade.php
rename to resources/views/books/parts/form.blade.php
index 9fdcaea61..bb87089b2 100644
--- a/resources/views/books/form.blade.php
+++ b/resources/views/books/parts/form.blade.php
@@ -17,7 +17,7 @@
<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',
@@ -31,7 +31,7 @@
<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>
diff --git a/resources/views/books/list-item.blade.php b/resources/views/books/parts/list-item.blade.php
similarity index 100%
rename from resources/views/books/list-item.blade.php
rename to resources/views/books/parts/list-item.blade.php
diff --git a/resources/views/books/list.blade.php b/resources/views/books/parts/list.blade.php
similarity index 84%
rename from resources/views/books/list.blade.php
rename to resources/views/books/parts/list.blade.php
index 52cd935d1..30b076613 100644
--- a/resources/views/books/list.blade.php
+++ b/resources/views/books/parts/list.blade.php
@@ -3,7 +3,7 @@
<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'),
@@ -15,13 +15,13 @@
@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
diff --git a/resources/views/books/sort-box.blade.php b/resources/views/books/parts/sort-box.blade.php
similarity index 100%
rename from resources/views/books/sort-box.blade.php
rename to resources/views/books/parts/sort-box.blade.php
diff --git a/resources/views/books/permissions.blade.php b/resources/views/books/permissions.blade.php
index b387ed6c7..d72042d42 100644
--- a/resources/views/books/permissions.blade.php
+++ b/resources/views/books/permissions.blade.php
@@ -1,11 +1,11 @@
-@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'),
diff --git a/resources/views/books/show.blade.php b/resources/views/books/show.blade.php
index 5879cf6a2..cc1fceb13 100644
--- a/resources/views/books/show.blade.php
+++ b/resources/views/books/show.blade.php
@@ -1,4 +1,4 @@
-@extends('tri-layout')
+@extends('layouts.tri')
@section('container-attrs')
component="entity-search"
@@ -16,7 +16,7 @@
@section('body')
<div class="mb-s">
- @include('partials.breadcrumbs', ['crumbs' => [
+ @include('entities.breadcrumbs', ['crumbs' => [
$book,
]])
</div>
@@ -29,9 +29,9 @@
<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>
@@ -59,7 +59,7 @@
@endif
</div>
- @include('partials.entity-search-results')
+ @include('entities.search-results')
</main>
@stop
@@ -68,7 +68,7 @@
<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))
@@ -126,9 +126,9 @@
<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>
@@ -136,25 +136,25 @@
@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
diff --git a/resources/views/books/sort.blade.php b/resources/views/books/sort.blade.php
index 642b88c87..a24bd8959 100644
--- a/resources/views/books/sort.blade.php
+++ b/resources/views/books/sort.blade.php
@@ -1,11 +1,11 @@
-@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'),
@@ -19,7 +19,7 @@
<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">
@@ -38,7 +38,7 @@
<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>
diff --git a/resources/views/chapters/create.blade.php b/resources/views/chapters/create.blade.php
index c9787e634..1216f4d27 100644
--- a/resources/views/chapters/create.blade.php
+++ b/resources/views/chapters/create.blade.php
@@ -1,10 +1,10 @@
-@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'),
@@ -16,7 +16,7 @@
<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>
diff --git a/resources/views/chapters/delete.blade.php b/resources/views/chapters/delete.blade.php
index 60f8c9933..e0e774ddf 100644
--- a/resources/views/chapters/delete.blade.php
+++ b/resources/views/chapters/delete.blade.php
@@ -1,11 +1,11 @@
-@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') => [
diff --git a/resources/views/chapters/edit.blade.php b/resources/views/chapters/edit.blade.php
index d8bb056f6..65c48c18d 100644
--- a/resources/views/chapters/edit.blade.php
+++ b/resources/views/chapters/edit.blade.php
@@ -1,11 +1,11 @@
-@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') => [
@@ -19,7 +19,7 @@
<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>
diff --git a/resources/views/chapters/export.blade.php b/resources/views/chapters/export.blade.php
index 18f056f27..61286ab17 100644
--- a/resources/views/chapters/export.blade.php
+++ b/resources/views/chapters/export.blade.php
@@ -1,4 +1,4 @@
-@extends('export-layout')
+@extends('layouts.export')
@section('title', $chapter->name)
diff --git a/resources/views/chapters/move.blade.php b/resources/views/chapters/move.blade.php
index 8663dca50..96d4021ee 100644
--- a/resources/views/chapters/move.blade.php
+++ b/resources/views/chapters/move.blade.php
@@ -1,11 +1,11 @@
-@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') => [
@@ -23,7 +23,7 @@
{!! 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>
diff --git a/resources/views/chapters/child-menu.blade.php b/resources/views/chapters/parts/child-menu.blade.php
similarity index 81%
rename from resources/views/chapters/child-menu.blade.php
rename to resources/views/chapters/parts/child-menu.blade.php
index a1358e1db..a00f0f7e1 100644
--- a/resources/views/chapters/child-menu.blade.php
+++ b/resources/views/chapters/parts/child-menu.blade.php
@@ -6,7 +6,7 @@
<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>
diff --git a/resources/views/chapters/form.blade.php b/resources/views/chapters/parts/form.blade.php
similarity index 92%
rename from resources/views/chapters/form.blade.php
rename to resources/views/chapters/parts/form.blade.php
index 0de665744..3908d0693 100644
--- a/resources/views/chapters/form.blade.php
+++ b/resources/views/chapters/parts/form.blade.php
@@ -16,7 +16,7 @@
<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>
diff --git a/resources/views/chapters/list-item.blade.php b/resources/views/chapters/parts/list-item.blade.php
similarity index 92%
rename from resources/views/chapters/list-item.blade.php
rename to resources/views/chapters/parts/list-item.blade.php
index 918698333..285e34893 100644
--- a/resources/views/chapters/list-item.blade.php
+++ b/resources/views/chapters/parts/list-item.blade.php
@@ -18,7 +18,7 @@
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>
diff --git a/resources/views/chapters/permissions.blade.php b/resources/views/chapters/permissions.blade.php
index 48c954dc9..6b4e21938 100644
--- a/resources/views/chapters/permissions.blade.php
+++ b/resources/views/chapters/permissions.blade.php
@@ -1,11 +1,11 @@
-@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') => [
diff --git a/resources/views/chapters/show.blade.php b/resources/views/chapters/show.blade.php
index e8e0f6374..9e78ec946 100644
--- a/resources/views/chapters/show.blade.php
+++ b/resources/views/chapters/show.blade.php
@@ -1,4 +1,4 @@
-@extends('tri-layout')
+@extends('layouts.tri')
@section('container-attrs')
component="entity-search"
@@ -13,7 +13,7 @@
@section('body')
<div class="mb-m print-hidden">
- @include('partials.breadcrumbs', ['crumbs' => [
+ @include('entities.breadcrumbs', ['crumbs' => [
$chapter->book,
$chapter,
]])
@@ -26,7 +26,7 @@
@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
@@ -53,10 +53,10 @@
@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
@@ -65,7 +65,7 @@
<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">
@@ -130,24 +130,24 @@
<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
diff --git a/resources/views/comments/comment.blade.php b/resources/views/comments/comment.blade.php
index 322477ebd..9f4a12357 100644
--- a/resources/views/comments/comment.blade.php
+++ b/resources/views/comments/comment.blade.php
@@ -48,7 +48,7 @@
<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>
@@ -64,7 +64,7 @@
<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>
diff --git a/resources/views/comments/create.blade.php b/resources/views/comments/create.blade.php
index 12216b95b..a5a84b004 100644
--- a/resources/views/comments/create.blade.php
+++ b/resources/views/comments/create.blade.php
@@ -24,7 +24,7 @@
<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>
diff --git a/resources/views/partials/activity-item.blade.php b/resources/views/common/activity-item.blade.php
similarity index 100%
rename from resources/views/partials/activity-item.blade.php
rename to resources/views/common/activity-item.blade.php
diff --git a/resources/views/partials/activity-list.blade.php b/resources/views/common/activity-list.blade.php
similarity index 76%
rename from resources/views/partials/activity-list.blade.php
rename to resources/views/common/activity-list.blade.php
index 397a69d38..90272b21c 100644
--- a/resources/views/partials/activity-list.blade.php
+++ b/resources/views/common/activity-list.blade.php
@@ -3,7 +3,7 @@
<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>
diff --git a/resources/views/partials/custom-head.blade.php b/resources/views/common/custom-head.blade.php
similarity index 100%
rename from resources/views/partials/custom-head.blade.php
rename to resources/views/common/custom-head.blade.php
diff --git a/resources/views/partials/custom-styles.blade.php b/resources/views/common/custom-styles.blade.php
similarity index 100%
rename from resources/views/partials/custom-styles.blade.php
rename to resources/views/common/custom-styles.blade.php
diff --git a/resources/views/partials/dark-mode-toggle.blade.php b/resources/views/common/dark-mode-toggle.blade.php
similarity index 100%
rename from resources/views/partials/dark-mode-toggle.blade.php
rename to resources/views/common/dark-mode-toggle.blade.php
diff --git a/resources/views/common/detailed-listing-paginated.blade.php b/resources/views/common/detailed-listing-paginated.blade.php
index af9490a41..d2606d816 100644
--- a/resources/views/common/detailed-listing-paginated.blade.php
+++ b/resources/views/common/detailed-listing-paginated.blade.php
@@ -1,4 +1,4 @@
-@extends('simple-layout')
+@extends('layouts.simple')
@section('body')
<div class="container small pt-xl">
@@ -6,7 +6,7 @@
<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">
diff --git a/resources/views/common/detailed-listing-with-more.blade.php b/resources/views/common/detailed-listing-with-more.blade.php
index 5790f2065..5413d239e 100644
--- a/resources/views/common/detailed-listing-with-more.blade.php
+++ b/resources/views/common/detailed-listing-with-more.blade.php
@@ -1,4 +1,4 @@
-@extends('simple-layout')
+@extends('layouts.simple')
@section('body')
<div class="container small pt-xl">
@@ -6,7 +6,7 @@
<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">
diff --git a/resources/views/partials/export-custom-head.blade.php b/resources/views/common/export-custom-head.blade.php
similarity index 100%
rename from resources/views/partials/export-custom-head.blade.php
rename to resources/views/common/export-custom-head.blade.php
diff --git a/resources/views/partials/export-styles.blade.php b/resources/views/common/export-styles.blade.php
similarity index 100%
rename from resources/views/partials/export-styles.blade.php
rename to resources/views/common/export-styles.blade.php
diff --git a/resources/views/common/header.blade.php b/resources/views/common/header.blade.php
index 274a09996..2311ce3e0 100644
--- a/resources/views/common/header.blade.php
+++ b/resources/views/common/header.blade.php
@@ -79,7 +79,7 @@
</li>
<li><hr></li>
<li>
- @include('partials.dark-mode-toggle')
+ @include('common.dark-mode-toggle')
</li>
</ul>
</div>
diff --git a/resources/views/partials/loading-icon.blade.php b/resources/views/common/loading-icon.blade.php
similarity index 100%
rename from resources/views/partials/loading-icon.blade.php
rename to resources/views/common/loading-icon.blade.php
diff --git a/resources/views/partials/notifications.blade.php b/resources/views/common/notifications.blade.php
similarity index 100%
rename from resources/views/partials/notifications.blade.php
rename to resources/views/common/notifications.blade.php
diff --git a/resources/views/common/parts/skip-to-content.blade.php b/resources/views/common/skip-to-content.blade.php
similarity index 100%
rename from resources/views/common/parts/skip-to-content.blade.php
rename to resources/views/common/skip-to-content.blade.php
diff --git a/resources/views/partials/book-tree.blade.php b/resources/views/entities/book-tree.blade.php
similarity index 76%
rename from resources/views/partials/book-tree.blade.php
rename to resources/views/entities/book-tree.blade.php
index 15b583289..ce016143a 100644
--- a/resources/views/partials/book-tree.blade.php
+++ b/resources/views/entities/book-tree.blade.php
@@ -7,19 +7,19 @@
<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)
diff --git a/resources/views/partials/breadcrumb-listing.blade.php b/resources/views/entities/breadcrumb-listing.blade.php
similarity index 95%
rename from resources/views/partials/breadcrumb-listing.blade.php
rename to resources/views/entities/breadcrumb-listing.blade.php
index 2a559aa7d..929f56ed3 100644
--- a/resources/views/partials/breadcrumb-listing.blade.php
+++ b/resources/views/entities/breadcrumb-listing.blade.php
@@ -16,7 +16,7 @@
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>
diff --git a/resources/views/partials/breadcrumbs.blade.php b/resources/views/entities/breadcrumbs.blade.php
similarity index 96%
rename from resources/views/partials/breadcrumbs.blade.php
rename to resources/views/entities/breadcrumbs.blade.php
index 065aa8420..d078d9873 100644
--- a/resources/views/partials/breadcrumbs.blade.php
+++ b/resources/views/entities/breadcrumbs.blade.php
@@ -40,7 +40,7 @@
</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>
diff --git a/resources/views/partials/entity-export-menu.blade.php b/resources/views/entities/export-menu.blade.php
similarity index 100%
rename from resources/views/partials/entity-export-menu.blade.php
rename to resources/views/entities/export-menu.blade.php
diff --git a/resources/views/partials/entity-export-meta.blade.php b/resources/views/entities/export-meta.blade.php
similarity index 100%
rename from resources/views/partials/entity-export-meta.blade.php
rename to resources/views/entities/export-meta.blade.php
diff --git a/resources/views/partials/entity-favourite-action.blade.php b/resources/views/entities/favourite-action.blade.php
similarity index 100%
rename from resources/views/partials/entity-favourite-action.blade.php
rename to resources/views/entities/favourite-action.blade.php
diff --git a/resources/views/partials/entity-grid-item.blade.php b/resources/views/entities/grid-item.blade.php
similarity index 100%
rename from resources/views/partials/entity-grid-item.blade.php
rename to resources/views/entities/grid-item.blade.php
diff --git a/resources/views/partials/entity-list-basic.blade.php b/resources/views/entities/list-basic.blade.php
similarity index 76%
rename from resources/views/partials/entity-list-basic.blade.php
rename to resources/views/entities/list-basic.blade.php
index dc5c3f333..84b910484 100644
--- a/resources/views/partials/entity-list-basic.blade.php
+++ b/resources/views/entities/list-basic.blade.php
@@ -1,7 +1,7 @@
<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">
diff --git a/resources/views/partials/entity-list-item-basic.blade.php b/resources/views/entities/list-item-basic.blade.php
similarity index 100%
rename from resources/views/partials/entity-list-item-basic.blade.php
rename to resources/views/entities/list-item-basic.blade.php
diff --git a/resources/views/partials/entity-list-item.blade.php b/resources/views/entities/list-item.blade.php
similarity index 79%
rename from resources/views/partials/entity-list-item.blade.php
rename to resources/views/entities/list-item.blade.php
index d605953c7..8b5eb20b0 100644
--- a/resources/views/partials/entity-list-item.blade.php
+++ b/resources/views/entities/list-item.blade.php
@@ -1,4 +1,4 @@
-@component('partials.entity-list-item-basic', ['entity' => $entity])
+@component('entities.list-item-basic', ['entity' => $entity])
<div class="entity-item-snippet">
@@ -16,7 +16,7 @@
@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
diff --git a/resources/views/partials/entity-list.blade.php b/resources/views/entities/list.blade.php
similarity index 63%
rename from resources/views/partials/entity-list.blade.php
rename to resources/views/entities/list.blade.php
index 393f4e8a7..25673c583 100644
--- a/resources/views/partials/entity-list.blade.php
+++ b/resources/views/entities/list.blade.php
@@ -1,7 +1,7 @@
@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
diff --git a/resources/views/partials/entity-meta.blade.php b/resources/views/entities/meta.blade.php
similarity index 100%
rename from resources/views/partials/entity-meta.blade.php
rename to resources/views/entities/meta.blade.php
diff --git a/resources/views/partials/entity-search-form.blade.php b/resources/views/entities/search-form.blade.php
similarity index 100%
rename from resources/views/partials/entity-search-form.blade.php
rename to resources/views/entities/search-form.blade.php
diff --git a/resources/views/partials/entity-search-results.blade.php b/resources/views/entities/search-results.blade.php
similarity index 91%
rename from resources/views/partials/entity-search-results.blade.php
rename to resources/views/entities/search-results.blade.php
index 74619831a..a3c4aa8f7 100644
--- a/resources/views/partials/entity-search-results.blade.php
+++ b/resources/views/entities/search-results.blade.php
@@ -9,7 +9,7 @@
</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
diff --git a/resources/views/components/entity-selector-popup.blade.php b/resources/views/entities/selector-popup.blade.php
similarity index 88%
rename from resources/views/components/entity-selector-popup.blade.php
rename to resources/views/entities/selector-popup.blade.php
index ec8712b6a..ab73a014f 100644
--- a/resources/views/components/entity-selector-popup.blade.php
+++ b/resources/views/entities/selector-popup.blade.php
@@ -5,7 +5,7 @@
<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>
diff --git a/resources/views/components/entity-selector.blade.php b/resources/views/entities/selector.blade.php
similarity index 94%
rename from resources/views/components/entity-selector.blade.php
rename to resources/views/entities/selector.blade.php
index c71fdff63..687392dea 100644
--- a/resources/views/components/entity-selector.blade.php
+++ b/resources/views/entities/selector.blade.php
@@ -5,7 +5,7 @@
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">
diff --git a/resources/views/partials/entity-sibling-navigation.blade.php b/resources/views/entities/sibling-navigation.blade.php
similarity index 100%
rename from resources/views/partials/entity-sibling-navigation.blade.php
rename to resources/views/entities/sibling-navigation.blade.php
diff --git a/resources/views/partials/sort.blade.php b/resources/views/entities/sort.blade.php
similarity index 100%
rename from resources/views/partials/sort.blade.php
rename to resources/views/entities/sort.blade.php
diff --git a/resources/views/components/tag-list.blade.php b/resources/views/entities/tag-list.blade.php
similarity index 100%
rename from resources/views/components/tag-list.blade.php
rename to resources/views/entities/tag-list.blade.php
diff --git a/resources/views/components/tag-manager-list.blade.php b/resources/views/entities/tag-manager-list.blade.php
similarity index 100%
rename from resources/views/components/tag-manager-list.blade.php
rename to resources/views/entities/tag-manager-list.blade.php
diff --git a/resources/views/components/tag-manager.blade.php b/resources/views/entities/tag-manager.blade.php
similarity index 84%
rename from resources/views/components/tag-manager.blade.php
rename to resources/views/entities/tag-manager.blade.php
index 9e24ba3fd..5975c4bd9 100644
--- a/resources/views/components/tag-manager.blade.php
+++ b/resources/views/entities/tag-manager.blade.php
@@ -9,7 +9,7 @@
<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>
diff --git a/resources/views/partials/view-toggle.blade.php b/resources/views/entities/view-toggle.blade.php
similarity index 100%
rename from resources/views/partials/view-toggle.blade.php
rename to resources/views/entities/view-toggle.blade.php
diff --git a/resources/views/errors/404.blade.php b/resources/views/errors/404.blade.php
index c4a5dc782..a4e5a0dd4 100644
--- a/resources/views/errors/404.blade.php
+++ b/resources/views/errors/404.blade.php
@@ -1,4 +1,4 @@
-@extends('simple-layout')
+@extends('layouts.simple')
@section('content')
<div class="container mt-l">
@@ -28,7 +28,7 @@
<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>
@@ -36,7 +36,7 @@
<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>
@@ -44,7 +44,7 @@
<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>
diff --git a/resources/views/errors/500.blade.php b/resources/views/errors/500.blade.php
index ad759b49d..d7d58e4c4 100644
--- a/resources/views/errors/500.blade.php
+++ b/resources/views/errors/500.blade.php
@@ -1,4 +1,4 @@
-@extends('base')
+@extends('layouts.base')
@section('content')
diff --git a/resources/views/errors/503.blade.php b/resources/views/errors/503.blade.php
index 29364606b..9f86bfdc6 100644
--- a/resources/views/errors/503.blade.php
+++ b/resources/views/errors/503.blade.php
@@ -1,4 +1,4 @@
-@extends('simple-layout')
+@extends('layouts.simple')
@section('content')
diff --git a/resources/views/form/checkbox.blade.php b/resources/views/form/checkbox.blade.php
index 255b591aa..fb2d4e259 100644
--- a/resources/views/form/checkbox.blade.php
+++ b/resources/views/form/checkbox.blade.php
@@ -4,7 +4,7 @@ $label
$errors?
$model?
--}}
-@include('components.custom-checkbox', [
+@include('form.custom-checkbox', [
'name' => $name,
'label' => $label,
'value' => 'true',
diff --git a/resources/views/components/custom-checkbox.blade.php b/resources/views/form/custom-checkbox.blade.php
similarity index 100%
rename from resources/views/components/custom-checkbox.blade.php
rename to resources/views/form/custom-checkbox.blade.php
diff --git a/resources/views/components/dropzone.blade.php b/resources/views/form/dropzone.blade.php
similarity index 100%
rename from resources/views/components/dropzone.blade.php
rename to resources/views/form/dropzone.blade.php
diff --git a/resources/views/form/entity-permissions.blade.php b/resources/views/form/entity-permissions.blade.php
index d3e89cc44..178046ba2 100644
--- a/resources/views/form/entity-permissions.blade.php
+++ b/resources/views/form/entity-permissions.blade.php
@@ -15,7 +15,7 @@
<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>
diff --git a/resources/views/components/image-picker.blade.php b/resources/views/form/image-picker.blade.php
similarity index 100%
rename from resources/views/components/image-picker.blade.php
rename to resources/views/form/image-picker.blade.php
diff --git a/resources/views/form/restriction-checkbox.blade.php b/resources/views/form/restriction-checkbox.blade.php
index 65a94239e..02c477f4a 100644
--- a/resources/views/form/restriction-checkbox.blade.php
+++ b/resources/views/form/restriction-checkbox.blade.php
@@ -5,7 +5,7 @@ $role
$action
$model?
--}}
-@include('components.custom-checkbox', [
+@include('form.custom-checkbox', [
'name' => $name . '[' . $role->id . '][' . $action . ']',
'label' => $label,
'value' => 'true',
diff --git a/resources/views/form/role-checkboxes.blade.php b/resources/views/form/role-checkboxes.blade.php
index fc6ad93a8..7e5ca629a 100644
--- a/resources/views/form/role-checkboxes.blade.php
+++ b/resources/views/form/role-checkboxes.blade.php
@@ -2,7 +2,7 @@
<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,
diff --git a/resources/views/components/toggle-switch.blade.php b/resources/views/form/toggle-switch.blade.php
similarity index 100%
rename from resources/views/components/toggle-switch.blade.php
rename to resources/views/form/toggle-switch.blade.php
diff --git a/resources/views/components/user-select-list.blade.php b/resources/views/form/user-select-list.blade.php
similarity index 100%
rename from resources/views/components/user-select-list.blade.php
rename to resources/views/form/user-select-list.blade.php
diff --git a/resources/views/components/user-select.blade.php b/resources/views/form/user-select.blade.php
similarity index 96%
rename from resources/views/components/user-select.blade.php
rename to resources/views/form/user-select.blade.php
index 50c731efd..8823bb075 100644
--- a/resources/views/components/user-select.blade.php
+++ b/resources/views/form/user-select.blade.php
@@ -27,7 +27,7 @@
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>
diff --git a/resources/views/common/home-book.blade.php b/resources/views/home/books.blade.php
similarity index 63%
rename from resources/views/common/home-book.blade.php
rename to resources/views/home/books.blade.php
index 9f62d21e7..75d4ae14a 100644
--- a/resources/views/common/home-book.blade.php
+++ b/resources/views/home/books.blade.php
@@ -1,11 +1,11 @@
-@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')
@@ -18,9 +18,9 @@
<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
diff --git a/resources/views/common/home.blade.php b/resources/views/home/default.blade.php
similarity index 83%
rename from resources/views/common/home.blade.php
rename to resources/views/home/default.blade.php
index 187f222b5..b8866526d 100644
--- a/resources/views/common/home.blade.php
+++ b/resources/views/home/default.blade.php
@@ -1,4 +1,4 @@
-@extends('simple-layout')
+@extends('layouts.simple')
@section('body')
@@ -6,12 +6,12 @@
<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>
@@ -24,7 +24,7 @@
<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
@@ -32,7 +32,7 @@
<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')
@@ -48,7 +48,7 @@
<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',
])
@@ -59,7 +59,7 @@
<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')
@@ -72,7 +72,7 @@
<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>
diff --git a/resources/views/components/expand-toggle.blade.php b/resources/views/home/parts/expand-toggle.blade.php
similarity index 100%
rename from resources/views/components/expand-toggle.blade.php
rename to resources/views/home/parts/expand-toggle.blade.php
diff --git a/resources/views/common/home-sidebar.blade.php b/resources/views/home/parts/sidebar.blade.php
similarity index 80%
rename from resources/views/common/home-sidebar.blade.php
rename to resources/views/home/parts/sidebar.blade.php
index 7fe0659f0..8dc8118f5 100644
--- a/resources/views/common/home-sidebar.blade.php
+++ b/resources/views/home/parts/sidebar.blade.php
@@ -1,7 +1,7 @@
@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
@@ -10,7 +10,7 @@
<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',
])
@@ -19,7 +19,7 @@
<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')
@@ -29,7 +29,7 @@
<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')
@@ -39,5 +39,5 @@
<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
diff --git a/resources/views/common/home-shelves.blade.php b/resources/views/home/shelves.blade.php
similarity index 63%
rename from resources/views/common/home-shelves.blade.php
rename to resources/views/home/shelves.blade.php
index 3c32fed74..c525643b9 100644
--- a/resources/views/common/home-shelves.blade.php
+++ b/resources/views/home/shelves.blade.php
@@ -1,11 +1,11 @@
-@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')
@@ -18,9 +18,9 @@
<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
diff --git a/resources/views/common/home-custom.blade.php b/resources/views/home/specific-page.blade.php
similarity index 62%
rename from resources/views/common/home-custom.blade.php
rename to resources/views/home/specific-page.blade.php
index a22e26002..936433b27 100644
--- a/resources/views/common/home-custom.blade.php
+++ b/resources/views/home/specific-page.blade.php
@@ -1,25 +1,25 @@
-@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
diff --git a/resources/views/base.blade.php b/resources/views/layouts/base.blade.php
similarity index 91%
rename from resources/views/base.blade.php
rename to resources/views/layouts/base.blade.php
index dc665a888..6a45b4209 100644
--- a/resources/views/base.blade.php
+++ b/resources/views/layouts/base.blade.php
@@ -24,8 +24,8 @@
@yield('head')
<!-- Custom Styles & Head Content -->
- @include('partials.custom-styles')
- @include('partials.custom-head')
+ @include('common.custom-styles')
+ @include('common.custom-head')
@stack('head')
@@ -34,8 +34,8 @@
</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">
diff --git a/resources/views/export-layout.blade.php b/resources/views/layouts/export.blade.php
similarity index 68%
rename from resources/views/export-layout.blade.php
rename to resources/views/layouts/export.blade.php
index f23b3cca5..55df43a45 100644
--- a/resources/views/export-layout.blade.php
+++ b/resources/views/layouts/export.blade.php
@@ -4,8 +4,8 @@
<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">
diff --git a/resources/views/simple-layout.blade.php b/resources/views/layouts/simple.blade.php
similarity index 90%
rename from resources/views/simple-layout.blade.php
rename to resources/views/layouts/simple.blade.php
index b7d6d3ccd..5fb231bdb 100644
--- a/resources/views/simple-layout.blade.php
+++ b/resources/views/layouts/simple.blade.php
@@ -1,4 +1,4 @@
-@extends('base')
+@extends('layouts.base')
@section('content')
diff --git a/resources/views/tri-layout.blade.php b/resources/views/layouts/tri.blade.php
similarity index 98%
rename from resources/views/tri-layout.blade.php
rename to resources/views/layouts/tri.blade.php
index d985db649..e95b21445 100644
--- a/resources/views/tri-layout.blade.php
+++ b/resources/views/layouts/tri.blade.php
@@ -1,4 +1,4 @@
-@extends('base')
+@extends('layouts.base')
@section('body-class', 'tri-layout')
@section('content-components', 'tri-layout')
diff --git a/resources/views/mfa/backup-codes-generate.blade.php b/resources/views/mfa/backup-codes-generate.blade.php
index 279ca68a0..27ab0317c 100644
--- a/resources/views/mfa/backup-codes-generate.blade.php
+++ b/resources/views/mfa/backup-codes-generate.blade.php
@@ -1,4 +1,4 @@
-@extends('simple-layout')
+@extends('layouts.simple')
@section('body')
diff --git a/resources/views/mfa/setup-method-row.blade.php b/resources/views/mfa/parts/setup-method-row.blade.php
similarity index 100%
rename from resources/views/mfa/setup-method-row.blade.php
rename to resources/views/mfa/parts/setup-method-row.blade.php
diff --git a/resources/views/mfa/verify/backup_codes.blade.php b/resources/views/mfa/parts/verify-backup_codes.blade.php
similarity index 100%
rename from resources/views/mfa/verify/backup_codes.blade.php
rename to resources/views/mfa/parts/verify-backup_codes.blade.php
diff --git a/resources/views/mfa/verify/totp.blade.php b/resources/views/mfa/parts/verify-totp.blade.php
similarity index 100%
rename from resources/views/mfa/verify/totp.blade.php
rename to resources/views/mfa/parts/verify-totp.blade.php
diff --git a/resources/views/mfa/setup.blade.php b/resources/views/mfa/setup.blade.php
index f3f290d4b..702f007b7 100644
--- a/resources/views/mfa/setup.blade.php
+++ b/resources/views/mfa/setup.blade.php
@@ -1,4 +1,4 @@
-@extends('simple-layout')
+@extends('layouts.simple')
@section('body')
<div class="container small py-xl">
@@ -9,7 +9,7 @@
<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>
diff --git a/resources/views/mfa/totp-generate.blade.php b/resources/views/mfa/totp-generate.blade.php
index 8c470516f..f9a7c46ac 100644
--- a/resources/views/mfa/totp-generate.blade.php
+++ b/resources/views/mfa/totp-generate.blade.php
@@ -1,4 +1,4 @@
-@extends('simple-layout')
+@extends('layouts.simple')
@section('body')
diff --git a/resources/views/mfa/verify.blade.php b/resources/views/mfa/verify.blade.php
index 3a1905e97..3cadeac00 100644
--- a/resources/views/mfa/verify.blade.php
+++ b/resources/views/mfa/verify.blade.php
@@ -1,4 +1,4 @@
-@extends('simple-layout')
+@extends('layouts.simple')
@section('body')
<div class="container very-small py-xl">
@@ -18,7 +18,7 @@
@if($method)
<hr class="my-l">
- @include('mfa.verify.' . $method)
+ @include('mfa.parts.verify-' . $method)
@endif
@if(count($otherMethods) > 0)
diff --git a/resources/views/common/robots.blade.php b/resources/views/misc/robots.blade.php
similarity index 100%
rename from resources/views/common/robots.blade.php
rename to resources/views/misc/robots.blade.php
diff --git a/resources/views/pages/copy.blade.php b/resources/views/pages/copy.blade.php
index 0f2af0476..2f24d8165 100644
--- a/resources/views/pages/copy.blade.php
+++ b/resources/views/pages/copy.blade.php
@@ -1,11 +1,11 @@
-@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,
@@ -33,7 +33,7 @@
<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>
diff --git a/resources/views/pages/delete.blade.php b/resources/views/pages/delete.blade.php
index 2ec046fa0..39cd07bbb 100644
--- a/resources/views/pages/delete.blade.php
+++ b/resources/views/pages/delete.blade.php
@@ -1,11 +1,11 @@
-@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,
diff --git a/resources/views/pages/edit.blade.php b/resources/views/pages/edit.blade.php
index 2120bddb2..db518b0d4 100644
--- a/resources/views/pages/edit.blade.php
+++ b/resources/views/pages/edit.blade.php
@@ -1,4 +1,4 @@
-@extends('base')
+@extends('layouts.base')
@section('head')
<script src="{{ url('/libs/tinymce/tinymce.min.js?ver=4.9.4') }}"></script>
@@ -15,12 +15,12 @@
@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
diff --git a/resources/views/pages/export.blade.php b/resources/views/pages/export.blade.php
index 74d17c128..d2f448d6e 100644
--- a/resources/views/pages/export.blade.php
+++ b/resources/views/pages/export.blade.php
@@ -1,13 +1,13 @@
-@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
diff --git a/resources/views/pages/guest-create.blade.php b/resources/views/pages/guest-create.blade.php
index 55db85144..d6e1cae44 100644
--- a/resources/views/pages/guest-create.blade.php
+++ b/resources/views/pages/guest-create.blade.php
@@ -1,11 +1,11 @@
-@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') => [
diff --git a/resources/views/pages/move.blade.php b/resources/views/pages/move.blade.php
index 26b872cdd..6df36496a 100644
--- a/resources/views/pages/move.blade.php
+++ b/resources/views/pages/move.blade.php
@@ -1,11 +1,11 @@
-@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,
@@ -23,7 +23,7 @@
{!! 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>
diff --git a/resources/views/components/code-editor.blade.php b/resources/views/pages/parts/code-editor.blade.php
similarity index 100%
rename from resources/views/components/code-editor.blade.php
rename to resources/views/pages/parts/code-editor.blade.php
diff --git a/resources/views/pages/editor-toolbox.blade.php b/resources/views/pages/parts/editor-toolbox.blade.php
similarity index 86%
rename from resources/views/pages/editor-toolbox.blade.php
rename to resources/views/pages/parts/editor-toolbox.blade.php
index 87a9cc2de..f3b54ddcd 100644
--- a/resources/views/pages/editor-toolbox.blade.php
+++ b/resources/views/pages/parts/editor-toolbox.blade.php
@@ -12,7 +12,7 @@
<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>
@@ -24,7 +24,7 @@
<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>
diff --git a/resources/views/pages/form.blade.php b/resources/views/pages/parts/form.blade.php
similarity index 97%
rename from resources/views/pages/form.blade.php
rename to resources/views/pages/parts/form.blade.php
index 7e8b2fdd6..f6f0143da 100644
--- a/resources/views/pages/form.blade.php
+++ b/resources/views/pages/parts/form.blade.php
@@ -78,12 +78,12 @@
{{--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>
diff --git a/resources/views/components/image-manager-form.blade.php b/resources/views/pages/parts/image-manager-form.blade.php
similarity index 100%
rename from resources/views/components/image-manager-form.blade.php
rename to resources/views/pages/parts/image-manager-form.blade.php
diff --git a/resources/views/components/image-manager-list.blade.php b/resources/views/pages/parts/image-manager-list.blade.php
similarity index 100%
rename from resources/views/components/image-manager-list.blade.php
rename to resources/views/pages/parts/image-manager-list.blade.php
diff --git a/resources/views/components/image-manager.blade.php b/resources/views/pages/parts/image-manager.blade.php
similarity index 98%
rename from resources/views/components/image-manager.blade.php
rename to resources/views/pages/parts/image-manager.blade.php
index 4f03eeaec..c15c31b86 100644
--- a/resources/views/components/image-manager.blade.php
+++ b/resources/views/pages/parts/image-manager.blade.php
@@ -45,7 +45,7 @@
<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]))
diff --git a/resources/views/pages/list-item.blade.php b/resources/views/pages/parts/list-item.blade.php
similarity index 60%
rename from resources/views/pages/list-item.blade.php
rename to resources/views/pages/parts/list-item.blade.php
index 1e26cf1d5..5707a9c66 100644
--- a/resources/views/pages/list-item.blade.php
+++ b/resources/views/pages/parts/list-item.blade.php
@@ -1,4 +1,4 @@
-@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>
diff --git a/resources/views/pages/markdown-editor.blade.php b/resources/views/pages/parts/markdown-editor.blade.php
similarity index 100%
rename from resources/views/pages/markdown-editor.blade.php
rename to resources/views/pages/parts/markdown-editor.blade.php
diff --git a/resources/views/pages/page-display.blade.php b/resources/views/pages/parts/page-display.blade.php
similarity index 100%
rename from resources/views/pages/page-display.blade.php
rename to resources/views/pages/parts/page-display.blade.php
diff --git a/resources/views/pages/pointer.blade.php b/resources/views/pages/parts/pointer.blade.php
similarity index 100%
rename from resources/views/pages/pointer.blade.php
rename to resources/views/pages/parts/pointer.blade.php
diff --git a/resources/views/pages/template-manager-list.blade.php b/resources/views/pages/parts/template-manager-list.blade.php
similarity index 100%
rename from resources/views/pages/template-manager-list.blade.php
rename to resources/views/pages/parts/template-manager-list.blade.php
diff --git a/resources/views/pages/template-manager.blade.php b/resources/views/pages/parts/template-manager.blade.php
similarity index 86%
rename from resources/views/pages/template-manager.blade.php
rename to resources/views/pages/parts/template-manager.blade.php
index fbdb70a1b..66d53ae7e 100644
--- a/resources/views/pages/template-manager.blade.php
+++ b/resources/views/pages/parts/template-manager.blade.php
@@ -3,7 +3,7 @@
<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')
@@ -20,6 +20,6 @@
@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
diff --git a/resources/views/pages/wysiwyg-editor.blade.php b/resources/views/pages/parts/wysiwyg-editor.blade.php
similarity index 100%
rename from resources/views/pages/wysiwyg-editor.blade.php
rename to resources/views/pages/parts/wysiwyg-editor.blade.php
diff --git a/resources/views/pages/permissions.blade.php b/resources/views/pages/permissions.blade.php
index de28137db..792015e28 100644
--- a/resources/views/pages/permissions.blade.php
+++ b/resources/views/pages/permissions.blade.php
@@ -1,11 +1,11 @@
-@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,
diff --git a/resources/views/pages/revision.blade.php b/resources/views/pages/revision.blade.php
index 0557b6b1c..b3208c211 100644
--- a/resources/views/pages/revision.blade.php
+++ b/resources/views/pages/revision.blade.php
@@ -1,10 +1,10 @@
-@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
@@ -12,7 +12,7 @@
@section('body')
<div class="mb-m print-hidden">
- @include('partials.breadcrumbs', ['crumbs' => [
+ @include('entities.breadcrumbs', ['crumbs' => [
$page->$book,
$page->chapter,
$page,
@@ -27,7 +27,7 @@
<main class="card content-wrap">
<div class="page-content page-revision">
- @include('pages.page-display')
+ @include('pages.parts.page-display')
</div>
</main>
diff --git a/resources/views/pages/revisions.blade.php b/resources/views/pages/revisions.blade.php
index 6624620c5..5508f362d 100644
--- a/resources/views/pages/revisions.blade.php
+++ b/resources/views/pages/revisions.blade.php
@@ -1,10 +1,10 @@
-@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,
diff --git a/resources/views/pages/show.blade.php b/resources/views/pages/show.blade.php
index 012454e7c..ca31ee06a 100644
--- a/resources/views/pages/show.blade.php
+++ b/resources/views/pages/show.blade.php
@@ -1,4 +1,4 @@
-@extends('tri-layout')
+@extends('layouts.tri')
@push('social-meta')
<meta property="og:description" content="{{ Str::limit($page->text, 100, '...') }}">
@@ -7,7 +7,7 @@
@section('body')
<div class="mb-m print-hidden">
- @include('partials.breadcrumbs', ['crumbs' => [
+ @include('entities.breadcrumbs', ['crumbs' => [
$page->book,
$page->hasChapter() ? $page->chapter : null,
$page,
@@ -16,12 +16,12 @@
<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))
@@ -41,7 +41,7 @@
@if($page->tags->count() > 0)
<section>
- @include('components.tag-list', ['entity' => $page])
+ @include('entities.tag-list', ['entity' => $page])
</section>
@endif
@@ -70,14 +70,14 @@
</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">
@@ -163,9 +163,9 @@
<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>
diff --git a/resources/views/pages/sidebar-tree-list.blade.php b/resources/views/pages/sidebar-tree-list.blade.php
deleted file mode 100644
index e69de29bb..000000000
diff --git a/resources/views/readme.md b/resources/views/readme.md
new file mode 100644
index 000000000..4646db2d8
--- /dev/null
+++ b/resources/views/readme.md
@@ -0,0 +1,43 @@
+# 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
diff --git a/resources/views/search/all.blade.php b/resources/views/search/all.blade.php
index 49a6c1f65..b9adccca7 100644
--- a/resources/views/search/all.blade.php
+++ b/resources/views/search/all.blade.php
@@ -1,4 +1,4 @@
-@extends('simple-layout')
+@extends('layouts.simple')
@section('body')
<div class="container mt-xl" id="search-system">
@@ -19,47 +19,47 @@
$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>
@@ -77,7 +77,7 @@
<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)
diff --git a/resources/views/search/form/boolean-filter.blade.php b/resources/views/search/parts/boolean-filter.blade.php
similarity index 100%
rename from resources/views/search/form/boolean-filter.blade.php
rename to resources/views/search/parts/boolean-filter.blade.php
diff --git a/resources/views/search/form/date-filter.blade.php b/resources/views/search/parts/date-filter.blade.php
similarity index 100%
rename from resources/views/search/form/date-filter.blade.php
rename to resources/views/search/parts/date-filter.blade.php
diff --git a/resources/views/search/entity-ajax-list.blade.php b/resources/views/search/parts/entity-ajax-list.blade.php
similarity index 77%
rename from resources/views/search/entity-ajax-list.blade.php
rename to resources/views/search/parts/entity-ajax-list.blade.php
index 36a28b93e..a4eedf75e 100644
--- a/resources/views/search/entity-ajax-list.blade.php
+++ b/resources/views/search/parts/entity-ajax-list.blade.php
@@ -2,7 +2,7 @@
@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
diff --git a/resources/views/search/form/term-list.blade.php b/resources/views/search/parts/term-list.blade.php
similarity index 100%
rename from resources/views/search/form/term-list.blade.php
rename to resources/views/search/parts/term-list.blade.php
diff --git a/resources/views/search/form/type-filter.blade.php b/resources/views/search/parts/type-filter.blade.php
similarity index 100%
rename from resources/views/search/form/type-filter.blade.php
rename to resources/views/search/parts/type-filter.blade.php
diff --git a/resources/views/settings/audit.blade.php b/resources/views/settings/audit.blade.php
index 27bf87064..7a66cc3f3 100644
--- a/resources/views/settings/audit.blade.php
+++ b/resources/views/settings/audit.blade.php
@@ -1,11 +1,11 @@
-@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>
@@ -45,7 +45,7 @@
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>
@@ -68,7 +68,7 @@
@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%">
diff --git a/resources/views/settings/index.blade.php b/resources/views/settings/index.blade.php
index ad03b6c91..c87d84c5e 100644
--- a/resources/views/settings/index.blade.php
+++ b/resources/views/settings/index.blade.php
@@ -1,9 +1,9 @@
-@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>
@@ -25,7 +25,7 @@
@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'),
@@ -39,7 +39,7 @@
<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'),
@@ -53,7 +53,7 @@
<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'),
@@ -85,7 +85,7 @@
</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'),
@@ -112,7 +112,7 @@
<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'),
@@ -149,13 +149,13 @@
</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>
@@ -174,7 +174,7 @@
</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>
@@ -182,7 +182,7 @@
<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>
@@ -215,7 +215,7 @@
<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')
@@ -255,7 +255,7 @@
<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')
@@ -273,5 +273,5 @@
</div>
- @include('components.entity-selector-popup', ['entityTypes' => 'page'])
+ @include('entities.selector-popup', ['entityTypes' => 'page'])
@stop
diff --git a/resources/views/settings/maintenance.blade.php b/resources/views/settings/maintenance.blade.php
index 941a258d8..ea94413f2 100644
--- a/resources/views/settings/maintenance.blade.php
+++ b/resources/views/settings/maintenance.blade.php
@@ -1,9 +1,9 @@
-@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>
diff --git a/resources/views/settings/footer-links.blade.php b/resources/views/settings/parts/footer-links.blade.php
similarity index 100%
rename from resources/views/settings/footer-links.blade.php
rename to resources/views/settings/parts/footer-links.blade.php
diff --git a/resources/views/settings/navbar-with-version.blade.php b/resources/views/settings/parts/navbar-with-version.blade.php
similarity index 86%
rename from resources/views/settings/navbar-with-version.blade.php
rename to resources/views/settings/parts/navbar-with-version.blade.php
index c02c370fe..09af699a3 100644
--- a/resources/views/settings/navbar-with-version.blade.php
+++ b/resources/views/settings/parts/navbar-with-version.blade.php
@@ -4,7 +4,7 @@ $version - Version of bookstack to display
--}}
<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">
diff --git a/resources/views/settings/navbar.blade.php b/resources/views/settings/parts/navbar.blade.php
similarity index 100%
rename from resources/views/settings/navbar.blade.php
rename to resources/views/settings/parts/navbar.blade.php
diff --git a/resources/views/components/page-picker.blade.php b/resources/views/settings/parts/page-picker.blade.php
similarity index 100%
rename from resources/views/components/page-picker.blade.php
rename to resources/views/settings/parts/page-picker.blade.php
diff --git a/resources/views/components/setting-entity-color-picker.blade.php b/resources/views/settings/parts/setting-entity-color-picker.blade.php
similarity index 100%
rename from resources/views/components/setting-entity-color-picker.blade.php
rename to resources/views/settings/parts/setting-entity-color-picker.blade.php
diff --git a/resources/views/partials/table-user.blade.php b/resources/views/settings/parts/table-user.blade.php
similarity index 100%
rename from resources/views/partials/table-user.blade.php
rename to resources/views/settings/parts/table-user.blade.php
diff --git a/resources/views/settings/recycle-bin/deletable-entity-list.blade.php b/resources/views/settings/recycle-bin/deletable-entity-list.blade.php
deleted file mode 100644
index 07ad94f8e..000000000
--- a/resources/views/settings/recycle-bin/deletable-entity-list.blade.php
+++ /dev/null
@@ -1,11 +0,0 @@
-@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
diff --git a/resources/views/settings/recycle-bin/destroy.blade.php b/resources/views/settings/recycle-bin/destroy.blade.php
index bd5ef79f0..ab6034984 100644
--- a/resources/views/settings/recycle-bin/destroy.blade.php
+++ b/resources/views/settings/recycle-bin/destroy.blade.php
@@ -1,10 +1,10 @@
-@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">
@@ -20,7 +20,7 @@
@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>
diff --git a/resources/views/settings/recycle-bin/index.blade.php b/resources/views/settings/recycle-bin/index.blade.php
index cf9808d95..b31bf02e5 100644
--- a/resources/views/settings/recycle-bin/index.blade.php
+++ b/resources/views/settings/recycle-bin/index.blade.php
@@ -1,10 +1,10 @@
-@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">
@@ -89,7 +89,7 @@
</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">
diff --git a/resources/views/settings/recycle-bin/parts/deletable-entity-list.blade.php b/resources/views/settings/recycle-bin/parts/deletable-entity-list.blade.php
new file mode 100644
index 000000000..c2d8a4266
--- /dev/null
+++ b/resources/views/settings/recycle-bin/parts/deletable-entity-list.blade.php
@@ -0,0 +1,11 @@
+@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
diff --git a/resources/views/partials/entity-display-item.blade.php b/resources/views/settings/recycle-bin/parts/entity-display-item.blade.php
similarity index 100%
rename from resources/views/partials/entity-display-item.blade.php
rename to resources/views/settings/recycle-bin/parts/entity-display-item.blade.php
diff --git a/resources/views/settings/recycle-bin/restore.blade.php b/resources/views/settings/recycle-bin/restore.blade.php
index 8decd13f6..5268bf067 100644
--- a/resources/views/settings/recycle-bin/restore.blade.php
+++ b/resources/views/settings/recycle-bin/restore.blade.php
@@ -1,10 +1,10 @@
-@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">
@@ -30,7 +30,7 @@
@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>
diff --git a/resources/views/settings/roles/create.blade.php b/resources/views/settings/roles/create.blade.php
index df902133f..f2edfa1c5 100644
--- a/resources/views/settings/roles/create.blade.php
+++ b/resources/views/settings/roles/create.blade.php
@@ -1,15 +1,15 @@
-@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>
diff --git a/resources/views/settings/roles/delete.blade.php b/resources/views/settings/roles/delete.blade.php
index fa7c12b0a..52362461d 100644
--- a/resources/views/settings/roles/delete.blade.php
+++ b/resources/views/settings/roles/delete.blade.php
@@ -1,10 +1,10 @@
-@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">
diff --git a/resources/views/settings/roles/edit.blade.php b/resources/views/settings/roles/edit.blade.php
index 0f83bdb0b..e2018d3e9 100644
--- a/resources/views/settings/roles/edit.blade.php
+++ b/resources/views/settings/roles/edit.blade.php
@@ -1,15 +1,15 @@
-@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>
diff --git a/resources/views/settings/roles/index.blade.php b/resources/views/settings/roles/index.blade.php
index 898a96eef..6c2996787 100644
--- a/resources/views/settings/roles/index.blade.php
+++ b/resources/views/settings/roles/index.blade.php
@@ -1,11 +1,11 @@
-@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">
diff --git a/resources/views/settings/roles/checkbox.blade.php b/resources/views/settings/roles/parts/checkbox.blade.php
similarity index 85%
rename from resources/views/settings/roles/checkbox.blade.php
rename to resources/views/settings/roles/parts/checkbox.blade.php
index 98201da8f..44cdd22bd 100644
--- a/resources/views/settings/roles/checkbox.blade.php
+++ b/resources/views/settings/roles/parts/checkbox.blade.php
@@ -1,5 +1,5 @@
-@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))),
diff --git a/resources/views/settings/roles/form.blade.php b/resources/views/settings/roles/parts/form.blade.php
similarity index 53%
rename from resources/views/settings/roles/form.blade.php
rename to resources/views/settings/roles/parts/form.blade.php
index d1a61f0cd..2c1ed7fed 100644
--- a/resources/views/settings/roles/form.blade.php
+++ b/resources/views/settings/roles/parts/form.blade.php
@@ -37,15 +37,15 @@
<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>
@@ -75,22 +75,22 @@
<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>
@@ -99,22 +99,22 @@
<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>
@@ -123,24 +123,24 @@
<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>
@@ -149,24 +149,24 @@
<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>
@@ -174,17 +174,17 @@
<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>
@@ -192,17 +192,17 @@
<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>
@@ -210,17 +210,17 @@
<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>
diff --git a/resources/views/shelves/_breadcrumbs.blade.php b/resources/views/shelves/_breadcrumbs.blade.php
deleted file mode 100644
index 91b4252ef..000000000
--- a/resources/views/shelves/_breadcrumbs.blade.php
+++ /dev/null
@@ -1,3 +0,0 @@
-<div class="breadcrumbs">
- <a href="{{$shelf->getUrl()}}" class="text-bookshelf text-button">@icon('bookshelf'){{ $shelf->getShortName() }}</a>
-</div>
\ No newline at end of file
diff --git a/resources/views/shelves/create.blade.php b/resources/views/shelves/create.blade.php
index bea20eca9..95b459068 100644
--- a/resources/views/shelves/create.blade.php
+++ b/resources/views/shelves/create.blade.php
@@ -1,11 +1,11 @@
-@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',
@@ -20,7 +20,7 @@
<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>
diff --git a/resources/views/shelves/delete.blade.php b/resources/views/shelves/delete.blade.php
index 2a78227bd..42d1f5d84 100644
--- a/resources/views/shelves/delete.blade.php
+++ b/resources/views/shelves/delete.blade.php
@@ -1,11 +1,11 @@
-@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'),
diff --git a/resources/views/shelves/edit.blade.php b/resources/views/shelves/edit.blade.php
index 5ae3638fe..0114678eb 100644
--- a/resources/views/shelves/edit.blade.php
+++ b/resources/views/shelves/edit.blade.php
@@ -1,11 +1,11 @@
-@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'),
@@ -18,7 +18,7 @@
<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>
diff --git a/resources/views/shelves/index.blade.php b/resources/views/shelves/index.blade.php
index 21c33aa9c..5c25356b0 100644
--- a/resources/views/shelves/index.blade.php
+++ b/resources/views/shelves/index.blade.php
@@ -1,7 +1,7 @@
-@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')
@@ -15,7 +15,7 @@
<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>
@@ -25,14 +25,14 @@
@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
@@ -41,7 +41,7 @@
<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
diff --git a/resources/views/shelves/form.blade.php b/resources/views/shelves/parts/form.blade.php
similarity index 95%
rename from resources/views/shelves/form.blade.php
rename to resources/views/shelves/parts/form.blade.php
index c088bad89..f29c28c81 100644
--- a/resources/views/shelves/form.blade.php
+++ b/resources/views/shelves/parts/form.blade.php
@@ -46,7 +46,7 @@
<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',
@@ -60,7 +60,7 @@
<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>
diff --git a/resources/views/shelves/list-item.blade.php b/resources/views/shelves/parts/list-item.blade.php
similarity index 100%
rename from resources/views/shelves/list-item.blade.php
rename to resources/views/shelves/parts/list-item.blade.php
diff --git a/resources/views/shelves/list.blade.php b/resources/views/shelves/parts/list.blade.php
similarity index 83%
rename from resources/views/shelves/list.blade.php
rename to resources/views/shelves/parts/list.blade.php
index 3600a8c79..d78606ac7 100644
--- a/resources/views/shelves/list.blade.php
+++ b/resources/views/shelves/parts/list.blade.php
@@ -4,7 +4,7 @@
<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>
@@ -15,13 +15,13 @@
@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
diff --git a/resources/views/shelves/permissions.blade.php b/resources/views/shelves/permissions.blade.php
index df50be8dd..7e5396488 100644
--- a/resources/views/shelves/permissions.blade.php
+++ b/resources/views/shelves/permissions.blade.php
@@ -1,11 +1,11 @@
-@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'),
diff --git a/resources/views/shelves/show.blade.php b/resources/views/shelves/show.blade.php
index f5920d475..0d592468d 100644
--- a/resources/views/shelves/show.blade.php
+++ b/resources/views/shelves/show.blade.php
@@ -1,4 +1,4 @@
-@extends('tri-layout')
+@extends('layouts.tri')
@push('social-meta')
<meta property="og:description" content="{{ Str::limit($shelf->description, 100, '...') }}">
@@ -10,7 +10,7 @@
@section('body')
<div class="mb-s">
- @include('partials.breadcrumbs', ['crumbs' => [
+ @include('entities.breadcrumbs', ['crumbs' => [
$shelf,
]])
</div>
@@ -21,7 +21,7 @@
<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'),
@@ -36,13 +36,13 @@
@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
@@ -75,14 +75,14 @@
@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))
@@ -98,7 +98,7 @@
@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
@@ -115,7 +115,7 @@
</a>
@endif
- @include('partials.view-toggle', ['view' => $view, 'type' => 'shelf'])
+ @include('entities.view-toggle', ['view' => $view, 'type' => 'shelf'])
<hr class="primary-background">
@@ -142,7 +142,7 @@
@if(signedInUser())
<hr class="primary-background">
- @include('partials.entity-favourite-action', ['entity' => $shelf])
+ @include('entities.favourite-action', ['entity' => $shelf])
@endif
</div>
diff --git a/resources/views/users/api-tokens/create.blade.php b/resources/views/users/api-tokens/create.blade.php
index 46c3e0b8a..9cf772082 100644
--- a/resources/views/users/api-tokens/create.blade.php
+++ b/resources/views/users/api-tokens/create.blade.php
@@ -1,4 +1,4 @@
-@extends('simple-layout')
+@extends('layouts.simple')
@section('body')
@@ -11,7 +11,7 @@
{!! csrf_field() !!}
<div class="setting-list">
- @include('users.api-tokens.form')
+ @include('users.api-tokens.parts.form')
<div>
<p class="text-warn italic">
diff --git a/resources/views/users/api-tokens/delete.blade.php b/resources/views/users/api-tokens/delete.blade.php
index 8fcfcda95..45f0e2fa0 100644
--- a/resources/views/users/api-tokens/delete.blade.php
+++ b/resources/views/users/api-tokens/delete.blade.php
@@ -1,4 +1,4 @@
-@extends('simple-layout')
+@extends('layouts.simple')
@section('body')
<div class="container small pt-xl">
diff --git a/resources/views/users/api-tokens/edit.blade.php b/resources/views/users/api-tokens/edit.blade.php
index 821a00d93..61c1ac2a6 100644
--- a/resources/views/users/api-tokens/edit.blade.php
+++ b/resources/views/users/api-tokens/edit.blade.php
@@ -1,4 +1,4 @@
-@extends('simple-layout')
+@extends('layouts.simple')
@section('body')
@@ -36,7 +36,7 @@
</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">
diff --git a/resources/views/users/api-tokens/form.blade.php b/resources/views/users/api-tokens/parts/form.blade.php
similarity index 100%
rename from resources/views/users/api-tokens/form.blade.php
rename to resources/views/users/api-tokens/parts/form.blade.php
diff --git a/resources/views/users/api-tokens/list.blade.php b/resources/views/users/api-tokens/parts/list.blade.php
similarity index 100%
rename from resources/views/users/api-tokens/list.blade.php
rename to resources/views/users/api-tokens/parts/list.blade.php
diff --git a/resources/views/users/create.blade.php b/resources/views/users/create.blade.php
index d953b646a..960e38f7c 100644
--- a/resources/views/users/create.blade.php
+++ b/resources/views/users/create.blade.php
@@ -1,11 +1,11 @@
-@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">
@@ -15,7 +15,7 @@
{!! csrf_field() !!}
<div class="setting-list">
- @include('users.form')
+ @include('users.parts.form')
</div>
<div class="form-group text-right">
diff --git a/resources/views/users/delete.blade.php b/resources/views/users/delete.blade.php
index 7b1d38d34..aea4d7954 100644
--- a/resources/views/users/delete.blade.php
+++ b/resources/views/users/delete.blade.php
@@ -1,10 +1,10 @@
-@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">
@@ -20,7 +20,7 @@
<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>
diff --git a/resources/views/users/edit.blade.php b/resources/views/users/edit.blade.php
index d882558a4..997fd1bf0 100644
--- a/resources/views/users/edit.blade.php
+++ b/resources/views/users/edit.blade.php
@@ -1,10 +1,10 @@
-@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">
@@ -14,7 +14,7 @@
<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>
@@ -22,7 +22,7 @@
<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,
@@ -113,7 +113,7 @@
@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>
diff --git a/resources/views/users/index.blade.php b/resources/views/users/index.blade.php
index 9a9221242..6c79169ca 100644
--- a/resources/views/users/index.blade.php
+++ b/resources/views/users/index.blade.php
@@ -1,10 +1,10 @@
-@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">
diff --git a/resources/views/users/form.blade.php b/resources/views/users/parts/form.blade.php
similarity index 98%
rename from resources/views/users/form.blade.php
rename to resources/views/users/parts/form.blade.php
index 763c387d4..7105e2ff1 100644
--- a/resources/views/users/form.blade.php
+++ b/resources/views/users/parts/form.blade.php
@@ -56,7 +56,7 @@
{{ 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')
diff --git a/resources/views/users/profile.blade.php b/resources/views/users/profile.blade.php
index 5a76a222a..b59c80ec6 100644
--- a/resources/views/users/profile.blade.php
+++ b/resources/views/users/profile.blade.php
@@ -1,4 +1,4 @@
-@extends('simple-layout')
+@extends('layouts.simple')
@section('body')
@@ -9,7 +9,7 @@
<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>
@@ -64,7 +64,7 @@
@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
@@ -78,7 +78,7 @@
@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
@@ -92,7 +92,7 @@
@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
@@ -106,7 +106,7 @@
@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
diff --git a/routes/web.php b/routes/web.php
index 853b1ee4c..a823b73c8 100644
--- a/routes/web.php
+++ b/routes/web.php
@@ -1,7 +1,7 @@
<?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 () {
@@ -276,4 +276,4 @@ Route::post('/password/email', 'Auth\ForgotPasswordController@sendResetLinkEmail
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');