mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-08-07 23:03:00 +03:00
Added view count tracking with personalised lists
This commit is contained in:
@@ -5,8 +5,8 @@
|
||||
<div class="faded-small">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-6"></div>
|
||||
<div class="col-md-6 faded">
|
||||
<div class="col-xs-1"></div>
|
||||
<div class="col-xs-11 faded">
|
||||
<div class="action-buttons">
|
||||
@if($currentUser->can('book-create'))
|
||||
<a href="/books/create" class="text-pos text-button"><i class="zmdi zmdi-plus"></i>Add new book</a>
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<div class="col-sm-7">
|
||||
<h1>Books</h1>
|
||||
@if(count($books) > 0)
|
||||
@foreach($books as $book)
|
||||
@@ -33,7 +33,11 @@
|
||||
<a href="/books/create" class="text-pos"><i class="zmdi zmdi-edit"></i>Create one now</a>
|
||||
@endif
|
||||
</div>
|
||||
<div class="col-md-4"></div>
|
||||
<div class="col-sm-4 col-sm-offset-1">
|
||||
<div class="margin-top large"> </div>
|
||||
<h3>Recently Viewed</h3>
|
||||
@include('partials/entity-list', ['entities' => $recents])
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@@ -4,26 +4,18 @@
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-7">
|
||||
<h2>Books</h2>
|
||||
@if(count($books) > 0)
|
||||
@foreach($books as $book)
|
||||
@include('books/list-item', ['book' => $book])
|
||||
<hr>
|
||||
@endforeach
|
||||
@if(count($books) === 10)
|
||||
<a href="/books">View all books »</a>
|
||||
@endif
|
||||
@else
|
||||
<p class="text-muted">No books have been created.</p>
|
||||
<a href="/books/create" class="text-pos"><i class="zmdi zmdi-edit"></i>Create one now</a>
|
||||
@endif
|
||||
<h2>My Recently Viewed</h2>
|
||||
@include('partials/entity-list', ['entities' => $recents])
|
||||
</div>
|
||||
|
||||
<div class="col-md-4 col-md-offset-1">
|
||||
<div class="margin-top large"> </div>
|
||||
<h3>Recent Activity</h3>
|
||||
@include('partials/activity-list', ['activity' => $activity])
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
17
resources/views/partials/entity-list.blade.php
Normal file
17
resources/views/partials/entity-list.blade.php
Normal file
@@ -0,0 +1,17 @@
|
||||
|
||||
@if(count($entities) > 0)
|
||||
@foreach($entities as $entity)
|
||||
@if($entity->isA('page'))
|
||||
@include('pages/list-item', ['page' => $entity])
|
||||
@elseif($entity->isA('book'))
|
||||
@include('books/list-item', ['book' => $entity])
|
||||
@elseif($entity->isA('chapter'))
|
||||
@include('chapters/list-item', ['chapter' => $entity, 'hidePages' => true])
|
||||
@endif
|
||||
<hr>
|
||||
@endforeach
|
||||
@else
|
||||
<p class="text-muted">
|
||||
No items available :(
|
||||
</p>
|
||||
@endif
|
Reference in New Issue
Block a user