mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-12-11 20:54:38 +08:00
d0ff79ea60
- Removed old view system and started use of new query classes instead. - Finished off RelationMultiModelQuery but found it was less efficient than x-many queries due to the amount of tables being scanned. Adding now for history but will delete as not used. - Updated recently viewed to use same query system as popular items rather than running and joining x-entities queries. - Added "Most Viewed Faviourites" listing to homepages.
82 lines
3.3 KiB
PHP
82 lines
3.3 KiB
PHP
@extends('simple-layout')
|
|
|
|
@section('body')
|
|
|
|
<div class="container px-xl py-s">
|
|
<div class="grid half">
|
|
<div>
|
|
<div class="icon-list inline block">
|
|
@include('components.expand-toggle', ['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'])
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="container" id="home-default">
|
|
<div class="grid third gap-xxl no-row-gap" >
|
|
<div>
|
|
@if(count($draftPages) > 0)
|
|
<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'])
|
|
</div>
|
|
</div>
|
|
@endif
|
|
|
|
<div id="{{ auth()->check() ? 'recently-viewed' : 'recent-books' }}" class="card mb-xl">
|
|
<h3 class="card-title">{{ trans('entities.' . (auth()->check() ? 'my_recently_viewed' : 'books_recent')) }}</h3>
|
|
<div class="px-m">
|
|
@include('partials.entity-list', [
|
|
'entities' => $recents,
|
|
'style' => 'compact',
|
|
'emptyText' => auth()->check() ? trans('entities.no_pages_viewed') : trans('entities.books_empty')
|
|
])
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div>
|
|
@if(count($favourites) > 0)
|
|
<div id="top-favourites" class="card mb-xl">
|
|
<h3 class="card-title">{{ trans('entities.my_most_viewed_favourites') }}</h3>
|
|
<div class="px-m">
|
|
@include('partials.entity-list', [
|
|
'entities' => $favourites,
|
|
'style' => 'compact',
|
|
])
|
|
</div>
|
|
</div>
|
|
@endif
|
|
|
|
<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', [
|
|
'entities' => $recentlyUpdatedPages,
|
|
'style' => 'compact',
|
|
'emptyText' => trans('entities.no_pages_recently_updated')
|
|
])
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div>
|
|
<div id="recent-activity">
|
|
<div class="card mb-xl">
|
|
<h3 class="card-title">{{ trans('entities.recent_activity') }}</h3>
|
|
@include('partials.activity-list', ['activity' => $activity])
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
@stop
|