74 lines
2.9 KiB
PHP
74 lines
2.9 KiB
PHP
@extends('admin.layout')
|
|
|
|
@section('pageName', @trans('admin/customFields.overview'))
|
|
|
|
@section('content')
|
|
|
|
<div class="row">
|
|
<h2>@lang('admin/customFields.overview')</h2>
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
|
|
|
@if (session('success'))
|
|
<div data-alert class="callout success">
|
|
<strong>{{ session('success') }}</strong>
|
|
</div>
|
|
@endif
|
|
|
|
@if (session('error'))
|
|
<div data-alert class="callout alert">
|
|
<strong>{{ session('error') }}</strong>
|
|
</div>
|
|
@endif
|
|
|
|
|
|
{{--draw tabs--}}
|
|
@if (!empty($usedResources))
|
|
<ul class="tabs" data-tabs id="customFieldsOverview">
|
|
<?php $isFirst = true?>
|
|
@foreach($usedResources as $i => $resource)
|
|
<li class="tabs-title @if($isFirst)is-active @endif"><a href="#customFieldResource{{$resource}}">@lang($resources[$resource])</a></li>
|
|
<?php $isFirst = false?>
|
|
@endforeach
|
|
</ul>
|
|
|
|
{{--display list of custom fields--}}
|
|
<?php $isFirst = true?>
|
|
<div class="tabs-content" data-tabs-content="customFieldsOverview">
|
|
@foreach($customFields as $resourceId => $fields)
|
|
<div class="tabs-panel @if($isFirst)is-active @endif" id="customFieldResource{{$resourceId}}">
|
|
<table class="full-width">
|
|
<thead>
|
|
<tr>
|
|
<th>@lang('admin/customFields.name')</th>
|
|
<th>@lang('admin/customFields.description')</th>
|
|
<th>@lang('admin/customFields.type')</th>
|
|
<th></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach($fields as $field)
|
|
<tr>
|
|
<td>{{$field->name}}</td>
|
|
<td>{{str_limit($field->description)}}</td>
|
|
<td>@lang($types[$field->type_id])</td>
|
|
<td>
|
|
<a href="{{route('customfields.delete', ['id' => $field->id])}}"><i class="fa red confirm fa-remove"></i></a>
|
|
<a href="{{route('customfields.edit', ['id' => $field->id])}}"><i class="fa green fa-edit"></i></a>
|
|
</td>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<?php $isFirst = false?>
|
|
@endforeach
|
|
</div>
|
|
|
|
@else
|
|
<em>@lang('admin/customFields.noFields')</em>
|
|
@endif
|
|
</div>
|
|
@stop
|