2018-08-27 09:18:09 -04:00
|
|
|
@extends('sidebar-layout')
|
|
|
|
|
|
|
|
@section('toolbar')
|
|
|
|
<div class="col-sm-6 col-xs-1 faded">
|
2018-09-16 14:34:09 -04:00
|
|
|
@include('shelves._breadcrumbs', ['shelf' => $shelf])
|
2018-08-27 09:18:09 -04:00
|
|
|
</div>
|
|
|
|
<div class="col-sm-6 col-xs-11">
|
|
|
|
<div class="action-buttons faded">
|
2018-09-16 14:34:09 -04:00
|
|
|
@if(userCan('bookshelf-update', $shelf))
|
|
|
|
<a href="{{ $shelf->getUrl('/edit') }}" class="text-button text-primary">@icon('edit'){{ trans('common.edit') }}</a>
|
2018-08-27 09:18:09 -04:00
|
|
|
@endif
|
2018-09-16 14:34:09 -04:00
|
|
|
@if(userCan('restrictions-manage', $shelf) || userCan('bookshelf-delete', $shelf))
|
2018-08-27 09:18:09 -04:00
|
|
|
<div dropdown class="dropdown-container">
|
|
|
|
<a dropdown-toggle class="text-primary text-button">@icon('more'){{ trans('common.more') }}</a>
|
|
|
|
<ul>
|
2018-09-16 14:34:09 -04:00
|
|
|
@if(userCan('restrictions-manage', $shelf))
|
|
|
|
<li><a href="{{ $shelf->getUrl('/permissions') }}" class="text-primary">@icon('lock'){{ trans('entities.permissions') }}</a></li>
|
2018-08-27 09:18:09 -04:00
|
|
|
@endif
|
2018-09-16 14:34:09 -04:00
|
|
|
@if(userCan('bookshelf-delete', $shelf))
|
|
|
|
<li><a href="{{ $shelf->getUrl('/delete') }}" class="text-neg">@icon('delete'){{ trans('common.delete') }}</a></li>
|
2018-08-27 09:18:09 -04:00
|
|
|
@endif
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
@endif
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@stop
|
|
|
|
|
|
|
|
@section('sidebar')
|
|
|
|
|
2018-09-16 14:34:09 -04:00
|
|
|
@if($shelf->tags->count() > 0)
|
2018-08-27 09:18:09 -04:00
|
|
|
<section>
|
2018-09-16 14:34:09 -04:00
|
|
|
@include('components.tag-list', ['entity' => $shelf])
|
2018-08-27 09:18:09 -04:00
|
|
|
</section>
|
|
|
|
@endif
|
|
|
|
|
|
|
|
<div class="card entity-details">
|
|
|
|
<h3>@icon('info') {{ trans('common.details') }}</h3>
|
|
|
|
<div class="body text-small text-muted blended-links">
|
2018-09-16 14:34:09 -04:00
|
|
|
@include('partials.entity-meta', ['entity' => $shelf])
|
|
|
|
@if($shelf->restricted)
|
2018-08-27 09:18:09 -04:00
|
|
|
<div class="active-restriction">
|
2018-09-16 14:34:09 -04:00
|
|
|
@if(userCan('restrictions-manage', $shelf))
|
|
|
|
<a href="{{ $shelf->getUrl('/permissions') }}">@icon('lock'){{ trans('entities.shelves_permissions_active') }}</a>
|
2018-08-27 09:18:09 -04:00
|
|
|
@else
|
2018-09-16 14:34:09 -04:00
|
|
|
@icon('lock'){{ trans('entities.shelves_permissions_active') }}
|
2018-08-27 09:18:09 -04:00
|
|
|
@endif
|
|
|
|
</div>
|
|
|
|
@endif
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
@if(count($activity) > 0)
|
|
|
|
<div class="activity card">
|
|
|
|
<h3>@icon('time') {{ trans('entities.recent_activity') }}</h3>
|
|
|
|
@include('partials/activity-list', ['activity' => $activity])
|
|
|
|
</div>
|
|
|
|
@endif
|
|
|
|
@stop
|
|
|
|
|
|
|
|
@section('body')
|
|
|
|
|
|
|
|
<div class="container small nopad">
|
2018-09-16 14:34:09 -04:00
|
|
|
<h1 class="break-text">{{$shelf->name}}</h1>
|
|
|
|
<div class="book-content">
|
|
|
|
<p class="text-muted">{!! nl2br(e($shelf->description)) !!}</p>
|
|
|
|
@if(count($books) > 0)
|
|
|
|
<div class="page-list">
|
2018-08-27 09:18:09 -04:00
|
|
|
<hr>
|
2018-09-16 14:34:09 -04:00
|
|
|
@foreach($books as $book)
|
|
|
|
@include('books/list-item', ['book' => $book])
|
2018-08-27 09:18:09 -04:00
|
|
|
<hr>
|
|
|
|
@endforeach
|
|
|
|
</div>
|
|
|
|
@else
|
2018-09-16 14:34:09 -04:00
|
|
|
<p>
|
|
|
|
<hr>
|
|
|
|
<span class="text-muted italic">{{ trans('entities.shelves_empty_contents') }}</span>
|
|
|
|
@if(userCan('bookshelf-create', $shelf))
|
|
|
|
<br>
|
|
|
|
<a href="{{ $shelf->getUrl('/edit') }}" class="button outline bookshelf">{{ trans('entities.shelves_edit_and_assign') }}</a>
|
|
|
|
@endif
|
|
|
|
</p>
|
2018-08-27 09:18:09 -04:00
|
|
|
@endif
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
@stop
|