]> BookStack Code Mirror - bookstack/blobdiff - resources/views/users/profile.blade.php
TypeScript: Updated compile target, addressed issues
[bookstack] / resources / views / users / profile.blade.php
index 20b16894e49e5459c0d0a9c36de154dcc20e0acc..a8be8a4c19825a52835d7d2bce6f78472b5ae24a 100644 (file)
-@extends('base')
+@extends('layouts.simple')
 
-@section('content')
+@section('body')
 
-    <div class="container" ng-non-bindable>
-        <div class="row">
-            <div class="col-sm-7">
+    <div class="container medium pt-xl">
 
-                <div class="padded-top large"></div>
+        <div class="grid right-focus reverse-collapse">
 
-                <div class="row">
-                    <div class="col-md-7">
-                        <div class="clearfix">
-                            <div class="padded-right float left">
-                                <img class="avatar square huge" src="{{$user->getAvatar(120)}}" alt="{{ $user->name }}">
+            <div>
+                <section id="recent-user-activity" class="mb-xl">
+                    <h5>{{ trans('entities.recent_activity') }}</h5>
+                    @include('common.activity-list', ['activity' => $activity])
+                </section>
+            </div>
+
+            <div>
+                <section class="card content-wrap auto-height">
+                    <div class="grid half v-center">
+                        <div>
+                            <div class="mr-m float left">
+                                <img class="avatar square huge" src="{{ $user->getAvatar(120) }}" alt="{{ $user->name }}">
                             </div>
                             <div>
-                                <h3 style="margin-top: 0;">{{ $user->name }}</h3>
+                                <h4 class="mt-md">{{ $user->name }}</h4>
                                 <p class="text-muted">
-                                    User for {{ $user->created_at->diffForHumans(null, true) }}
+                                    {{ trans('entities.profile_user_for_x', ['time' => $user->created_at->diffForHumans(null, true)]) }}
                                 </p>
                             </div>
                         </div>
-                    </div>
-                    <div class="col-md-5 text-bigger">
-                        <div class="text-muted">Created Content</div>
-                        <div class="text-book">
-                            <i class="zmdi zmdi-book zmdi-hc-fw"></i> {{ $assetCounts['books'] }} {{ str_plural('Book', $assetCounts['books']) }}
-                        </div>
-                        <div class="text-chapter">
-                            <i class="zmdi zmdi-collection-bookmark zmdi-hc-fw"></i> {{ $assetCounts['chapters'] }} {{ str_plural('Chapter', $assetCounts['chapters']) }}
-                        </div>
-                        <div class="text-page">
-                            <i class="zmdi zmdi-file-text zmdi-hc-fw"></i> {{ $assetCounts['pages'] }} {{ str_plural('Page', $assetCounts['pages']) }}
+                        <div id="content-counts">
+                            <div class="text-muted">{{ trans('entities.profile_created_content') }}</div>
+                            <div class="grid half v-center no-row-gap">
+                                <div class="icon-list">
+                                    <a href="#recent-pages" class="text-page icon-list-item">
+                                        <span>@icon('page')</span>
+                                        <span>{{ trans_choice('entities.x_pages', $assetCounts['pages']) }}</span>
+                                    </a>
+                                    <a href="#recent-chapters" class="text-chapter icon-list-item">
+                                        <span>@icon('chapter')</span>
+                                        <span>{{ trans_choice('entities.x_chapters', $assetCounts['chapters']) }}</span>
+                                    </a>
+                                </div>
+                                <div class="icon-list">
+                                    <a href="#recent-books" class="text-book icon-list-item">
+                                        <span>@icon('book')</span>
+                                        <span>{{ trans_choice('entities.x_books', $assetCounts['books']) }}</span>
+                                    </a>
+                                    <a href="#recent-shelves" class="text-bookshelf icon-list-item">
+                                        <span>@icon('bookshelf')</span>
+                                        <span>{{ trans_choice('entities.x_shelves', $assetCounts['shelves']) }}</span>
+                                    </a>
+                                </div>
+                            </div>
+
                         </div>
                     </div>
-                </div>
+                </section>
 
+                <section class="card content-wrap auto-height book-contents">
+                    <h2 id="recent-pages" class="list-heading">
+                        {{ trans('entities.recently_created_pages') }}
+                        @if (count($recentlyCreated['pages']) > 0)
+                            <a href="{{ url('/search?term=' . urlencode('{created_by:'.$user->slug.'} {type:page}') ) }}" class="text-small ml-s">{{ trans('common.view_all') }}</a>
+                        @endif
+                    </h2>
+                    @if (count($recentlyCreated['pages']) > 0)
+                        @include('entities.list', ['entities' => $recentlyCreated['pages'], 'showPath' => true])
+                    @else
+                        <p class="text-muted">{{ trans('entities.profile_not_created_pages', ['userName' => $user->name]) }}</p>
+                    @endif
+                </section>
 
-                <hr class="even">
+                <section class="card content-wrap auto-height book-contents">
+                    <h2 id="recent-chapters" class="list-heading">
+                        {{ trans('entities.recently_created_chapters') }}
+                        @if (count($recentlyCreated['chapters']) > 0)
+                            <a href="{{ url('/search?term=' . urlencode('{created_by:'.$user->slug.'} {type:chapter}') ) }}" class="text-small ml-s">{{ trans('common.view_all') }}</a>
+                        @endif
+                    </h2>
+                    @if (count($recentlyCreated['chapters']) > 0)
+                        @include('entities.list', ['entities' => $recentlyCreated['chapters'], 'showPath' => true])
+                    @else
+                        <p class="text-muted">{{ trans('entities.profile_not_created_chapters', ['userName' => $user->name]) }}</p>
+                    @endif
+                </section>
 
-                <h3>Recently Created Pages</h3>
-                @if (count($recentlyCreated['pages']) > 0)
-                    @include('partials/entity-list', ['entities' => $recentlyCreated['pages']])
-                @else
-                    <p class="text-muted">{{ $user->name }} has not created any pages</p>
-                @endif
+                <section class="card content-wrap auto-height book-contents">
+                    <h2 id="recent-books" class="list-heading">
+                        {{ trans('entities.recently_created_books') }}
+                        @if (count($recentlyCreated['books']) > 0)
+                            <a href="{{ url('/search?term=' . urlencode('{created_by:'.$user->slug.'} {type:book}') ) }}" class="text-small ml-s">{{ trans('common.view_all') }}</a>
+                        @endif
+                    </h2>
+                    @if (count($recentlyCreated['books']) > 0)
+                        @include('entities.list', ['entities' => $recentlyCreated['books'], 'showPath' => true])
+                    @else
+                        <p class="text-muted">{{ trans('entities.profile_not_created_books', ['userName' => $user->name]) }}</p>
+                    @endif
+                </section>
 
-                <hr class="even">
-
-                <h3>Recently Created Chapters</h3>
-                @if (count($recentlyCreated['chapters']) > 0)
-                    @include('partials/entity-list', ['entities' => $recentlyCreated['chapters']])
-                @else
-                    <p class="text-muted">{{ $user->name }} has not created any chapters</p>
-                @endif
-
-                <hr class="even">
-
-                <h3>Recently Created Books</h3>
-                @if (count($recentlyCreated['books']) > 0)
-                    @include('partials/entity-list', ['entities' => $recentlyCreated['books']])
-                @else
-                    <p class="text-muted">{{ $user->name }} has not created any books</p>
-                @endif
-            </div>
-
-            <div class="col-sm-4 col-sm-offset-1">
-                <h3>Recent Activity</h3>
-                @include('partials/activity-list', ['activity' => $activity])
+                <section class="card content-wrap auto-height book-contents">
+                    <h2 id="recent-shelves" class="list-heading">
+                        {{ trans('entities.recently_created_shelves') }}
+                        @if (count($recentlyCreated['shelves']) > 0)
+                            <a href="{{ url('/search?term=' . urlencode('{created_by:'.$user->slug.'} {type:bookshelf}') ) }}" class="text-small ml-s">{{ trans('common.view_all') }}</a>
+                        @endif
+                    </h2>
+                    @if (count($recentlyCreated['shelves']) > 0)
+                        @include('entities.list', ['entities' => $recentlyCreated['shelves'], 'showPath' => true])
+                    @else
+                        <p class="text-muted">{{ trans('entities.profile_not_created_shelves', ['userName' => $user->name]) }}</p>
+                    @endif
+                </section>
             </div>
 
         </div>
-    </div>
 
 
+    </div>
 @stop
\ No newline at end of file