]> BookStack Code Mirror - bookstack/blob - resources/views/users/profile.blade.php
e2689790f185516d5d34408ba21dca05c138f3f0
[bookstack] / resources / views / users / profile.blade.php
1 @extends('simple-layout')
2
3 @section('body')
4
5     <div class="container pt-xl">
6
7         <div class="grid right-focus reverse-collapse">
8
9             <div>
10                 <div id="recent-user-activity" class="mb-xl">
11                     <h5>{{ trans('entities.recent_activity') }}</h5>
12                     @include('partials.activity-list', ['activity' => $activity])
13                 </div>
14             </div>
15
16             <div>
17                 <div class="card content-wrap auto-height">
18                     <div class="grid half v-center">
19                         <div>
20                             <div class="mr-m float left">
21                                 <img class="avatar square huge" src="{{ $user->getAvatar(120) }}" alt="{{ $user->name }}">
22                             </div>
23                             <div>
24                                 <h4 class="mt-md">{{ $user->name }}</h4>
25                                 <p class="text-muted">
26                                     {{ trans('entities.profile_user_for_x', ['time' => $user->created_at->diffForHumans(null, true)]) }}
27                                 </p>
28                             </div>
29                         </div>
30                         <div id="content-counts">
31                             <div class="text-muted">{{ trans('entities.profile_created_content') }}</div>
32                             <div class="grid half v-center no-row-gap">
33                                 <div class="icon-list">
34                                     <a href="#recent-pages" class="text-page icon-list-item">
35                                         <span>@icon('page')</span>
36                                         <span>{{ trans_choice('entities.x_pages', $assetCounts['pages']) }}</span>
37                                     </a>
38                                     <a href="#recent-chapters" class="text-chapter icon-list-item">
39                                         <span>@icon('chapter')</span>
40                                         <span>{{ trans_choice('entities.x_chapters', $assetCounts['chapters']) }}</span>
41                                     </a>
42                                 </div>
43                                 <div class="icon-list">
44                                     <a href="#recent-books" class="text-book icon-list-item">
45                                         <span>@icon('book')</span>
46                                         <span>{{ trans_choice('entities.x_books', $assetCounts['books']) }}</span>
47                                     </a>
48                                     <a href="#recent-shelves" class="text-bookshelf icon-list-item">
49                                         <span>@icon('bookshelf')</span>
50                                         <span>{{ trans_choice('entities.x_shelves', $assetCounts['shelves']) }}</span>
51                                     </a>
52                                 </div>
53                             </div>
54
55                         </div>
56                     </div>
57                 </div>
58
59                 <div class="card content-wrap auto-height book-contents">
60                     <h2 id="recent-pages" class="list-heading">
61                         {{ trans('entities.recently_created_pages') }}
62                         @if (count($recentlyCreated['pages']) > 0)
63                             <a href="{{ baseUrl('/search?term=' . urlencode('{created_by:'.$user->id.'} {type:page}') ) }}" class="text-small ml-s">{{ trans('common.view_all') }}</a>
64                         @endif
65                     </h2>
66                     @if (count($recentlyCreated['pages']) > 0)
67                         @include('partials.entity-list', ['entities' => $recentlyCreated['pages'], 'showPath' => true])
68                     @else
69                         <p class="text-muted">{{ trans('entities.profile_not_created_pages', ['userName' => $user->name]) }}</p>
70                     @endif
71                 </div>
72
73                 <div class="card content-wrap auto-height book-contents">
74                     <h2 id="recent-chapters" class="list-heading">
75                         {{ trans('entities.recently_created_chapters') }}
76                         @if (count($recentlyCreated['chapters']) > 0)
77                             <a href="{{ baseUrl('/search?term=' . urlencode('{created_by:'.$user->id.'} {type:chapter}') ) }}" class="text-small ml-s">{{ trans('common.view_all') }}</a>
78                         @endif
79                     </h2>
80                     @if (count($recentlyCreated['chapters']) > 0)
81                         @include('partials.entity-list', ['entities' => $recentlyCreated['chapters'], 'showPath' => true])
82                     @else
83                         <p class="text-muted">{{ trans('entities.profile_not_created_chapters', ['userName' => $user->name]) }}</p>
84                     @endif
85                 </div>
86
87                 <div class="card content-wrap auto-height book-contents">
88                     <h2 id="recent-books" class="list-heading">
89                         {{ trans('entities.recently_created_books') }}
90                         @if (count($recentlyCreated['books']) > 0)
91                             <a href="{{ baseUrl('/search?term=' . urlencode('{created_by:'.$user->id.'} {type:book}') ) }}" class="text-small ml-s">{{ trans('common.view_all') }}</a>
92                         @endif
93                     </h2>
94                     @if (count($recentlyCreated['books']) > 0)
95                         @include('partials.entity-list', ['entities' => $recentlyCreated['books'], 'showPath' => true])
96                     @else
97                         <p class="text-muted">{{ trans('entities.profile_not_created_books', ['userName' => $user->name]) }}</p>
98                     @endif
99                 </div>
100
101                 <div class="card content-wrap auto-height book-contents">
102                     <h2 id="recent-shelves" class="list-heading">
103                         {{ trans('entities.recently_created_shelves') }}
104                         @if (count($recentlyCreated['shelves']) > 0)
105                             <a href="{{ baseUrl('/search?term=' . urlencode('{created_by:'.$user->id.'} {type:bookshelf}') ) }}" class="text-small ml-s">{{ trans('common.view_all') }}</a>
106                         @endif
107                     </h2>
108                     @if (count($recentlyCreated['shelves']) > 0)
109                         @include('partials.entity-list', ['entities' => $recentlyCreated['shelves'], 'showPath' => true])
110                     @else
111                         <p class="text-muted">{{ trans('entities.profile_not_created_shelves', ['userName' => $user->name]) }}</p>
112                     @endif
113                 </div>
114             </div>
115
116         </div>
117
118
119     </div>
120
121
122 @stop