2016-01-26 23:20:08 -05:00
|
|
|
@extends('dashboard.core')
|
|
|
|
|
|
|
|
@section('dashboard-heading')
|
2018-01-21 19:48:30 -05:00
|
|
|
@if($export && count($rows) > 0)
|
2018-04-16 00:45:32 -04:00
|
|
|
<a href="/dashboard/export/{{ $model }}"><button type="button" class="btn btn-secondary">Export</button></a>
|
2016-12-19 22:31:04 -05:00
|
|
|
@endif
|
|
|
|
|
2016-12-22 00:20:44 -05:00
|
|
|
@if($create)
|
2018-04-16 00:45:32 -04:00
|
|
|
<button type="button" class="new-button btn btn-secondary">New</button>
|
2016-12-19 22:45:11 -05:00
|
|
|
@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">
|
2018-01-21 20:55:07 -05:00
|
|
|
<input type="hidden" id="token" value="{{ csrf_token() }}" />
|
2018-01-12 00:15:04 -05:00
|
|
|
|
2016-12-22 00:20:44 -05:00
|
|
|
@if($filter)
|
|
|
|
<input id="filter-input" class="search" placeholder="Filter" />
|
|
|
|
@endif
|
|
|
|
|
2018-04-18 00:38:11 -04:00
|
|
|
<ul id="edit-list" class="list-group edit-list list" data-model="{{ $model }}" {{ $sortcol != false ? "data-sort=$sortcol" : '' }}>
|
2016-12-22 00:20:44 -05:00
|
|
|
@foreach($rows as $row)
|
2018-01-21 22:47:59 -05:00
|
|
|
<li class="list-group-item {{ $sortcol != false ? 'sortable' : '' }}" data-id="{{ $row['id'] }}">
|
|
|
|
<div class="title-column">
|
|
|
|
@if($sortcol != false)
|
2018-04-15 20:43:23 -04:00
|
|
|
<div class="sort-icon" title="Click and drag to reorder">
|
|
|
|
<div class="sort-icon-inner">
|
|
|
|
<div class="sort-icon-inner-bar"></div>
|
|
|
|
<div class="sort-icon-inner-bar"></div>
|
|
|
|
<div class="sort-icon-inner-bar"></div>
|
|
|
|
</div>
|
2018-01-21 22:47:59 -05:00
|
|
|
</div>
|
|
|
|
@endif
|
2016-12-22 00:20:44 -05:00
|
|
|
|
2018-04-18 00:38:11 -04:00
|
|
|
@foreach($display as $display_column)
|
|
|
|
@if($row[$display_column] != '')
|
|
|
|
<div class="column">{{ $row[$display_column] }}</div>
|
2016-12-22 00:20:44 -05:00
|
|
|
|
2018-04-18 00:38:11 -04:00
|
|
|
@if(!$loop->last)
|
|
|
|
<div class="spacer">|</div>
|
2018-01-11 23:57:49 -05:00
|
|
|
@endif
|
2018-04-18 00:38:11 -04:00
|
|
|
@endif
|
|
|
|
@endforeach
|
2018-01-21 22:47:59 -05:00
|
|
|
</div>
|
2016-01-26 23:20:08 -05:00
|
|
|
|
2018-01-21 22:47:59 -05:00
|
|
|
<div class="button-column">
|
2018-04-18 00:38:11 -04:00
|
|
|
@if(!empty($button))
|
2018-04-16 00:45:32 -04:00
|
|
|
<button type="button" class="action-button btn btn-secondary" data-confirmation="{{ $button[1] }}" data-success="{{ $button[2] }}" data-error="{{ $button[3] }}" data-url="{{ $button[4] }}">{{ $button[0] }}</button>
|
2018-01-21 22:47:59 -05:00
|
|
|
@endif
|
2017-01-04 23:23:26 -05:00
|
|
|
|
2020-04-23 22:17:13 -04:00
|
|
|
<a class="edit-button btn btn-warning" href="/dashboard/edit/{{ $model }}/{{ $row['id'] }}">Edit</a>
|
2016-12-19 22:31:04 -05:00
|
|
|
|
2018-01-21 22:47:59 -05:00
|
|
|
@if($delete)
|
|
|
|
<button type="button" class="delete-button btn btn-danger">Delete</button>
|
|
|
|
@endif
|
2016-01-26 23:20:08 -05:00
|
|
|
</div>
|
2016-12-22 00:20:44 -05:00
|
|
|
</li>
|
|
|
|
@endforeach
|
|
|
|
</ul>
|
|
|
|
</div>
|
2016-01-26 23:20:08 -05:00
|
|
|
@endsection
|