mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-08-26 12:16:07 +00:00
Cleaned up entity details listing
This commit is contained in:
parent
a0fe6147d8
commit
24b31b624c
@ -729,3 +729,19 @@ ul.pagination {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.entity-meta-item {
|
||||||
|
display: flex;
|
||||||
|
line-height: 1.2;
|
||||||
|
margin: 0.6em 0;
|
||||||
|
align-content: start;
|
||||||
|
gap: $-s;
|
||||||
|
a {
|
||||||
|
line-height: 1.2;
|
||||||
|
}
|
||||||
|
svg {
|
||||||
|
flex-shrink: 0;
|
||||||
|
width: 1em;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -67,14 +67,20 @@
|
|||||||
@section('right')
|
@section('right')
|
||||||
<div class="mb-xl">
|
<div class="mb-xl">
|
||||||
<h5>{{ trans('common.details') }}</h5>
|
<h5>{{ trans('common.details') }}</h5>
|
||||||
<div class="text-small text-muted blended-links">
|
<div class="blended-links">
|
||||||
@include('entities.meta', ['entity' => $book])
|
@include('entities.meta', ['entity' => $book])
|
||||||
@if($book->restricted)
|
@if($book->restricted)
|
||||||
<div class="active-restriction">
|
<div class="active-restriction">
|
||||||
@if(userCan('restrictions-manage', $book))
|
@if(userCan('restrictions-manage', $book))
|
||||||
<a href="{{ $book->getUrl('/permissions') }}">@icon('lock'){{ trans('entities.books_permissions_active') }}</a>
|
<a href="{{ $book->getUrl('/permissions') }}" class="entity-meta-item">
|
||||||
|
@icon('lock')
|
||||||
|
<div>{{ trans('entities.books_permissions_active') }}</div>
|
||||||
|
</a>
|
||||||
@else
|
@else
|
||||||
@icon('lock'){{ trans('entities.books_permissions_active') }}
|
<div class="entity-meta-item">
|
||||||
|
@icon('lock')
|
||||||
|
<div>{{ trans('entities.books_permissions_active') }}</div>
|
||||||
|
</div>
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
|
@ -64,15 +64,21 @@
|
|||||||
|
|
||||||
<div class="mb-xl">
|
<div class="mb-xl">
|
||||||
<h5>{{ trans('common.details') }}</h5>
|
<h5>{{ trans('common.details') }}</h5>
|
||||||
<div class="blended-links text-small text-muted">
|
<div class="blended-links">
|
||||||
@include('entities.meta', ['entity' => $chapter])
|
@include('entities.meta', ['entity' => $chapter])
|
||||||
|
|
||||||
@if($book->restricted)
|
@if($book->restricted)
|
||||||
<div class="active-restriction">
|
<div class="active-restriction">
|
||||||
@if(userCan('restrictions-manage', $book))
|
@if(userCan('restrictions-manage', $book))
|
||||||
<a href="{{ $book->getUrl('/permissions') }}">@icon('lock'){{ trans('entities.books_permissions_active') }}</a>
|
<a href="{{ $book->getUrl('/permissions') }}" class="entity-meta-item">
|
||||||
|
@icon('lock')
|
||||||
|
<div>{{ trans('entities.books_permissions_active') }}</div>
|
||||||
|
</a>
|
||||||
@else
|
@else
|
||||||
@icon('lock'){{ trans('entities.books_permissions_active') }}
|
<div class="entity-meta-item">
|
||||||
|
@icon('lock')
|
||||||
|
<div>{{ trans('entities.books_permissions_active') }}</div>
|
||||||
|
</div>
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
@ -80,9 +86,15 @@
|
|||||||
@if($chapter->restricted)
|
@if($chapter->restricted)
|
||||||
<div class="active-restriction">
|
<div class="active-restriction">
|
||||||
@if(userCan('restrictions-manage', $chapter))
|
@if(userCan('restrictions-manage', $chapter))
|
||||||
<a href="{{ $chapter->getUrl('/permissions') }}">@icon('lock'){{ trans('entities.chapters_permissions_active') }}</a>
|
<a href="{{ $chapter->getUrl('/permissions') }}" class="entity-meta-item">
|
||||||
|
@icon('lock')
|
||||||
|
<div>{{ trans('entities.chapters_permissions_active') }}</div>
|
||||||
|
</a>
|
||||||
@else
|
@else
|
||||||
@icon('lock'){{ trans('entities.chapters_permissions_active') }}
|
<div class="entity-meta-item">
|
||||||
|
@icon('lock')
|
||||||
|
<div>{{ trans('entities.chapters_permissions_active') }}</div>
|
||||||
|
</div>
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
|
@ -1,50 +1,62 @@
|
|||||||
<div class="entity-meta">
|
<div class="entity-meta">
|
||||||
@if($entity->isA('revision'))
|
@if($entity->isA('revision'))
|
||||||
|
<div class="entity-meta-item">
|
||||||
|
@icon('history')
|
||||||
<div>
|
<div>
|
||||||
@icon('history'){{ trans('entities.pages_revision') }}
|
{{ trans('entities.pages_revision') }}
|
||||||
{{ trans('entities.pages_revisions_number') }}{{ $entity->revision_number == 0 ? '' : $entity->revision_number }}
|
{{ trans('entities.pages_revisions_number') }}{{ $entity->revision_number == 0 ? '' : $entity->revision_number }}
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
@if ($entity->isA('page'))
|
@if ($entity->isA('page'))
|
||||||
<div>
|
@if (userCan('page-update', $entity)) <a href="{{ $entity->getUrl('/revisions') }}" class="entity-meta-item"> @else <div class="entity-meta-item"> @endif
|
||||||
@if (userCan('page-update', $entity)) <a href="{{ $entity->getUrl('/revisions') }}"> @endif
|
|
||||||
@icon('history'){{ trans('entities.meta_revision', ['revisionCount' => $entity->revision_count]) }}
|
@icon('history'){{ trans('entities.meta_revision', ['revisionCount' => $entity->revision_count]) }}
|
||||||
@if (userCan('page-update', $entity))</a>@endif
|
@if (userCan('page-update', $entity))</a> @else </div> @endif
|
||||||
</div>
|
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
@if ($entity->ownedBy && $entity->owned_by !== $entity->created_by)
|
@if ($entity->ownedBy && $entity->owned_by !== $entity->created_by)
|
||||||
|
<div class="entity-meta-item">
|
||||||
|
@icon('user')
|
||||||
<div>
|
<div>
|
||||||
@icon('user'){!! trans('entities.meta_owned_name', [
|
{!! trans('entities.meta_owned_name', [
|
||||||
'user' => "<a href='{$entity->ownedBy->getProfileUrl()}'>".e($entity->ownedBy->name). "</a>"
|
'user' => "<a href='{$entity->ownedBy->getProfileUrl()}'>".e($entity->ownedBy->name). "</a>"
|
||||||
]) !!}
|
]) !!}
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
@if ($entity->createdBy)
|
@if ($entity->createdBy)
|
||||||
|
<div class="entity-meta-item">
|
||||||
|
@icon('star')
|
||||||
<div>
|
<div>
|
||||||
@icon('star'){!! trans('entities.meta_created_name', [
|
{!! trans('entities.meta_created_name', [
|
||||||
'timeLength' => '<span title="'.$entity->created_at->toDayDateTimeString().'">'.$entity->created_at->diffForHumans() . '</span>',
|
'timeLength' => '<span title="'.$entity->created_at->toDayDateTimeString().'">'.$entity->created_at->diffForHumans() . '</span>',
|
||||||
'user' => "<a href='{$entity->createdBy->getProfileUrl()}'>".e($entity->createdBy->name). "</a>"
|
'user' => "<a href='{$entity->createdBy->getProfileUrl()}'>".e($entity->createdBy->name). "</a>"
|
||||||
]) !!}
|
]) !!}
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
@else
|
@else
|
||||||
<div>
|
<div class="entity-meta-item">
|
||||||
@icon('star')<span title="{{$entity->created_at->toDayDateTimeString()}}">{{ trans('entities.meta_created', ['timeLength' => $entity->created_at->diffForHumans()]) }}</span>
|
@icon('star')
|
||||||
|
<span title="{{$entity->created_at->toDayDateTimeString()}}">{{ trans('entities.meta_created', ['timeLength' => $entity->created_at->diffForHumans()]) }}</span>
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
@if ($entity->updatedBy)
|
@if ($entity->updatedBy)
|
||||||
|
<div class="entity-meta-item">
|
||||||
|
@icon('edit')
|
||||||
<div>
|
<div>
|
||||||
@icon('edit'){!! trans('entities.meta_updated_name', [
|
{!! trans('entities.meta_updated_name', [
|
||||||
'timeLength' => '<span title="' . $entity->updated_at->toDayDateTimeString() .'">' . $entity->updated_at->diffForHumans() .'</span>',
|
'timeLength' => '<span title="' . $entity->updated_at->toDayDateTimeString() .'">' . $entity->updated_at->diffForHumans() .'</span>',
|
||||||
'user' => "<a href='{$entity->updatedBy->getProfileUrl()}'>".e($entity->updatedBy->name). "</a>"
|
'user' => "<a href='{$entity->updatedBy->getProfileUrl()}'>".e($entity->updatedBy->name). "</a>"
|
||||||
]) !!}
|
]) !!}
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
@elseif (!$entity->isA('revision'))
|
@elseif (!$entity->isA('revision'))
|
||||||
<div>
|
<div class="entity-meta-item">
|
||||||
@icon('edit')<span title="{{ $entity->updated_at->toDayDateTimeString() }}">{{ trans('entities.meta_updated', ['timeLength' => $entity->updated_at->diffForHumans()]) }}</span>
|
@icon('edit')
|
||||||
|
<span title="{{ $entity->updated_at->toDayDateTimeString() }}">{{ trans('entities.meta_updated', ['timeLength' => $entity->updated_at->diffForHumans()]) }}</span>
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
@ -76,15 +76,21 @@
|
|||||||
@section('right')
|
@section('right')
|
||||||
<div id="page-details" class="entity-details mb-xl">
|
<div id="page-details" class="entity-details mb-xl">
|
||||||
<h5>{{ trans('common.details') }}</h5>
|
<h5>{{ trans('common.details') }}</h5>
|
||||||
<div class="body text-small blended-links">
|
<div class="blended-links">
|
||||||
@include('entities.meta', ['entity' => $page])
|
@include('entities.meta', ['entity' => $page])
|
||||||
|
|
||||||
@if($book->restricted)
|
@if($book->restricted)
|
||||||
<div class="active-restriction">
|
<div class="active-restriction">
|
||||||
@if(userCan('restrictions-manage', $book))
|
@if(userCan('restrictions-manage', $book))
|
||||||
<a href="{{ $book->getUrl('/permissions') }}">@icon('lock'){{ trans('entities.books_permissions_active') }}</a>
|
<a href="{{ $book->getUrl('/permissions') }}" class="entity-meta-item">
|
||||||
|
@icon('lock')
|
||||||
|
<div>{{ trans('entities.books_permissions_active') }}</div>
|
||||||
|
</a>
|
||||||
@else
|
@else
|
||||||
@icon('lock'){{ trans('entities.books_permissions_active') }}
|
<div class="entity-meta-item">
|
||||||
|
@icon('lock')
|
||||||
|
<div>{{ trans('entities.books_permissions_active') }}</div>
|
||||||
|
</div>
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
@ -92,9 +98,15 @@
|
|||||||
@if($page->chapter && $page->chapter->restricted)
|
@if($page->chapter && $page->chapter->restricted)
|
||||||
<div class="active-restriction">
|
<div class="active-restriction">
|
||||||
@if(userCan('restrictions-manage', $page->chapter))
|
@if(userCan('restrictions-manage', $page->chapter))
|
||||||
<a href="{{ $page->chapter->getUrl('/permissions') }}">@icon('lock'){{ trans('entities.chapters_permissions_active') }}</a>
|
<a href="{{ $page->chapter->getUrl('/permissions') }}" class="entity-meta-item">
|
||||||
|
@icon('lock')
|
||||||
|
<div>{{ trans('entities.chapters_permissions_active') }}</div>
|
||||||
|
</a>
|
||||||
@else
|
@else
|
||||||
@icon('lock'){{ trans('entities.chapters_permissions_active') }}
|
<div class="entity-meta-item">
|
||||||
|
@icon('lock')
|
||||||
|
<div>{{ trans('entities.chapters_permissions_active') }}</div>
|
||||||
|
</div>
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
@ -102,16 +114,23 @@
|
|||||||
@if($page->restricted)
|
@if($page->restricted)
|
||||||
<div class="active-restriction">
|
<div class="active-restriction">
|
||||||
@if(userCan('restrictions-manage', $page))
|
@if(userCan('restrictions-manage', $page))
|
||||||
<a href="{{ $page->getUrl('/permissions') }}">@icon('lock'){{ trans('entities.pages_permissions_active') }}</a>
|
<a href="{{ $page->getUrl('/permissions') }}" class="entity-meta-item">
|
||||||
|
@icon('lock')
|
||||||
|
<div>{{ trans('entities.pages_permissions_active') }}</div>
|
||||||
|
</a>
|
||||||
@else
|
@else
|
||||||
@icon('lock'){{ trans('entities.pages_permissions_active') }}
|
<div class="entity-meta-item">
|
||||||
|
@icon('lock')
|
||||||
|
<div>{{ trans('entities.pages_permissions_active') }}</div>
|
||||||
|
</div>
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
@if($page->template)
|
@if($page->template)
|
||||||
<div>
|
<div class="entity-meta-item">
|
||||||
@icon('template'){{ trans('entities.pages_is_template') }}
|
@icon('template')
|
||||||
|
<div>{{ trans('entities.pages_is_template') }}</div>
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
|
@ -81,14 +81,20 @@
|
|||||||
|
|
||||||
<div id="details" class="mb-xl">
|
<div id="details" class="mb-xl">
|
||||||
<h5>{{ trans('common.details') }}</h5>
|
<h5>{{ trans('common.details') }}</h5>
|
||||||
<div class="text-small text-muted blended-links">
|
<div class="blended-links">
|
||||||
@include('entities.meta', ['entity' => $shelf])
|
@include('entities.meta', ['entity' => $shelf])
|
||||||
@if($shelf->restricted)
|
@if($shelf->restricted)
|
||||||
<div class="active-restriction">
|
<div class="active-restriction">
|
||||||
@if(userCan('restrictions-manage', $shelf))
|
@if(userCan('restrictions-manage', $shelf))
|
||||||
<a href="{{ $shelf->getUrl('/permissions') }}">@icon('lock'){{ trans('entities.shelves_permissions_active') }}</a>
|
<a href="{{ $shelf->getUrl('/permissions') }}" class="entity-meta-item">
|
||||||
|
@icon('lock')
|
||||||
|
<div>{{ trans('entities.shelves_permissions_active') }}</div>
|
||||||
|
</a>
|
||||||
@else
|
@else
|
||||||
@icon('lock'){{ trans('entities.shelves_permissions_active') }}
|
<div class="entity-meta-item">
|
||||||
|
@icon('lock')
|
||||||
|
<div>{{ trans('entities.shelves_permissions_active') }}</div>
|
||||||
|
</div>
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
|
Loading…
Reference in New Issue
Block a user