Skip to content

NOW MANAGED ON CODEBERG

Organised entity action buttons a little more

Dan Browncc24d478aafd
diff --git a/resources/assets/sass/_blocks.scss b/resources/assets/sass/_blocks.scss
index e1a2f9e1f..278917cd5 100644
--- a/resources/assets/sass/_blocks.scss
+++ b/resources/assets/sass/_blocks.scss
@@ -176,7 +176,7 @@
}
.content-wrap.card {
- padding: $-l $-xxl;
+ padding: $-m $-xxl;
margin-left: auto;
margin-right: auto;
margin-bottom: $-xl;
diff --git a/resources/assets/sass/_lists.scss b/resources/assets/sass/_lists.scss
index a8f0113b8..dc4dc8816 100644
--- a/resources/assets/sass/_lists.scss
+++ b/resources/assets/sass/_lists.scss
@@ -363,6 +363,17 @@ ul.pagination {
}
}
+.icon-list hr {
+ margin: $-s $-m;
+ max-width: 140px;
+ opacity: 0.25;
+ height: 1.1px;
+}
+
+.icon-list hr + hr, .icon-list hr:first-child, .icon-list hr:last-child {
+ display: none;
+}
+
.entity-list-item, .icon-list-item {
padding: $-s $-m;
display: flex;
diff --git a/resources/views/books/index.blade.php b/resources/views/books/index.blade.php
index bdfe4a480..38286c201 100644
--- a/resources/views/books/index.blade.php
+++ b/resources/views/books/index.blade.php
@@ -38,13 +38,14 @@
<div class="actions mb-xl">
<h5>{{ trans('common.actions') }}</h5>
<div class="icon-list text-primary">
- @include('partials.view-toggle', ['view' => $view, 'type' => 'book'])
@if($currentUser->can('book-create-all'))
<a href="{{ baseUrl("/create-book") }}" class="icon-list-item">
<span>@icon('add')</span>
<span>{{ trans('entities.books_create') }}</span>
</a>
@endif
+
+ @include('partials.view-toggle', ['view' => $view, 'type' => 'book'])
</div>
</div>
diff --git a/resources/views/books/show.blade.php b/resources/views/books/show.blade.php
index 792d8ecc4..3141f5ab2 100644
--- a/resources/views/books/show.blade.php
+++ b/resources/views/books/show.blade.php
@@ -80,17 +80,6 @@
<div class="actions mb-xl">
<h5>{{ trans('common.actions') }}</h5>
<div class="icon-list text-primary">
- <div dropdown class="dropdown-container">
- <div dropdown-toggle class="icon-list-item">
- <span>@icon('export')</span>
- <span>{{ trans('entities.export') }}</span>
- </div>
- <ul class="wide">
- <li><a href="{{ $book->getUrl('/export/html') }}" target="_blank">{{ trans('entities.export_html') }} <span class="text-muted float right">.html</span></a></li>
- <li><a href="{{ $book->getUrl('/export/pdf') }}" target="_blank">{{ trans('entities.export_pdf') }} <span class="text-muted float right">.pdf</span></a></li>
- <li><a href="{{ $book->getUrl('/export/plaintext') }}" target="_blank">{{ trans('entities.export_text') }} <span class="text-muted float right">.txt</span></a></li>
- </ul>
- </div>
@if(userCan('page-create', $book))
<a href="{{ $book->getUrl('/create-page') }}" class="icon-list-item">
@@ -104,6 +93,9 @@
<span>{{ trans('entities.chapters_new') }}</span>
</a>
@endif
+
+ <hr class="primary-background">
+
@if(userCan('book-update', $book))
<a href="{{ $book->getUrl('/edit') }}" class="icon-list-item">
<span>@icon('edit')</span>
@@ -126,6 +118,20 @@
<span>{{ trans('common.delete') }}</span>
</a>
@endif
+
+ <hr class="primary-background">
+
+ <div dropdown class="dropdown-container">
+ <div dropdown-toggle class="icon-list-item">
+ <span>@icon('export')</span>
+ <span>{{ trans('entities.export') }}</span>
+ </div>
+ <ul class="wide">
+ <li><a href="{{ $book->getUrl('/export/html') }}" target="_blank">{{ trans('entities.export_html') }} <span class="text-muted float right">.html</span></a></li>
+ <li><a href="{{ $book->getUrl('/export/pdf') }}" target="_blank">{{ trans('entities.export_pdf') }} <span class="text-muted float right">.pdf</span></a></li>
+ <li><a href="{{ $book->getUrl('/export/plaintext') }}" target="_blank">{{ trans('entities.export_text') }} <span class="text-muted float right">.txt</span></a></li>
+ </ul>
+ </div>
</div>
</div>
diff --git a/resources/views/chapters/show.blade.php b/resources/views/chapters/show.blade.php
index 8eddd5851..f74c584e5 100644
--- a/resources/views/chapters/show.blade.php
+++ b/resources/views/chapters/show.blade.php
@@ -87,24 +87,15 @@
<h5>{{ trans('common.actions') }}</h5>
<div class="icon-list text-primary">
- <div dropdown class="dropdown-container">
- <div dropdown-toggle class="icon-list-item">
- <span>@icon('export')</span>
- <span>{{ trans('entities.export') }}</span>
- </div>
- <ul class="wide">
- <li><a href="{{ $chapter->getUrl('/export/html') }}" target="_blank">{{ trans('entities.export_html') }} <span class="text-muted float right">.html</span></a></li>
- <li><a href="{{ $chapter->getUrl('/export/pdf') }}" target="_blank">{{ trans('entities.export_pdf') }} <span class="text-muted float right">.pdf</span></a></li>
- <li><a href="{{ $chapter->getUrl('/export/plaintext') }}" target="_blank">{{ trans('entities.export_text') }} <span class="text-muted float right">.txt</span></a></li>
- </ul>
- </div>
-
@if(userCan('page-create', $chapter))
<a href="{{ $chapter->getUrl('/create-page') }}" class="icon-list-item">
<span>@icon('add')</span>
<span>{{ trans('entities.pages_new') }}</span>
</a>
@endif
+
+ <hr class="primary-background"/>
+
@if(userCan('chapter-update', $chapter))
<a href="{{ $chapter->getUrl('/edit') }}" class="icon-list-item">
<span>@icon('edit')</span>
@@ -129,6 +120,20 @@
<span>{{ trans('common.delete') }}</span>
</a>
@endif
+
+ <hr class="primary-background"/>
+
+ <div dropdown class="dropdown-container">
+ <div dropdown-toggle class="icon-list-item">
+ <span>@icon('export')</span>
+ <span>{{ trans('entities.export') }}</span>
+ </div>
+ <ul class="wide">
+ <li><a href="{{ $chapter->getUrl('/export/html') }}" target="_blank">{{ trans('entities.export_html') }} <span class="text-muted float right">.html</span></a></li>
+ <li><a href="{{ $chapter->getUrl('/export/pdf') }}" target="_blank">{{ trans('entities.export_pdf') }} <span class="text-muted float right">.pdf</span></a></li>
+ <li><a href="{{ $chapter->getUrl('/export/plaintext') }}" target="_blank">{{ trans('entities.export_text') }} <span class="text-muted float right">.txt</span></a></li>
+ </ul>
+ </div>
</div>
</div>
@stop
diff --git a/resources/views/pages/show.blade.php b/resources/views/pages/show.blade.php
index 10b001be5..91a90cb00 100644
--- a/resources/views/pages/show.blade.php
+++ b/resources/views/pages/show.blade.php
@@ -124,18 +124,6 @@
<h5>Actions</h5>
<div class="icon-list text-primary">
- {{--Export--}}
- <div dropdown class="dropdown-container block">
- <div dropdown-toggle class="icon-list-item">
- <span>@icon('export')</span>
- <span>{{ trans('entities.export') }}</span>
- </div>
- <ul class="wide">
- <li><a href="{{ $page->getUrl('/export/html') }}" target="_blank">{{ trans('entities.export_html') }} <span class="text-muted float right">.html</span></a></li>
- <li><a href="{{ $page->getUrl('/export/pdf') }}" target="_blank">{{ trans('entities.export_pdf') }} <span class="text-muted float right">.pdf</span></a></li>
- <li><a href="{{ $page->getUrl('/export/plaintext') }}" target="_blank">{{ trans('entities.export_text') }} <span class="text-muted float right">.txt</span></a></li>
- </ul>
- </div>
{{--User Actions--}}
@if(userCan('page-update', $page))
@@ -174,6 +162,21 @@
<span>{{ trans('common.delete') }}</span>
</a>
@endif
+
+ <hr class="primary-background"/>
+
+ {{--Export--}}
+ <div dropdown class="dropdown-container block">
+ <div dropdown-toggle class="icon-list-item">
+ <span>@icon('export')</span>
+ <span>{{ trans('entities.export') }}</span>
+ </div>
+ <ul class="wide">
+ <li><a href="{{ $page->getUrl('/export/html') }}" target="_blank">{{ trans('entities.export_html') }} <span class="text-muted float right">.html</span></a></li>
+ <li><a href="{{ $page->getUrl('/export/pdf') }}" target="_blank">{{ trans('entities.export_pdf') }} <span class="text-muted float right">.pdf</span></a></li>
+ <li><a href="{{ $page->getUrl('/export/plaintext') }}" target="_blank">{{ trans('entities.export_text') }} <span class="text-muted float right">.txt</span></a></li>
+ </ul>
+ </div>
</div>
</div>
diff --git a/resources/views/shelves/index.blade.php b/resources/views/shelves/index.blade.php
index eeb579de6..76f26c694 100644
--- a/resources/views/shelves/index.blade.php
+++ b/resources/views/shelves/index.blade.php
@@ -9,13 +9,13 @@
<div class="actions mb-xl">
<h5>{{ trans('common.actions') }}</h5>
<div class="icon-list text-primary">
- @include('partials.view-toggle', ['view' => $view, 'type' => 'shelf'])
@if($currentUser->can('bookshelf-create-all'))
<a href="{{ baseUrl("/create-shelf") }}" class="icon-list-item">
<span>@icon('add')</span>
<span>{{ trans('entities.shelves_create') }}</span>
</a>
@endif
+ @include('partials.view-toggle', ['view' => $view, 'type' => 'shelf'])
</div>
</div>