]> BookStack Code Mirror - bookstack/blob - resources/views/users/profile.blade.php
Merge branch 'master' into 2019-design
[bookstack] / resources / views / users / profile.blade.php
1 @extends('simple-layout')
2
3 {{--TODO - Include links to search based on this user being the creator for each entity type--}}
4 {{--Linking either the "Created content" items or as "View All" links next to headers--}}
5 {{--TODO - Add shelves?--}}
6
7 @section('body')
8
9     <div class="container pt-xl">
10
11         <div class="grid right-focus reverse-collapse">
12
13             <div>
14                 <div id="recent-user-activity" class="mb-xl">
15                     <h5>{{ trans('entities.recent_activity') }}</h5>
16                     @include('partials/activity-list', ['activity' => $activity])
17                 </div>
18             </div>
19
20             <div>
21                 <div class="card content-wrap auto-height">
22                     <div class="grid left-focus v-center">
23                         <div>
24                             <div class="mr-m float left">
25                                 <img class="avatar square huge" src="{{ $user->getAvatar(120) }}" alt="{{ $user->name }}">
26                             </div>
27                             <div>
28                                 <h4 class="mt-md">{{ $user->name }}</h4>
29                                 <p class="text-muted">
30                                     {{ trans('entities.profile_user_for_x', ['time' => $user->created_at->diffForHumans(null, true)]) }}
31                                 </p>
32                             </div>
33                         </div>
34                         <div id="content-counts">
35                             <div class="text-muted">{{ trans('entities.profile_created_content') }}</div>
36                             <div class="icon-list">
37                                 <a href="#recent-books" class="text-book icon-list-item">
38                                     <span>@icon('book')</span>
39                                     <span>{{ trans_choice('entities.x_books', $assetCounts['books']) }}</span>
40                                 </a>
41                                 <a href="#recent-chapters" class="text-chapter icon-list-item">
42                                     <span>@icon('chapter')</span>
43                                     <span>{{ trans_choice('entities.x_chapters', $assetCounts['chapters']) }}</span>
44                                 </a>
45                                 <a href="#recent-pages" class="text-page icon-list-item">
46                                     <span>@icon('page')</span>
47                                     <span>{{ trans_choice('entities.x_pages', $assetCounts['pages']) }}</span>
48                                 </a>
49                             </div>
50
51                         </div>
52                     </div>
53                 </div>
54
55                 <div class="card content-wrap auto-height book-contents">
56                     <h2 id="recent-pages" class="list-heading">{{ trans('entities.recently_created_pages') }}</h2>
57                     @if (count($recentlyCreated['pages']) > 0)
58                         @include('partials/entity-list', ['entities' => $recentlyCreated['pages']])
59                     @else
60                         <p class="text-muted">{{ trans('entities.profile_not_created_pages', ['userName' => $user->name]) }}</p>
61                     @endif
62                 </div>
63
64                 <div class="card content-wrap auto-height book-contents">
65                     <h2 id="recent-chapters" class="list-heading">{{ trans('entities.recently_created_chapters') }}</h2>
66                     @if (count($recentlyCreated['chapters']) > 0)
67                         @include('partials/entity-list', ['entities' => $recentlyCreated['chapters']])
68                     @else
69                         <p class="text-muted">{{ trans('entities.profile_not_created_chapters', ['userName' => $user->name]) }}</p>
70                     @endif
71                 </div>
72
73                 <div class="card content-wrap auto-height book-contents">
74                     <h2 id="recent-books" class="list-heading">{{ trans('entities.recently_created_books') }}</h2>
75                     @if (count($recentlyCreated['books']) > 0)
76                         @include('partials/entity-list', ['entities' => $recentlyCreated['books']])
77                     @else
78                         <p class="text-muted">{{ trans('entities.profile_not_created_books', ['userName' => $user->name]) }}</p>
79                     @endif
80                 </div>
81             </div>
82
83         </div>
84
85
86     </div>
87
88
89 @stop