better collection handlich in backend
This commit is contained in:
parent
324eacf061
commit
50bcae442e
24 changed files with 623 additions and 68 deletions
|
@ -11,16 +11,16 @@
|
|||
<div class="pure-g box-content">
|
||||
|
||||
<div class="pure-u-1 pure-u-md-3-3">
|
||||
<a href="{{ route('settings.project.add') }}" class="pure-button button-small is-primary">
|
||||
<i class="fa fa-plus-circle"></i>ADD NEW COLLECTION
|
||||
<a href="{{ route('settings.collection.create') }}" class="pure-button button-small is-primary">
|
||||
<i class="fa fa-plus-circle"></i>ADD NEW CHILD COLLECTION
|
||||
</a>
|
||||
<br><br>
|
||||
|
||||
<table class="pure-table pure-table-horizontal">
|
||||
|
||||
<thead>
|
||||
<th>Collection</th>
|
||||
<th>id</th>
|
||||
<th>Collection (number of child collections)</th>
|
||||
<th>Collection Role</th>
|
||||
<th>Document id's</th>
|
||||
<th>Options</th>
|
||||
</thead>
|
||||
|
@ -30,8 +30,13 @@
|
|||
@foreach($collections as $collection)
|
||||
|
||||
<tr>
|
||||
<td>{{ $collection->name }}</td>
|
||||
<td>{{ $collection->id }}</td>
|
||||
<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>
|
||||
|
@ -39,12 +44,8 @@
|
|||
|
||||
</td>
|
||||
<td>
|
||||
<a class="edit" href="{{ route('settings.collection.edit', $collection->id) }}"><span aria-hidden="true"></span></a>
|
||||
<a class="delete" href="{{ route('settings.collection.delete', $collection->id) }}"><span aria-hidden="true"></span></a>
|
||||
|
||||
|
||||
|
||||
|
||||
<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>
|
||||
|
|
44
resources/views/settings/collection/edit.blade.php
Normal file
44
resources/views/settings/collection/edit.blade.php
Normal file
|
@ -0,0 +1,44 @@
|
|||
@extends('settings.layouts.app')
|
||||
@section('content')
|
||||
<div class="header">
|
||||
<h3 class="header-title">
|
||||
Edit Collection "{{ $collection->name }}"
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<div class="box-content">
|
||||
@if($collection->parent()->exists())
|
||||
<a href="{{ route('settings.collection.show', $collection->parent) }}" class="pure-button button-small">
|
||||
<i class="fa fa-chevron-left"></i>
|
||||
<span>BACK</span>
|
||||
</a>
|
||||
@else
|
||||
<a href="{{ route('settings.collectionrole.show', $collection->collectionrole) }}" class="pure-button button-small">
|
||||
<i class="fa fa-chevron-left"></i>
|
||||
<span>BACK</span>
|
||||
</a>
|
||||
@endif
|
||||
|
||||
<div>
|
||||
{!! Form::model($collection, ['method' => 'PATCH', 'route' => ['settings.collection.update', $collection->id], 'class' =>
|
||||
'pure-form pure-form-aligned']) !!}
|
||||
<fieldset>
|
||||
<div class="pure-control-group">
|
||||
{{ Form::label('name', 'collection name') }} {{ Form::text('name', null, ['class' => 'form-control']) }}
|
||||
<em>*</em>
|
||||
</div>
|
||||
|
||||
<div class="pure-control-group pure-div">
|
||||
{!! Form::label('role_id', 'Collection Role..') !!}
|
||||
{!! Form::select('role_id', $collectionroles, null, ['id' => 'role_id', 'placeholder' => '-- no role selected --']) !!}
|
||||
|
||||
<em>*</em>
|
||||
</div>
|
||||
|
||||
{{ Form::submit("Submit", ['class' => 'pure-button button-small']) }}
|
||||
</fieldset>
|
||||
@include('errors._errors')
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
Loading…
Add table
editor.link_modal.header
Reference in a new issue