Cleaned details sidebar box and merged with permissions
This commit is contained in:
		
							parent
							
								
									3d0d7f8be2
								
							
						
					
					
						commit
						58a0a59d7e
					
				| 
						 | 
				
			
			@ -0,0 +1,5 @@
 | 
			
		|||
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
 | 
			
		||||
    <path d="M0 0h24v24H0z" fill="none"/>
 | 
			
		||||
    <path d="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"/>
 | 
			
		||||
    <path d="M0 0h24v24H0z" fill="none"/>
 | 
			
		||||
</svg>
 | 
			
		||||
| 
		 After Width: | Height: | Size: 256 B  | 
| 
						 | 
				
			
			@ -208,6 +208,12 @@
 | 
			
		|||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.sidebar .card {
 | 
			
		||||
  h3, .body, .empty-text {
 | 
			
		||||
    padding: $-s $-m;
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.card.drag-card {
 | 
			
		||||
  border: 1px solid #DDD;
 | 
			
		||||
  border-radius: 4px;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -446,3 +446,12 @@ ul.pagination {
 | 
			
		|||
    margin: 0;
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.card.entity-details {
 | 
			
		||||
  .active-restriction {
 | 
			
		||||
    margin-top: $-xs;
 | 
			
		||||
  }
 | 
			
		||||
  .active-restriction + .active-restriction {
 | 
			
		||||
    margin-top: 0;
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -101,6 +101,13 @@ a, .link {
 | 
			
		|||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.blended-links a {
 | 
			
		||||
  color: inherit;
 | 
			
		||||
  svg {
 | 
			
		||||
    fill: currentColor;
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Other HTML Text Elements
 | 
			
		||||
 */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -53,21 +53,6 @@
 | 
			
		|||
        </div>
 | 
			
		||||
    </div>
 | 
			
		||||
 | 
			
		||||
    @if($book->restricted)
 | 
			
		||||
        <div class="card">
 | 
			
		||||
            <h3>@icon('permission') {{ trans('entities.permissions') }}</h3>
 | 
			
		||||
            <div class="body">
 | 
			
		||||
                <p class="text-muted">
 | 
			
		||||
                    @if(userCan('restrictions-manage', $book))
 | 
			
		||||
                        <a href="{{ $book->getUrl('/permissions') }}">@icon('lock'){{ trans('entities.books_permissions_active') }}</a>
 | 
			
		||||
                    @else
 | 
			
		||||
                        @icon('lock'){{ trans('entities.books_permissions_active') }}
 | 
			
		||||
                    @endif
 | 
			
		||||
                </p>
 | 
			
		||||
            </div>
 | 
			
		||||
        </div>
 | 
			
		||||
    @endif
 | 
			
		||||
 | 
			
		||||
    @if($book->tags->count() > 0)
 | 
			
		||||
        <div class="card tag-display">
 | 
			
		||||
            <h3>@icon('tag') {{ trans('entities.book_tags') }}</h3>
 | 
			
		||||
| 
						 | 
				
			
			@ -78,10 +63,19 @@
 | 
			
		|||
    @endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    <div class="card">
 | 
			
		||||
    <div class="card entity-details">
 | 
			
		||||
        <h3>@icon('info') {{ trans('common.details') }}</h3>
 | 
			
		||||
        <div class="body">
 | 
			
		||||
        <div class="body text-small text-muted blended-links">
 | 
			
		||||
            @include('partials.entity-meta', ['entity' => $book])
 | 
			
		||||
            @if($book->restricted)
 | 
			
		||||
                <div class="active-restriction">
 | 
			
		||||
                    @if(userCan('restrictions-manage', $book))
 | 
			
		||||
                        <a href="{{ $book->getUrl('/permissions') }}">@icon('lock'){{ trans('entities.books_permissions_active') }}</a>
 | 
			
		||||
                    @else
 | 
			
		||||
                        @icon('lock'){{ trans('entities.books_permissions_active') }}
 | 
			
		||||
                    @endif
 | 
			
		||||
                </div>
 | 
			
		||||
            @endif
 | 
			
		||||
        </div>
 | 
			
		||||
    </div>
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -57,34 +57,6 @@
 | 
			
		|||
        </div>
 | 
			
		||||
    </div>
 | 
			
		||||
 | 
			
		||||
    @if($book->restricted || $chapter->restricted)
 | 
			
		||||
        <div class="card">
 | 
			
		||||
            <h3>@icon('permission') {{ trans('entities.permissions') }}</h3>
 | 
			
		||||
            <div class="body">
 | 
			
		||||
                @if($book->restricted)
 | 
			
		||||
                    <p class="text-muted">
 | 
			
		||||
                        @if(userCan('restrictions-manage', $book))
 | 
			
		||||
                            <a href="{{ $book->getUrl('/permissions') }}">@icon('lock'){{ trans('entities.books_permissions_active') }}</a>
 | 
			
		||||
                        @else
 | 
			
		||||
                            @icon('lock'){{ trans('entities.books_permissions_active') }}
 | 
			
		||||
                        @endif
 | 
			
		||||
                    </p>
 | 
			
		||||
                @endif
 | 
			
		||||
 | 
			
		||||
                @if($chapter->restricted)
 | 
			
		||||
                    <p class="text-muted">
 | 
			
		||||
                        @if(userCan('restrictions-manage', $chapter))
 | 
			
		||||
                            <a href="{{ $chapter->getUrl('/permissions') }}">@icon('lock'){{ trans('entities.chapters_permissions_active') }}</a>
 | 
			
		||||
                        @else
 | 
			
		||||
                            @icon('lock'){{ trans('entities.chapters_permissions_active') }}
 | 
			
		||||
                        @endif
 | 
			
		||||
                    </p>
 | 
			
		||||
                @endif
 | 
			
		||||
            </div>
 | 
			
		||||
        </div>
 | 
			
		||||
    @endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    @if($chapter->tags->count() > 0)
 | 
			
		||||
        <div class="card tag-display">
 | 
			
		||||
            <h3>@icon('tag') {{ trans('entities.chapter_tags') }}</h3>
 | 
			
		||||
| 
						 | 
				
			
			@ -94,10 +66,30 @@
 | 
			
		|||
        </div>
 | 
			
		||||
    @endif
 | 
			
		||||
 | 
			
		||||
    <div class="card">
 | 
			
		||||
    <div class="card entity-details">
 | 
			
		||||
        <h3>@icon('info') {{ trans('common.details') }}</h3>
 | 
			
		||||
        <div class="body">
 | 
			
		||||
        <div class="body blended-links text-small text-muted">
 | 
			
		||||
            @include('partials.entity-meta', ['entity' => $chapter])
 | 
			
		||||
 | 
			
		||||
            @if($book->restricted)
 | 
			
		||||
                <div class="active-restriction">
 | 
			
		||||
                    @if(userCan('restrictions-manage', $book))
 | 
			
		||||
                        <a href="{{ $book->getUrl('/permissions') }}">@icon('lock'){{ trans('entities.books_permissions_active') }}</a>
 | 
			
		||||
                    @else
 | 
			
		||||
                        @icon('lock'){{ trans('entities.books_permissions_active') }}
 | 
			
		||||
                    @endif
 | 
			
		||||
                </div>
 | 
			
		||||
            @endif
 | 
			
		||||
 | 
			
		||||
            @if($chapter->restricted)
 | 
			
		||||
                <div class="active-restriction">
 | 
			
		||||
                    @if(userCan('restrictions-manage', $chapter))
 | 
			
		||||
                        <a href="{{ $chapter->getUrl('/permissions') }}">@icon('lock'){{ trans('entities.chapters_permissions_active') }}</a>
 | 
			
		||||
                    @else
 | 
			
		||||
                        @icon('lock'){{ trans('entities.chapters_permissions_active') }}
 | 
			
		||||
                    @endif
 | 
			
		||||
                </div>
 | 
			
		||||
            @endif
 | 
			
		||||
        </div>
 | 
			
		||||
    </div>
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -41,42 +41,6 @@
 | 
			
		|||
@stop
 | 
			
		||||
 | 
			
		||||
@section('sidebar')
 | 
			
		||||
    @if($book->restricted || ($page->chapter && $page->chapter->restricted) || $page->restricted)
 | 
			
		||||
        <div class="card">
 | 
			
		||||
            <h3>@icon('permission') {{ trans('entities.permissions') }}</h3>
 | 
			
		||||
            <div class="body">
 | 
			
		||||
                <div class="text-muted">
 | 
			
		||||
 | 
			
		||||
                    @if($book->restricted)
 | 
			
		||||
                        @if(userCan('restrictions-manage', $book))
 | 
			
		||||
                            <a href="{{ $book->getUrl('/permissions') }}">@icon('lock'){{ trans('entities.books_permissions_active') }}</a>
 | 
			
		||||
                        @else
 | 
			
		||||
                            @icon('lock'){{ trans('entities.books_permissions_active') }}
 | 
			
		||||
                        @endif
 | 
			
		||||
                        <br>
 | 
			
		||||
                    @endif
 | 
			
		||||
 | 
			
		||||
                    @if($page->chapter && $page->chapter->restricted)
 | 
			
		||||
                        @if(userCan('restrictions-manage', $page->chapter))
 | 
			
		||||
                            <a href="{{ $page->chapter->getUrl('/permissions') }}">@icon('lock'){{ trans('entities.chapters_permissions_active') }}</a>
 | 
			
		||||
                        @else
 | 
			
		||||
                            @icon('lock'){{ trans('entities.chapters_permissions_active') }}
 | 
			
		||||
                        @endif
 | 
			
		||||
                        <br>
 | 
			
		||||
                    @endif
 | 
			
		||||
 | 
			
		||||
                    @if($page->restricted)
 | 
			
		||||
                        @if(userCan('restrictions-manage', $page))
 | 
			
		||||
                            <a href="{{ $page->getUrl('/permissions') }}">@icon('lock'){{ trans('entities.pages_permissions_active') }}</a>
 | 
			
		||||
                        @else
 | 
			
		||||
                            @icon('lock'){{ trans('entities.pages_permissions_active') }}
 | 
			
		||||
                        @endif
 | 
			
		||||
                        <br>
 | 
			
		||||
                    @endif
 | 
			
		||||
                </div>
 | 
			
		||||
            </div>
 | 
			
		||||
        </div>
 | 
			
		||||
    @endif
 | 
			
		||||
 | 
			
		||||
    @if($page->tags->count() > 0)
 | 
			
		||||
        <div class="card tag-display">
 | 
			
		||||
| 
						 | 
				
			
			@ -115,10 +79,40 @@
 | 
			
		|||
        </div>
 | 
			
		||||
    @endif
 | 
			
		||||
 | 
			
		||||
    <div class="card">
 | 
			
		||||
    <div class="card entity-details">
 | 
			
		||||
        <h3>@icon('info') {{ trans('common.details') }}</h3>
 | 
			
		||||
        <div class="body">
 | 
			
		||||
        <div class="body text-muted text-small blended-links">
 | 
			
		||||
            @include('partials.entity-meta', ['entity' => $page])
 | 
			
		||||
 | 
			
		||||
            @if($book->restricted)
 | 
			
		||||
                <div class="active-restriction">
 | 
			
		||||
                    @if(userCan('restrictions-manage', $book))
 | 
			
		||||
                        <a href="{{ $book->getUrl('/permissions') }}">@icon('lock'){{ trans('entities.books_permissions_active') }}</a>
 | 
			
		||||
                    @else
 | 
			
		||||
                        @icon('lock'){{ trans('entities.books_permissions_active') }}
 | 
			
		||||
                    @endif
 | 
			
		||||
                </div>
 | 
			
		||||
            @endif
 | 
			
		||||
 | 
			
		||||
            @if($page->chapter && $page->chapter->restricted)
 | 
			
		||||
                <div class="active-restriction">
 | 
			
		||||
                    @if(userCan('restrictions-manage', $page->chapter))
 | 
			
		||||
                        <a href="{{ $page->chapter->getUrl('/permissions') }}">@icon('lock'){{ trans('entities.chapters_permissions_active') }}</a>
 | 
			
		||||
                    @else
 | 
			
		||||
                        @icon('lock'){{ trans('entities.chapters_permissions_active') }}
 | 
			
		||||
                    @endif
 | 
			
		||||
                </div>
 | 
			
		||||
            @endif
 | 
			
		||||
 | 
			
		||||
            @if($page->restricted)
 | 
			
		||||
                <div class="active-restriction">
 | 
			
		||||
                    @if(userCan('restrictions-manage', $page))
 | 
			
		||||
                        <a href="{{ $page->getUrl('/permissions') }}">@icon('lock'){{ trans('entities.pages_permissions_active') }}</a>
 | 
			
		||||
                    @else
 | 
			
		||||
                        @icon('lock'){{ trans('entities.pages_permissions_active') }}
 | 
			
		||||
                    @endif
 | 
			
		||||
                </div>
 | 
			
		||||
            @endif
 | 
			
		||||
        </div>
 | 
			
		||||
    </div>
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,25 +1,34 @@
 | 
			
		|||
<p class="text-muted small">
 | 
			
		||||
<div class="entity-meta">
 | 
			
		||||
    @if($entity->isA('revision'))
 | 
			
		||||
        {{ trans('entities.pages_revision') }}
 | 
			
		||||
        {{ trans('entities.pages_revisions_number') }}{{ $entity->revision_number == 0 ? '' : $entity->revision_number }}
 | 
			
		||||
        <br>
 | 
			
		||||
    @endif
 | 
			
		||||
    @if ($entity->isA('page')) {{ trans('entities.meta_revision', ['revisionCount' => $entity->revision_count]) }} <br> @endif
 | 
			
		||||
 | 
			
		||||
    @if ($entity->isA('page'))
 | 
			
		||||
        @if (userCan('page-update', $entity)) <a href="{{ $entity->getUrl('/revisions') }}"> @endif
 | 
			
		||||
            @icon('history'){{ trans('entities.meta_revision', ['revisionCount' => $entity->revision_count]) }} <br>
 | 
			
		||||
            @if (userCan('page-update', $entity))</a>@endif
 | 
			
		||||
    @endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    @if ($entity->createdBy)
 | 
			
		||||
        {!! trans('entities.meta_created_name', [
 | 
			
		||||
        @icon('star'){!! trans('entities.meta_created_name', [
 | 
			
		||||
            'timeLength' => '<span title="'.$entity->created_at->toDayDateTimeString().'">'.$entity->created_at->diffForHumans() . '</span>',
 | 
			
		||||
            'user' => "<a href='{$entity->createdBy->getProfileUrl()}'>".htmlentities($entity->createdBy->name). "</a>"
 | 
			
		||||
            ]) !!}
 | 
			
		||||
    @else
 | 
			
		||||
        <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>
 | 
			
		||||
    @endif
 | 
			
		||||
 | 
			
		||||
    <br>
 | 
			
		||||
 | 
			
		||||
    @if ($entity->updatedBy)
 | 
			
		||||
        {!! trans('entities.meta_updated_name', [
 | 
			
		||||
        @icon('edit'){!! trans('entities.meta_updated_name', [
 | 
			
		||||
                'timeLength' => '<span title="' . $entity->updated_at->toDayDateTimeString() .'">' . $entity->updated_at->diffForHumans() .'</span>',
 | 
			
		||||
                'user' => "<a href='{$entity->updatedBy->getProfileUrl()}'>".htmlentities($entity->updatedBy->name). "</a>"
 | 
			
		||||
            ]) !!}
 | 
			
		||||
    @elseif (!$entity->isA('revision'))
 | 
			
		||||
        <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>
 | 
			
		||||
    @endif
 | 
			
		||||
</p>
 | 
			
		||||
</div>
 | 
			
		||||
		Loading…
	
		Reference in New Issue