FileManager
This commit is contained in:
parent
c8948338bb
commit
f1e0900a7a
131 changed files with 5844 additions and 3081 deletions
135
resources/views/cms/content/author/index.blade.php
Executable file
135
resources/views/cms/content/author/index.blade.php
Executable file
|
|
@ -0,0 +1,135 @@
|
|||
@extends('layouts.layout-2')
|
||||
|
||||
@section('content')
|
||||
|
||||
<h4 class="font-weight-bold py-3 mb-1">
|
||||
{{ __('Authoren') }}
|
||||
</h4>
|
||||
|
||||
@if ($errors->any())
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="alert alert-danger">
|
||||
<ul>
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="card">
|
||||
<div class="card-datatable table-responsive py-2" data-route-modal="{{ route('cms_content_author_load_modal') }}" data-target-modal="#modals-load-content">
|
||||
<div class="mr-4 mb-2 text-right">
|
||||
<button type="button" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-load-content"
|
||||
data-id="new"
|
||||
data-model="content"
|
||||
>Neuen Autor anlegen</button>
|
||||
</div>
|
||||
|
||||
<table class="datatables-default table table-striped table-bordered clients-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="max-width: 60px;"> </th>
|
||||
<th>{{__('Name')}}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($contents as $value)
|
||||
<tr>
|
||||
<td class="not">
|
||||
<button type="button" class="btn icon-btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-load-content"
|
||||
data-id="{{ $value->id }}"
|
||||
data-model="content">
|
||||
<span class="fa fa-edit"></span>
|
||||
</button>
|
||||
</td>
|
||||
<td>{{ $value->name }}</td>
|
||||
<td><a class="text-danger" href="{{ route('cms_content_author_delete', [$value->id]) }}" onclick="return confirm('{{__('Wirklich löschen?')}}');"><i class="fa fa-trash-alt"></i></a></td>
|
||||
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="mt-4 mr-4 text-right">
|
||||
<button type="button" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-load-content"
|
||||
data-id="new"
|
||||
data-model="content"
|
||||
>Neuen Autor anlegen</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
$( document ).ready(function() {
|
||||
|
||||
|
||||
function loadModalInner(self, data){
|
||||
|
||||
var url = data.route,
|
||||
contentType = 'application/x-www-form-urlencoded; charset=UTF-8';
|
||||
$.ajax({
|
||||
url: url,
|
||||
data: data,
|
||||
type: "POST",
|
||||
dataType: "json",
|
||||
cache: false,
|
||||
contentType: contentType,
|
||||
encode: true,
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
|
||||
},
|
||||
success: function(data) {
|
||||
$(data.response.target).find('.modal-dialog').html(data.html);
|
||||
//$('.selectpicker').selectpicker('refresh');
|
||||
//datepicker_birthday_init();
|
||||
},
|
||||
error: function(xhr, status, errorThrown) {
|
||||
console.log(xhr);
|
||||
console.log(xhr.responseText);
|
||||
console.log(errorThrown);
|
||||
console.log("Sorry, there was a problem!");
|
||||
}
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
$('#modals-load-content').on('show.bs.modal', function (event) {
|
||||
var button = $(event.relatedTarget);
|
||||
if (!button.data('id')) {
|
||||
return;
|
||||
}
|
||||
var data = {};
|
||||
data.route = button.parents('.card').find('.card-datatable').data('route-modal');
|
||||
data.target = button.parents('.card').find('.card-datatable').data('target-modal');
|
||||
data.id = button.data('id');
|
||||
data.model = button.data('model');
|
||||
console.log(data);
|
||||
loadModalInner(this, data);
|
||||
|
||||
});
|
||||
|
||||
$('.datatables-default').dataTable({
|
||||
"bLengthChange": false,
|
||||
"iDisplayLength": 50,
|
||||
"language": {
|
||||
"url": "/js/German.json"
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<!-- Modal template -->
|
||||
<div class="modal fade" id="modals-load-content">
|
||||
<div class="modal-dialog">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@endsection
|
||||
29
resources/views/cms/content/author/modal.blade.php
Executable file
29
resources/views/cms/content/author/modal.blade.php
Executable file
|
|
@ -0,0 +1,29 @@
|
|||
|
||||
{!! Form::open(['url' => route('cms_content_author_store'), 'class' => 'modal-content']) !!}
|
||||
|
||||
<input type="hidden" name="id" id="id" value="@if($value->id>0){{$value->id}}@else new @endif">
|
||||
|
||||
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">
|
||||
{{ __('Autor') }}
|
||||
<span class="font-weight-light">erstellen/bearbeiten</span>
|
||||
</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-row">
|
||||
<div class="form-group col">
|
||||
<label for="name" class="form-label">{{ __('Name') }}</label>
|
||||
{{ Form::text('name', $value->name, array('placeholder'=>__('Name'), 'class'=>'form-control', 'required')) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">schließen</button>
|
||||
<button type="submit" class="btn btn-primary">speichern</button>
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
Loading…
Add table
Add a link
Reference in a new issue