2016-01-26 23:20:08 -05:00
|
|
|
@extends('dashboard.core')
|
|
|
|
|
|
|
|
@section('dashboard-heading')
|
2016-12-22 00:20:44 -05:00
|
|
|
@if($export)
|
2016-12-19 22:31:04 -05:00
|
|
|
<a href="/dashboard/export/{{ $model }}"><button type="button" class="btn btn-default">Export</button></a>
|
|
|
|
@endif
|
|
|
|
|
2016-12-22 00:20:44 -05:00
|
|
|
@if($create)
|
2016-12-19 22:45:11 -05:00
|
|
|
<button type="button" class="new-button btn btn-default">New</button>
|
|
|
|
@endif
|
2016-01-26 23:20:08 -05:00
|
|
|
@endsection
|
|
|
|
|
|
|
|
@section('dashboard-body')
|
2016-12-22 00:20:44 -05:00
|
|
|
<div id="edit-list-wrapper">
|
|
|
|
@if($filter)
|
|
|
|
<input id="filter-input" class="search" placeholder="Filter" />
|
|
|
|
@endif
|
|
|
|
|
2018-01-11 23:48:26 -05:00
|
|
|
<ul id="edit-list" class="list-group edit-list list" data-model="{{ $model }}" data-path="{{ isset($path) ? $path : $model }}" {{ $sortcol != false ? "data-sort=$sortcol" : '' }}>
|
2016-12-22 00:20:44 -05:00
|
|
|
<input type="hidden" name="_token" id="token" value="{{ csrf_token() }}" />
|
|
|
|
|
|
|
|
@foreach($rows as $row)
|
|
|
|
<li class="list-group-item" data-id="{{ $row['id'] }}">
|
|
|
|
<div class="container-fluid">
|
|
|
|
<div class="row">
|
|
|
|
<div class="title-column">
|
|
|
|
@if($sortcol != false)
|
|
|
|
<i class="fa fa-bars sort-icon" title="Click and drag to reorder"></i>
|
|
|
|
@endif
|
|
|
|
|
2018-01-11 23:57:49 -05:00
|
|
|
@if(is_array($column))
|
|
|
|
@foreach($column as $col)
|
|
|
|
@if($row[$col] != '')
|
|
|
|
<div class="column">{{ $row[$col] }}</div>
|
2016-12-22 00:20:44 -05:00
|
|
|
|
2018-01-11 23:57:49 -05:00
|
|
|
@if(!$loop->last)
|
|
|
|
<div class="column spacer">|</div>
|
2016-12-22 00:20:44 -05:00
|
|
|
@endif
|
2018-01-11 23:57:49 -05:00
|
|
|
@endif
|
|
|
|
@endforeach
|
|
|
|
@else
|
|
|
|
{{ $row[$column] }}
|
|
|
|
@endif
|
2016-12-22 00:20:44 -05:00
|
|
|
</div>
|
2016-01-26 23:20:08 -05:00
|
|
|
|
2016-12-22 00:20:44 -05:00
|
|
|
<div class="button-column">
|
2017-01-04 23:23:26 -05:00
|
|
|
@if(isset($button) && is_array($button))
|
|
|
|
<button type="button" class="action-button btn btn-default" data-confirmation="{{ $button[1] }}" data-success="{{ $button[2] }}" data-error="{{ $button[3] }}" data-url="{{ $button[4] }}">{{ $button[0] }}</button>
|
|
|
|
@endif
|
|
|
|
|
2016-12-22 00:20:44 -05:00
|
|
|
<button type="button" class="edit-button btn btn-warning">Edit</button>
|
2016-12-19 22:31:04 -05:00
|
|
|
|
2016-12-22 00:20:44 -05:00
|
|
|
@if($delete)
|
|
|
|
<button type="button" class="delete-button btn btn-danger">Delete</button>
|
|
|
|
@endif
|
|
|
|
</div>
|
2016-01-26 23:20:08 -05:00
|
|
|
</div>
|
|
|
|
</div>
|
2016-12-22 00:20:44 -05:00
|
|
|
</li>
|
|
|
|
@endforeach
|
|
|
|
</ul>
|
|
|
|
</div>
|
2016-01-26 23:20:08 -05:00
|
|
|
@endsection
|