allowed mimetypes from database

This commit is contained in:
Arno Kaimbacher 2019-04-02 18:03:29 +02:00
parent 2f930457d1
commit 415016a4c2
9 changed files with 128 additions and 202 deletions

View file

@ -1,5 +1,4 @@
@extends('settings.layouts.app')
@extends('settings.layouts.app')
@section('content')
<div class="header">
<h3 class="header-title">
@ -10,44 +9,42 @@
<div class="pure-g box-content">
<div class="pure-u-1 pure-u-md-2-3">
{{-- <a class="pure-button button-small is-primary" href="{{ route('access.user.create') }}">
<div class="pure-u-1 pure-u-md-2-3">
{{-- <a class="pure-button button-small is-primary" href="{{ route('settings.person.add') }}">
<i class="fa fa-plus-circle"></i>
<span>Create New File Extension</span>
</a> --}}
<span>ADD NEW MimeType</span>
</a>
<br><br> --}}
@if ($message = Session::get('success'))
<div class="alert summary-success">
<p>{{ $message }}</p>
</div>
@endif
<table class="pure-table pure-table-horizontal">
<thead>
<tr>
<th>Name</th>
<th>File Extension</th>
<th>Status</th>
<th></th>
</tr>
</thead>
{!! Form::open(array('route' => 'settings.mimetype.update','method' => 'PATCH', 'class'=>'pure-form')) !!}
<div class="pure-control-group checkboxlist">
@foreach ($options as $key => $value)
<label for={{"mimetype". $key }} class="pure-checkbox">
{{-- <input name="mimetypes[]" value={{ $value }} {{ (in_array($value, $checkeds)) ? 'checked=checked' : '' }} type="checkbox" class="form-check-input"> --}}
{!! Form::checkbox( 'mimetypes['. $key .']',
$value,
in_array($value, $checkeds),
['class' => 'md-check', 'id' => $key]
) !!}
{{ $value }}
</label>
@endforeach
</div>
<tbody>
@foreach($mimetypes as $mimetype)
<tr>
{{-- <div class="pure-controls">
<button type="submit" class="pure-button button-small">
<i class="fa fa-save"></i>
<span>Update allowed mimetypes</span>
</button>
</div> --}}
<td>{{ $mimetype->name }}</td>
<td>{{ $mimetype->file_extension }}</td>
<td>
@if($mimetype->enabled == 1) Active @else Inactive @endif
</td>
<td>
@if($mimetype->enabled == 1)
<a href="{{ route('settings.mimetype.down', $mimetype->id) }}" class="pure-button button-small is-warning">Deactivate</a> @else
<a href="{{ route('settings.mimetype.up', $mimetype->id) }}" class="pure-button button-small is-success">Activate</a> @endif
</td>
</tr>
@endforeach
</tbody>
{!! Form::close() !!}
</table>
</div>
</div>