99 lines
2.7 KiB
PHP
Executable File
99 lines
2.7 KiB
PHP
Executable File
@extends('adminlte::page')
|
|
|
|
@section('title', 'Dashboard')
|
|
|
|
@section('content_header')
|
|
<h1>{!! $general['title'] !!}</h1>
|
|
@stop
|
|
|
|
@section('content')
|
|
@php
|
|
$ajaxUrl = "/admin/".$general['cont_name'];
|
|
@endphp
|
|
<div id="editor_container">
|
|
<div id="" class="card col-12">
|
|
<div class="card-header">
|
|
<div class="card-title">
|
|
{{ $general['sub_title'] }}
|
|
</div>
|
|
<div class="card-tools">
|
|
<a class="add_new" href="javascript:void(0)" title="Add')"><i class="fa fa-plus-square"></i></a>
|
|
</div>
|
|
</div>
|
|
<div class="card-body justify-content-center align-items-center">
|
|
<div class="row" id="">
|
|
<div class="col-12">
|
|
<table class="hiddenAtLoad d-none table-striped"
|
|
id="listing_table"
|
|
data-toggle="table"
|
|
data-pagination="true"
|
|
data-side-pagination="server"
|
|
data-page-size="25"
|
|
data-search="true"
|
|
data-url="{{ $ajaxUrl }}/browse"
|
|
data-unique-id="id"
|
|
data-sort-name="id"
|
|
data-sort-order="desc"
|
|
data-id-field="id"
|
|
data-show-footer="false"
|
|
data-row-style="rowStyle"
|
|
data-row-attributes="rowAttributes"
|
|
data-detail-view="false"
|
|
>
|
|
<thead>
|
|
<tr>
|
|
<th data-field="id" data-visible="false">
|
|
#
|
|
</th>
|
|
@foreach ($fields as $key => $field)
|
|
<th data-field="@if(array_key_exists('display_field', $field)){{ $field['display_field'] }}@else{{ $key }}@endif" data-sortable="true">
|
|
{{ $field['label'] }}
|
|
</th>
|
|
@endforeach
|
|
<th data-align="center"
|
|
data-formatter="optFormatter"
|
|
data-events="optEvents"
|
|
data-sortable="false">
|
|
Akcije
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@stop
|
|
|
|
@section('css')
|
|
@stop
|
|
|
|
@section('js')
|
|
<script src="/js/jquery.blockUI.js"></script>
|
|
<script>
|
|
$(document).ready(function() {
|
|
$(".hiddenAtLoad").removeClass('d-none');
|
|
});
|
|
|
|
function rowAttributes(row, index) {
|
|
return {
|
|
'data-id': row.id
|
|
}
|
|
}
|
|
|
|
function optFormatter(value, row) {
|
|
var t = [];
|
|
t.push('<a class="report" href="javascript:void(0)" data-id="'+row.id+'" title="Radni nalog"><i class="fa fa-file"></i></a>');
|
|
return t.join('');
|
|
}
|
|
window.optEvents = {
|
|
'click .report': function (e, value, row, index) {
|
|
window.location.href = '/admin/izvestaji/radni_nalog/' + row.id;
|
|
},
|
|
}
|
|
|
|
</script>
|
|
@stop |