Nextrek
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
|
<?php $__env->startSection('styles'); ?>
<?php echo HTML::style('css/bootstrap.css'); ?>
<?php echo HTML::style('css/AdminLTE.css'); ?>
<?php echo HTML::style('css/datatables/dataTables.bootstrap.css'); ?>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('content'); ?>
<div class="img-titolo">
<div><hr><h2>Admin</h2><hr></div>
<img src="<?php echo URL::asset('image/riservata-bg.jpg'); ?>" alt="">
</div>
<div class="wrap admin">
<?php echo $__env->make('admin.nav', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
<section class="content">
<div class="box">
<div class="box-header">
<h3 class="box-title"></h3>
</div>
<!-- /.box-header -->
<div class="box-body table-responsive">
<select class="form-control" name="sezione" id="sezione">
<?php foreach(Organi::all() as $sez): ?>
<option <?php if($sez->idorgani == $sezione): ?><?php echo 'selected'; ?><?php endif; ?> value="<?php echo $sez->idorgani; ?>"><?php echo $sez->sezione; ?></option>
<?php endforeach; ?>
</select><br>
<table id="crud_list" class="table table-bordered table-striped">
<thead>
<tr>
<th>titolo</th>
<th>data</th>
<th>folder</th>
<th>apri</th>
<th>modifica</th>
<th>elimina</th>
</tr>
</thead>
<tbody>
<?php foreach($organi as $i => $organo): ?>
<?php $folder = OrganiFolder::where('id_sezione','=',$sezione)->where('id','=',$organo->id_folder)->first(); ?>
<tr>
<td><?php echo $organo->titolo; ?></td>
<td><?php echo Carbon::createFromFormat('Y-m-d', $organo->data)->format('d/m/Y'); ?></td>
<td><?php echo $folder['folder']; ?></td>
<td><a href="<?php echo asset('WDVBzqTvDXF3WyfGHbWUD94WUQDSKrEzCfneLXxwWDVBzq/organi/'.$folder['folder'].'/'.$organo->id.'.'.strtolower($organo->tipo)); ?>" class="btn-flat btn-success btn-sm">apri</a></td>
<td><a href="<?php echo URL::route('admin-organi-edit',$organo->id); ?>" class="btn-flat btn-success btn-sm">modifica</a></td>
<td><a href="<?php echo URL::route('admin-organi-delete', [$organo->id, $organo->id_sezione]); ?>" class="btn-flat btn-warning btn-sm">Elimina</a></td>
</tr>
<?php endforeach; ?>
</tbody>
</tfoot>
</table>
</div>
<!-- /.box-body -->
</div>
<!-- /.box -->
</section><!-- /.content -->
</div>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('scripts'); ?>
<?php echo HTML::script('js/plugins/datatables/jquery.dataTables.js'); ?>
<?php echo HTML::script('js/plugins/datatables/dataTables.bootstrap.js'); ?>
<?php echo HTML::script('js/plugins/datatables/dataTables.colResize.js'); ?>
<script type="text/javascript">
$(function () {
$('#crud_list').dataTable({
"bSort": false,
"bPaginate": true,
"bLengthChange": false,
"bFilter": true,
"bInfo": true,
"bAutoWidth": true,
"sDom": 'Zlfrtip'
});
$('.admin select#sezione').change(function(e){
e.preventDefault();
window.location.href = '/admin/organi/lista/'+$(this).val();
});
});
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layout.main', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
|
Revision |
Author |
Commited |
Message |
1464
|
MOliva
|
Tue 13 Oct, 2020 11:16:56 +0000 |
|