fixes to alerts and soft deleting

This commit is contained in:
KodeStar
2018-02-03 15:46:14 +00:00
parent 25bbf6f99a
commit 19cd1be85a
13 changed files with 286 additions and 23 deletions

View File

@@ -13,6 +13,7 @@
<body>
<div id="app">
<nav class="sidenav">
<a class="close-sidenav" href=""><i class="fas fa-times-circle"></i></a>
@if(isset($all_apps))
<h2>Pinned Items</h2>
<ul id="pinlist">
@@ -41,7 +42,7 @@
</div>
</div>
@endif
@if (count($errors) < 0)
@if (count($errors) > 0)
<div class="message-container">
<div class="alert alert-danger">
<ul>

View File

@@ -3,7 +3,13 @@
@section('content')
<section class="module-container">
<header>
<div class="section-title">Application list</div>
<div class="section-title">
Application list
@if( isset($trash) && $trash->count() > 0 )
<a class="trashed" href="{{ route('items.index', ['trash' => true]) }}">View trash ({{ $trash->count() }})</a>
@endif
</div>
<div class="module-actions">
<a href="{{ route('items.create') }}" title="" class="button"><i class="fa fa-plus"></i><span>Add</span></a>
</div>

View File

@@ -0,0 +1,54 @@
@extends('app')
@section('content')
<section class="module-container">
<header>
<div class="section-title">
Showing Deleted Applications
</div>
<div class="module-actions">
<a href="{{ route('items.index') }}" title="" class="button"><i class="fa fa-ban"></i><span>Cancel</span></a>
</div>
</header>
<table class="table table-hover">
<thead>
<tr>
<th>Title</th>
<th>Description</th>
<th>Url</th>
<th class="text-center" width="100">Restore</th>
<th class="text-center" width="100">Delete</th>
</tr>
</thead>
<tbody>
@if($trash->first())
@foreach($trash as $app)
<tr>
<td>{{ $app->title }}</td>
<td>{{ $app->description }}</td>
<td>{{ $app->url }}</td>
<td class="text-center"><a href="{!! route('items.restore', $app->id) !!}" title="Restore {!! $app->title !!}"><i class="fas fa-edit"></i></a></td>
<td class="text-center">
{!! Form::open(['method' => 'DELETE','route' => ['items.destroy', $app->id],'style'=>'display:inline']) !!}
<input type="hidden" name="force" value="1" />
<button type="submit"><i class="fa fa-trash-alt"></i></button>
{!! Form::close() !!}
</td>
</tr>
@endforeach
@else
<tr>
<td colspan="5" class="form-error text-center">
<strong>No items found</strong>
</td>
</tr>
@endif
</tbody>
</table>
</section>
@endsection

View File

@@ -4,8 +4,15 @@
@if($apps->first())
@include('sortable')
@else
There are currently no Applications, <a href="{{ route('items.create') }}">add one here</a>
<div class="message-container2">
<div class="alert alert-danger">
<p>There are currently no pinned Applications, <a href="{{ route('items.create') }}">Add an application here</a> or <a id="pin-item" href="">Pin an item to the dash</a></p>
</div>
</div>
<div id="sortable">
@include('add')
</div>
@endif