added settings

This commit is contained in:
KodeStar
2018-02-04 20:50:59 +00:00
parent afe78c4e06
commit d21138529f
19 changed files with 446 additions and 13 deletions

View File

@@ -258,7 +258,7 @@ body {
background: #f9fafd;
max-width: 1000px;
width: 100%;
margin: 0 40px;
margin: 10px 40px;
header, footer {
display: flex;
justify-content: space-between;

View File

@@ -62,7 +62,12 @@
@if(!Request::is(['items', 'items/*']))
<a id="items" class="config" href="{{ route('items.index') }}"><i class="fas fa-list"></i></a>
@endif
<a id="config-button" class="config" href=""><i class="fas fa-cogs"></i></a>
@if(!Request::is(['settings', 'settings/*']))
<a id="settings" class="config" href="{{ route('settings.index') }}"><i class="fas fa-cogs"></i></a>
@endif
@if(Route::is('dash'))
<a id="config-button" class="config" href=""><i class="fas fa-exchange"></i></a>
@endif
</div>
</main>

View File

@@ -0,0 +1,67 @@
@extends('app')
@section('content')
@foreach ($groups as $group)
<section class="module-container">
<header>
<div class="section-title">
{{ $group->title }}
</div>
</header>
<table class="table table-hover">
<thead>
<tr>
<th>Label</th>
<th style="width: 60%;">Value</th>
<th class="text-center" style="width: 75px;">Edit</th>
</tr>
</thead>
<tbody>
@if (count($group->settings) > 0)
@foreach ($group->settings as $setting)
<tr>
<td>{{ $setting->label }}</td>
<td>
@php($type = explode('|', $setting->type)[0])
@if ($type == 'image')
@if(!empty($setting->value))
<a href="/uploads/settings/{{ $setting->value }}" title="View" target="_blank">View</a>
@else
- not set -
@endif
@elseif ($type == 'select')
@if ($setting->value == 1)
YES
@else
NO
@endif
@else
{!! $setting->value !!}
@endif
</td>
<td class="text-center">
@if((bool)$setting->system !== true)
<a href="{!! route('settings.edit', ['id' => $setting->id]) !!}" title="Edit {!! $setting->label !!}" class="secondary"><i class="fa fa-pencil"></i></a>
@endif
</td>
</tr>
@endforeach
@else
<tr>
<td colspan="3" class="form-error text-center">
<strong>No items found</strong>
</td>
</tr>
@endif
</tbody>
</table>
</section>
@endforeach
@endsection