1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-10-17 21:31:24 +03:00

Added favourites page with link from header and home

This commit is contained in:
Dan Brown
2021-05-23 13:34:08 +01:00
parent 27942f5ce8
commit 1e0aa7ee2c
11 changed files with 59 additions and 14 deletions

View File

@@ -28,6 +28,7 @@ return [
'my_recent_drafts' => 'My Recent Drafts',
'my_recently_viewed' => 'My Recently Viewed',
'my_most_viewed_favourites' => 'My Most Viewed Favourites',
'my_favourites' => 'My Favourites',
'no_pages_viewed' => 'You have not viewed any pages',
'no_pages_recently_created' => 'No pages have been recently created',
'no_pages_recently_updated' => 'No pages have been recently updated',

View File

@@ -6,11 +6,11 @@
<h1 class="list-heading">{{ $title }}</h1>
<div class="book-contents">
@include('partials.entity-list', ['entities' => $pages, 'style' => 'detailed'])
@include('partials.entity-list', ['entities' => $entities, 'style' => 'detailed'])
</div>
<div class="text-center">
{!! $pages->links() !!}
{!! $entities->links() !!}
</div>
</main>
</div>

View File

@@ -0,0 +1,19 @@
@extends('simple-layout')
@section('body')
<div class="container small pt-xl">
<main class="card content-wrap">
<h1 class="list-heading">{{ $title }}</h1>
<div class="book-contents">
@include('partials.entity-list', ['entities' => $entities, 'style' => 'detailed'])
</div>
<div class="text-right">
@if($hasMoreLink)
<a href="{{ $hasMoreLink }}" class="button outline">{{ trans('common.more') }}</a>
@endif
</div>
</main>
</div>
@stop

View File

@@ -61,6 +61,9 @@
<span class="name">{{ $currentUser->getShortName(9) }}</span> @icon('caret-down')
</span>
<ul refs="dropdown@menu" class="dropdown-menu" role="menu">
<li>
<a href="{{ url('/favourites') }}">@icon('star'){{ trans('entities.my_favourites') }}</a>
</li>
<li>
<a href="{{ $currentUser->getProfileUrl() }}">@icon('user'){{ trans('common.view_profile') }}</a>
</li>

View File

@@ -7,7 +7,9 @@
@if(count($favourites) > 0)
<div id="top-favourites" class="card mb-xl">
<h3 class="card-title">{{ trans('entities.my_most_viewed_favourites') }}</h3>
<h3 class="card-title">
<a href="{{ url('/favourites') }}" class="no-color">{{ trans('entities.my_most_viewed_favourites') }}</a>
</h3>
<div class="px-m">
@include('partials.entity-list', [
'entities' => $favourites,

View File

@@ -44,7 +44,9 @@
<div>
@if(count($favourites) > 0)
<div id="top-favourites" class="card mb-xl">
<h3 class="card-title">{{ trans('entities.my_most_viewed_favourites') }}</h3>
<h3 class="card-title">
<a href="{{ url('/favourites') }}" class="no-color">{{ trans('entities.my_most_viewed_favourites') }}</a>
</h3>
<div class="px-m">
@include('partials.entity-list', [
'entities' => $favourites,