NOW MANAGED ON CODEBERG
Made list default messages a little nicer
Dan Brownc25ef1890003
diff --git a/resources/assets/js/global.js b/resources/assets/js/global.jsindex 57d62728b..44562abd0 100644--- a/resources/assets/js/global.js+++ b/resources/assets/js/global.js@@ -112,7 +112,7 @@ $(function () {// Common jQuery actions$('[data-action="expand-entity-list-details"]').click(function() {- $('.entity-list.compact').find('p').slideToggle(240);+ $('.entity-list.compact').find('p').not('.empty-text').slideToggle(240);});diff --git a/resources/assets/sass/_lists.scss b/resources/assets/sass/_lists.scssindex e97cc647a..08f00677e 100644--- a/resources/assets/sass/_lists.scss+++ b/resources/assets/sass/_lists.scss@@ -338,6 +338,10 @@ ul.pagination {padding-top: $-xs;margin: 0;}+ > p.empty-text {+ display: block;+ font-size: $fs-m;+ }hr {margin: 0;}diff --git a/resources/views/home.blade.php b/resources/views/home.blade.phpindex e0aa08568..88319738e 100644--- a/resources/views/home.blade.php+++ b/resources/views/home.blade.php@@ -34,18 +34,30 @@@else<h3>Recent Books</h3>@endif- @include('partials/entity-list', ['entities' => $recents, 'style' => 'compact'])+ @include('partials/entity-list', [+ 'entities' => $recents,+ 'style' => 'compact',+ 'emptyText' => $signedIn ? 'You have not viewed any pages' : 'No books have been created'+ ])</div><div class="col-sm-4"><h3><a class="no-color" href="/pages/recently-created">Recently Created Pages</a></h3><div id="recently-created-pages">- @include('partials/entity-list', ['entities' => $recentlyCreatedPages, 'style' => 'compact'])+ @include('partials/entity-list', [+ 'entities' => $recentlyCreatedPages,+ 'style' => 'compact',+ 'emptyText' => 'No pages have been recently created'+ ])</div><h3><a class="no-color" href="/pages/recently-updated">Recently Updated Pages</a></h3><div id="recently-updated-pages">- @include('partials/entity-list', ['entities' => $recentlyUpdatedPages, 'style' => 'compact'])+ @include('partials/entity-list', [+ 'entities' => $recentlyUpdatedPages,+ 'style' => 'compact',+ 'emptyText' => 'No pages have been recently updated'+ ])</div></div>diff --git a/resources/views/partials/activity-list.blade.php b/resources/views/partials/activity-list.blade.phpindex 7198e7cbb..de72f5051 100644--- a/resources/views/partials/activity-list.blade.php+++ b/resources/views/partials/activity-list.blade.php@@ -1,6 +1,4 @@-{{--Requires an entity to be passed with the name $entity--}}-@if(count($activity) > 0)<div class="activity-list">@foreach($activity as $activityItem)@@ -10,5 +8,5 @@@endforeach</div>@else- <p class="text-muted">New activity will show up here.</p>+ <p class="text-muted">No activity to show</p>@endif\ No newline at end of filediff --git a/resources/views/partials/entity-list.blade.php b/resources/views/partials/entity-list.blade.phpindex a52e5f013..412d3be8f 100644--- a/resources/views/partials/entity-list.blade.php+++ b/resources/views/partials/entity-list.blade.php@@ -16,8 +16,8 @@@endforeach@else- <p class="text-muted">- No items available+ <p class="text-muted empty-text">+ {{ $emptyText or 'No items available' }}</p>@endif</div>\ No newline at end of file