better collection handlich in backend

This commit is contained in:
Arno Kaimbacher 2018-10-04 16:41:29 +02:00
parent 324eacf061
commit 50bcae442e
24 changed files with 623 additions and 68 deletions

View file

@ -0,0 +1,46 @@
@extends('settings.layouts.app')
@section('content')
<div class="header">
<h3 class="header-title">
Edit Collection Role
</h3>
</div>
<div class="box-content">
<a href="{{ route('settings.collectionrole.index') }}" class="pure-button button-small">
<i class="fa fa-chevron-left"></i>
<span>BACK</span>
</a>
<div>
{!! Form::model($collectionrole, ['method' => 'PATCH', 'route' => ['settings.collectionrole.update', $collectionrole->id], 'class' => 'pure-form pure-form-aligned']) !!}
<fieldset>
<div class="pure-control-group">
{{ Form::label('name', 'collectionrole name') }}
{{ Form::text('name', null, ['class' => 'form-control']) }}
<em>*</em>
</div>
<div class="pure-control-group">
{{ Form::label('oai_name', 'name of oai set') }}
{{ Form::text('oai_name', null, ['class' => 'form-control']) }}
<em>*</em>
</div>
<!-- checkboxes -->
<label for="active" class="pure-checkbox">
<input type="hidden" name="visible" value="0">
<input name="visible" value="1" {{ ($collectionrole->visible == 1) ? 'checked="checked" ' : '' }} type="checkbox" class="form-check-input">
Visible?
</label>
<label for="active" class="pure-checkbox">
<input type="hidden" name="visible_oai" value="0">
<input name="visible_oai" value="1" {{ ($collectionrole->visible_oai == 1) ? 'checked="checked" ' : '' }} type="checkbox" class="form-check-input">
Use collection as OAI set
</label>
{{ Form::submit("Submit", ['class' => 'pure-button button-small']) }}
</fieldset>
{!! Form::close() !!}
</div>
</div>
@endsection

View file

@ -0,0 +1,67 @@
@extends('settings.layouts.app')
@section('content')
<div class="header">
<h3 class="header-title">
<i class="fa fa-archive"></i> Collection Roles
</h3>
</div>
<div class="pure-g box-content">
<div class="pure-u-1 pure-u-md-3-3">
{{-- <a href="{{ route('settings.collectionrole.create') }}" class="pure-button button-small is-primary">
<i class="fa fa-plus-circle"></i>ADD NEW COLLECTION ROLE
</a> --}}
<br><br>
<table class="pure-table pure-table-horizontal">
<thead>
<th>Collection</th>
<th>Count Of Nested Collections</th>
<th>Options</th>
<th>Visible</th>
</thead>
<tbody>
@foreach($collectionroles as $collectionrole)
<tr>
<td>
<a class="show" href="{{ route('settings.collectionrole.show', $collectionrole) }}">
<span">{{ $collectionrole->name .' ('. $collectionrole->collections->count() .')' }}</span>
</a>
</td>
<td>
{{-- @foreach ($collection->documents as $document)
<p>document id: {{ $document->id }}</p>
@endforeach --}}
{{ $collectionrole->collections->count() }}
{{-- <a href="" class="pure-button button-small is-success">Show Collections</a> --}}
</td>
<td>
<a class="edit" href="{{ route('settings.collectionrole.edit', $collectionrole->id) }}"><span aria-hidden="true">Edit</span></a>
{{-- <a class="delete" href="{{ route('settings.collection.delete', $collection->id) }}"><span aria-hidden="true"></span></a> --}}
</td>
<td>
@if($collectionrole->visible == 1)
<a href="{{ route('settings.collectionrole.hide', $collectionrole->id) }}" class="pure-button button-small is-warning">Hide</a>
@else
<a href="{{ route('settings.collectionrole.up', $collectionrole->id) }}" class="pure-button button-small is-success">Unhide</a>
@endif
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
<div class="pure-u-1 pure-u-md-3-3">
{{-- {{ $collectionroles->links('vendor.pagination.default') }} --}}
</div>
</div>
@stop

View file

@ -0,0 +1,65 @@
@extends('settings.layouts.app')
@section('content')
<div class="header">
<h3 class="header-title">
<i class="fa fa-archive"></i> Top Level Collections
</h3>
</div>
<div class="pure-g box-content">
<div class="pure-u-1 pure-u-md-3-3">
{{-- <a href="{{ route('settings.collection.create') }}" class="pure-button button-small is-primary">
<i class="fa fa-plus-circle"></i>ADD NEW COLLECTION
</a> --}}
<br><br>
<table class="pure-table pure-table-horizontal">
<thead>
<th>Collection (number of child collections)</th>
<th>Collection Role</th>
<th>Document id's</th>
<th>Options</th>
</thead>
<tbody>
@foreach($collections as $collection)
<tr>
<td>
<a class="show" href="{{ route('settings.collection.show', $collection) }}">
{{-- <span">{{ $collection->name }}</span> --}}
<span">{{ $collection->name .' ('. $collection->children->count() .')' }}</span>
</a>
</td>
<td>{{ $collection->collectionrole->name }}</td>
<td>
@foreach ($collection->documents as $document)
<p>document id: {{ $document->id }}</p>
@endforeach
</td>
<td>
<a class="edit" href="{{ route('settings.collection.edit', $collection->id) }}"><span aria-hidden="true">edit collection</span></a>
{{-- <a class="delete" href="{{ route('settings.collection.delete', $collection->id) }}"><span aria-hidden="true"></span></a> --}}
</td>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
<div class="pure-u-1 pure-u-md-3-3">
{{ $collections->links('vendor.pagination.default') }}
</div>
</div>
@stop