search functionality and settings fixes

This commit is contained in:
Chris
2018-02-05 14:21:54 +00:00
parent ae3d27aca8
commit ba273ffbcf
13 changed files with 314 additions and 39 deletions

View File

@@ -0,0 +1 @@
{!! App\Setting::search() !!}

View File

@@ -14,20 +14,7 @@
</div>-->
<div class="input">
@php($type = explode('|', $setting->type)[0])
{!! Form::label('value', 'Value') !!}
@if ($type == 'image')
{!! Form::file('value', ['class' => 'form-control']) !!}
@elseif ($type == 'select')
@php($options = explode('|', $setting->type)[1])
@php($options = explode(',', $options))
{!! Form::select('value', $options, null, ['class' => 'form-control']) !!}
@elseif ($type == 'textarea')
{!! Form::textarea('value', Request::get('value'), ['class' => 'form-control trumbowyg', 'placeholder' => 'FAQ contents']) !!}
@else
{!! Form::text('value', null, ['class' => 'form-control']) !!}
@endif
{!! $setting->edit_value !!}
</div>

View File

@@ -25,22 +25,7 @@
<tr>
<td>{{ $setting->label }}</td>
<td>
@php($type = explode('|', $setting->type)[0])
@if ($type == 'image')
@if(!empty($setting->value))
<a href="{{ asset('storage/'.$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
{!! $setting->list_value !!}
</td>
<td class="text-center">
@if((bool)$setting->system !== true)

View File

@@ -1,6 +1,8 @@
@extends('app')
@section('content')
@include('partials.search')
@if($apps->first())
@include('sortable')
@else