Lot's of bug fixes
This commit is contained in:
parent
ad320963fc
commit
7718ed6c32
196 changed files with 51167 additions and 3010 deletions
|
@ -2,49 +2,6 @@
|
|||
|
||||
@section('page', 'Dashboard')
|
||||
|
||||
@section('navigation')
|
||||
<li class="treeview">
|
||||
<a>
|
||||
<i class="fas fa-user"></i> <span>Account</span>
|
||||
<span class="pull-right-container"><i class="fa fa-angle-left pull-right"></i></span>
|
||||
</a>
|
||||
<ul class="treeview-menu">
|
||||
<li><a href="{{ route('panel.profile') }}"><i class="fas fa-id-badge"></i> Profile</a></li>
|
||||
<li><a href="{{ route('panel.change') }}"><i class="fas fa-clipboard"></i> Change</a></li>
|
||||
<li class="hidden-xs"><a href="{{ route('panel.security') }}"><i class="fas fa-lock"></i> Security</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="header">NAVIGATION</li>
|
||||
<li class="active">
|
||||
<a><i class="fas fa-tachometer-alt"></i> <span>Dashboard</span></a>
|
||||
</li>
|
||||
@canany(['project_see', 'status_see'])
|
||||
<li class="treeview">
|
||||
<a>
|
||||
<i class="fas fa-list"></i> <span>Projects</span>
|
||||
<span class="pull-right-container"><i class="fa fa-angle-left pull-right"></i></span>
|
||||
</a>
|
||||
<ul class="treeview-menu">
|
||||
@can('project_see')<li><a href="{{ route('panel.project') }}"><i class="fas fa-clipboard"></i> Project</a></li>@endcan
|
||||
@can('order_see')<li><a href="{{ route('panel.order') }}"><i class="fas fa-file-invoice"></i> Order</a></li>@endcan
|
||||
@can('status_see')<li><a href="{{ route('panel.status') }}"><i class="fas fa-clipboard"></i> Status</a></li>@endcan
|
||||
</ul>
|
||||
</li>
|
||||
@endcanany
|
||||
@canany(['roles_see', 'user_see'])
|
||||
<li class="treeview">
|
||||
<a>
|
||||
<i class="fas fa-user"></i> <span>Management</span>
|
||||
<span class="pull-right-container"><i class="fa fa-angle-left pull-right"></i></span>
|
||||
</a>
|
||||
<ul class="treeview-menu">
|
||||
@can('user_see')<li><a href="{{ route('panel.ums') }}"><i class="fas fa-id-badge"></i> Users</a></li>@endcan
|
||||
@can('roles_see')<li><a href="{{ route('panel.role') }}"><i class="fas fa-lock"></i> Roles</a></li>@endcan
|
||||
</ul>
|
||||
</li>
|
||||
@endcanany
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
@if(session('error'))
|
||||
<div class="alert alert-danger" role="alert">
|
||||
|
@ -61,49 +18,49 @@
|
|||
@endif
|
||||
<div class="row">
|
||||
<div class="col-lg-3 col-xs-6">
|
||||
<div class="small-box bg-blue-gradient">
|
||||
<div class="small-box bg-green-gradient">
|
||||
<div class="inner">
|
||||
<h3>{{ $projects }}</h3>
|
||||
<p>Projects</p>
|
||||
<h3>{{ $users }}</h3>
|
||||
<p>User{{ $users != 1 ? 's' : '' }}</p>
|
||||
</div>
|
||||
<div class="icon">
|
||||
<i class="fas fa-project-diagram"></i>
|
||||
<i class="fas fa-users"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-3 col-xs-6">
|
||||
<div class="small-box bg-blue-gradient">
|
||||
<div class="small-box bg-green-gradient">
|
||||
<div class="inner">
|
||||
<h3>{{ $finished_projects }}</h3>
|
||||
<p>Finished Projects</p>
|
||||
<h3>{{ $regions }}</h3>
|
||||
<p>Region{{ $regions != 1 ? 's' : '' }}</p>
|
||||
</div>
|
||||
<div class="icon">
|
||||
<i class="fas fa-terminal"></i>
|
||||
<i class="fas fa-list-ul"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-3 col-xs-6">
|
||||
<div class="small-box bg-blue-gradient">
|
||||
<div class="small-box bg-green-gradient">
|
||||
<div class="inner">
|
||||
<h3>{{ $orders }}</h3>
|
||||
<p>Orders</p>
|
||||
<h3>{{ $attractions }}</h3>
|
||||
<p>Attraction{{ $attractions != 1 ? 's' : '' }}</p>
|
||||
</div>
|
||||
<div class="icon">
|
||||
<i class="fas fa-file-invoice"></i>
|
||||
<i class="fas fa-train"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-3 col-xs-6">
|
||||
<div class="small-box bg-blue-gradient">
|
||||
<div class="small-box bg-green-gradient">
|
||||
<div class="inner">
|
||||
<h3>€{{ $total_paid }}</h3>
|
||||
<p>Total Earned</p>
|
||||
<h3>{{ $shows }}</h3>
|
||||
<p>Show{{ $shows != 1 ? 's' : '' }}</p>
|
||||
</div>
|
||||
<div class="icon">
|
||||
<i class="fas fa-money-bill"></i>
|
||||
<i class="fas fa-theater-masks"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
72
resources/views/panel/message.blade.php
Normal file
72
resources/views/panel/message.blade.php
Normal file
|
@ -0,0 +1,72 @@
|
|||
@extends('layouts.admin')
|
||||
|
||||
@section('css')
|
||||
<link rel="stylesheet" href="{{ asset('assets/minified/themes/default.min.css') }}"/>
|
||||
@endsection
|
||||
|
||||
@section('page', 'Dashboard')
|
||||
|
||||
@section('content')
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-lg-12 col-md-8col-xs-12 col-sm-12">
|
||||
@php($message = \App\Message::orderByDesc('id')->first())
|
||||
@if(!empty($message))
|
||||
<div class="panel panel-theme news">
|
||||
<div class="panel-heading">
|
||||
@php($time = strtotime($message->created_at))
|
||||
<h3 class="panel-title">{{ \App\Cache\Cache::getUsername($message->uuid) }}<span style="float: right">{{ date('d-m-Y', $time) }} at {{ date('H:m', $time) }}</span></h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="container-fluid">
|
||||
{!! $message->content !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="box box-success col-lg-12 col-md-12 hidden-xs hidden-sm">
|
||||
<div class="box-header">
|
||||
<h4>Edit Message</h4>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<form method="post" action="">
|
||||
@csrf
|
||||
|
||||
@if(session('error'))
|
||||
<div class="alert alert-danger" role="alert">
|
||||
{{ session('error') }}
|
||||
<a class="close" data-dismiss="alert" aria-label="close">×</a>
|
||||
</div>
|
||||
|
||||
@elseif(session('success'))
|
||||
<div class="alert alert-success" role="alert">
|
||||
{{ session('success') }}
|
||||
<a class="close" data-dismiss="alert" aria-label="close">×</a>
|
||||
</div>
|
||||
|
||||
@endif
|
||||
<textarea id="editor" name="message" class="editor" placeholder="Message">{!! !empty($message) ? $message->content : '' !!}</textarea>
|
||||
<button class="btn btn-primary btn-block" type="submit" name="submit" style="margin-top: 5px">Post Message</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('javascript')
|
||||
<script src="{{ asset('assets/minified/sceditor.min.js') }}"></script>
|
||||
<script>
|
||||
var textarea = document.getElementById("editor");
|
||||
sceditor.create(textarea, {
|
||||
plugins: 'undo, autosave',
|
||||
format: 'bbcode',
|
||||
style: '{{ asset('assets/minified/themes/default.min.css') }}',
|
||||
emoticonsRoot: '{{ asset('assets/img').'/' }}',
|
||||
locale: 'en',
|
||||
width: '100%'
|
||||
});
|
||||
</script>
|
||||
@endsection
|
100
resources/views/panel/show/create.blade.php
Normal file
100
resources/views/panel/show/create.blade.php
Normal file
|
@ -0,0 +1,100 @@
|
|||
@extends('layouts.admin')
|
||||
|
||||
@section('page', 'Show Manager')
|
||||
|
||||
@section('content')
|
||||
<div class="col-xs-12 col-lg-6 col-lg-offset-3 col-md-8 col-md-offset-2">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title" style="margin-top: 8px">Add Show</h3>
|
||||
<small style="float: right"><a class="btn btn-primary" href="{{ route('panel.show') }}">Back</a></small>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
@if(session('error'))
|
||||
<div class="alert alert-success" role="alert">
|
||||
{{ session('error') }}
|
||||
<a class="close" data-dismiss="alert" aria-label="close">×</a>
|
||||
</div>
|
||||
|
||||
@endif
|
||||
<form method="POST" action="{{ route('panel.show.create') }}" class="col-xs-10 col-xs-offset-1">
|
||||
@csrf
|
||||
|
||||
<div class="form-group @error('title') has-error @enderror">
|
||||
<label for="title" class="text-md-right">{{ __('Title:') }}</label>
|
||||
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><i class="glyphicon glyphicon-tag"></i></span>
|
||||
<input id="title" type="text" class="form-control" placeholder="Title" name="title" required autocomplete="off" autofocus>
|
||||
</div>
|
||||
@error('title')
|
||||
<span class="help-block">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div class="form-group @error('description') has-error @enderror">
|
||||
<label for="description" class="text-md-right">{{ __('Description:') }}</label>
|
||||
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><i class="glyphicon glyphicon-envelope"></i></span>
|
||||
<textarea id="description" class="form-control" placeholder="Description" name="description" required autofocus style="height: 150px; resize: none"></textarea>
|
||||
</div>
|
||||
@error('description')
|
||||
<span class="help-block">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div class="form-group @error('price') has-error @enderror">
|
||||
<label for="price" class="text-md-right">{{ __('Price:') }}</label>
|
||||
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><i class="glyphicon glyphicon-euro"></i></span>
|
||||
<input id="price" type="number" step="0.01" class="form-control" placeholder="Price" name="price" required autocomplete="off" autofocus>
|
||||
</div>
|
||||
@error('price')
|
||||
<span class="help-block">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div class="form-group @error('vault_price') has-error @enderror">
|
||||
<label for="vault_price" class="text-md-right">{{ __('Vault Price:') }}</label>
|
||||
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><i class="glyphicon glyphicon-euro"></i></span>
|
||||
<input id="vault_price" type="number" step="0.01" class="form-control" placeholder="Vault Price" name="vault_price" required autocomplete="off" autofocus>
|
||||
</div>
|
||||
@error('vault_price')
|
||||
<span class="help-block">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div class="form-group @error('seats') has-error @enderror">
|
||||
<label for="seats" class="text-md-right">{{ __('Seats:') }}</label>
|
||||
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><i class="glyphicon glyphicon-user"></i></span>
|
||||
<input id="seats" type="number" step="1" min="1" value="1" class="form-control" placeholder="Seats" name="seats" required autocomplete="off" autofocus>
|
||||
</div>
|
||||
@error('seats')
|
||||
<span class="help-block">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div class="form-group @error('image') has-error @enderror">
|
||||
<label for="image" class="text-md-right">{{ __('Image:') }}</label>
|
||||
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><i class="glyphicon glyphicon-picture"></i></span>
|
||||
<input id="image" type="text" class="form-control" placeholder="Image" name="image" required autocomplete="off" autofocus>
|
||||
</div>
|
||||
@error('image')
|
||||
<span class="help-block">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<button type="submit" class="btn btn-block btn-primary">{{ __('Add Show') }}</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
77
resources/views/panel/show/edit.blade.php
Normal file
77
resources/views/panel/show/edit.blade.php
Normal file
|
@ -0,0 +1,77 @@
|
|||
@extends('layouts.admin')
|
||||
|
||||
@section('page', 'Show Manager')
|
||||
|
||||
@section('content')
|
||||
<div class="col-xs-12 col-lg-6 col-lg-offset-3 col-md-8 col-md-offset-2">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title" style="margin-top: 8px"><strong>Title: </strong>{{ $show->title }}</h3>
|
||||
<small style="float: right"><a class="btn btn-primary" href="{{ route('panel.show') }}">Back</a></small>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
@if(session('error'))
|
||||
<div class="alert alert-success" role="alert">
|
||||
{{ session('error') }}
|
||||
<a class="close" data-dismiss="alert" aria-label="close">×</a>
|
||||
</div>
|
||||
|
||||
@endif
|
||||
<form method="POST" action="{{ route('panel.show.update') }}" class="col-xs-10 col-xs-offset-1">
|
||||
@csrf
|
||||
<input name="id" value="{{ $show->id }}" style="display: none">
|
||||
|
||||
<div class="form-group @error('description') has-error @enderror">
|
||||
<label for="description" class="text-md-right">{{ __('Description:') }}</label>
|
||||
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><i class="glyphicon glyphicon-envelope"></i></span>
|
||||
<textarea id="description" class="form-control" placeholder="Description" name="description" required autofocus style="height: 150px; resize: none">{{ $show->description }}</textarea>
|
||||
</div>
|
||||
@error('description')
|
||||
<span class="help-block">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div class="form-group @error('price') has-error @enderror">
|
||||
<label for="price" class="text-md-right">{{ __('Price:') }}</label>
|
||||
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><i class="glyphicon glyphicon-euro"></i></span>
|
||||
<input id="price" type="number" step="0.01" class="form-control" placeholder="Price" name="price" value="{{ $show->price }}" required autocomplete="off" autofocus>
|
||||
</div>
|
||||
@error('price')
|
||||
<span class="help-block">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div class="form-group @error('vault_price') has-error @enderror">
|
||||
<label for="vault_price" class="text-md-right">{{ __('Vault Price:') }}</label>
|
||||
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><i class="glyphicon glyphicon-euro"></i></span>
|
||||
<input id="vault_price" type="number" step="0.01" class="form-control" placeholder="Vault Price" name="vault_price" value="{{ $show->vault_price }}" required autocomplete="off" autofocus>
|
||||
</div>
|
||||
@error('vault_price')
|
||||
<span class="help-block">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div class="form-group @error('image') has-error @enderror">
|
||||
<label for="image" class="text-md-right">{{ __('Image:') }}</label>
|
||||
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><i class="glyphicon glyphicon-picture"></i></span>
|
||||
<input id="image" type="text" class="form-control" placeholder="Image" name="image" value="{{ $show->image }}" required autocomplete="off" autofocus>
|
||||
</div>
|
||||
@error('image')
|
||||
<span class="help-block">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<button type="submit" class="btn btn-block btn-primary">{{ __('Edit Show') }}</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
112
resources/views/panel/show/index.blade.php
Normal file
112
resources/views/panel/show/index.blade.php
Normal file
|
@ -0,0 +1,112 @@
|
|||
@extends('layouts.admin')
|
||||
|
||||
@section('page', 'Show Manager')
|
||||
|
||||
@section('content')
|
||||
<div class="col-lg-8 col-lg-offset-2">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title">Search</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<form id="searchForm">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><i class="glyphicon glyphicon-tag"></i></span>
|
||||
<input id="search" type="text" class="form-control" name="search" value="{{ $search }}" placeholder="Search for Shows by title" autofocus>
|
||||
</div>
|
||||
<button class="btn btn-block btn-primary">{{ __('Search') }}</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-8 col-lg-offset-2">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title" style="margin-top: 8px; width: 100%">Shows<small style="float: right"><a class="btn btn-primary" href="{{ route('panel.show.add') }}">Add</a></small></h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
@if(session('success'))
|
||||
<div class="alert alert-success" role="alert">
|
||||
{{ session('success') }}
|
||||
<a class="close" data-dismiss="alert" aria-label="close">×</a>
|
||||
</div>
|
||||
|
||||
@elseif(session('error'))
|
||||
<div class="alert alert-success" role="alert">
|
||||
{{ session('error') }}
|
||||
<a class="close" data-dismiss="alert" aria-label="close">×</a>
|
||||
</div>
|
||||
|
||||
@endif
|
||||
<table class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>Title</th>
|
||||
<th class="text-center">Price</th>
|
||||
<th class="text-center">Vault Price</th>
|
||||
<th class="text-center">Seats</th>
|
||||
<th class="text-center" style="width: 155px">Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if(!empty($shows->all()))
|
||||
@foreach($shows as $show)
|
||||
<tr>
|
||||
<td>{{ $show->id }}</td>
|
||||
<td>{{ $show->title }}</td>
|
||||
<td class="text-center">€{{ $show->price }}</td>
|
||||
<td class="text-center">{{ $show->vault_price }}</td>
|
||||
<td>{{ $show->seats }}</td>
|
||||
<td style="width: 155px"><a class="btn btn-primary" href="{{ route('panel.show.info', ['id' => $show->id]) }}"><i class="glyphicon glyphicon-info-sign"></i></a> <a class="btn btn-primary" style="margin-left: 2px" href="{{ route('panel.show.edit', ['id' => $show->id]) }}"><i class="glyphicon glyphicon-pencil"></i></a> <a class="btn btn-primary" style="margin-left: 2px" href="{{ route('panel.show.delete', ['id' => $show->id]) }}"><i class="glyphicon glyphicon-trash"></i></a></td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@else
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>No shows found</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
@if(!empty($shows->all()))
|
||||
<nav style="float: right">
|
||||
<ul class="pagination">
|
||||
<li @if($page == 1) class="disabled" @endif>
|
||||
<a @if($page != 1) href="{{ route('panel.ums', ['page' => ($page - 1)]) }}" @endif aria-label="Previous"><span aria-hidden="true">«</span></a>
|
||||
</li>
|
||||
@for($i = 1; $i <= $pages; $i++)
|
||||
<li @if($i == $page) class="active" @endif>
|
||||
<a @if($i != $page)href="{{ route('panel.ums', ['page' => $i]) }}" @endif><span>{{ $i }}</span></a>
|
||||
</li>
|
||||
@endfor
|
||||
<li @if($page == $pages) class="disabled" @endif>
|
||||
<a @if($page != $pages) href="{{ route('panel.ums', ['page' => ($page + 1)]) }}" @endif aria-label="Next"><span aria-hidden="true">»</span></a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('javascript')
|
||||
<script>
|
||||
const search = "{{ $search }}";
|
||||
const route = "{{ route('panel.show', ['page' => 1]) }}";
|
||||
$("form#searchForm").submit(function(e) {
|
||||
e.preventDefault();
|
||||
let term = $("form#searchForm input#search").val();
|
||||
if(term === search)
|
||||
return;
|
||||
|
||||
window.location.replace(route + "/" + term);
|
||||
});
|
||||
</script>
|
||||
@endsection
|
29
resources/views/panel/show/info.blade.php
Normal file
29
resources/views/panel/show/info.blade.php
Normal file
|
@ -0,0 +1,29 @@
|
|||
@extends('layouts.admin')
|
||||
|
||||
@section('page', 'Show Manager')
|
||||
|
||||
@section('content')
|
||||
<div class="col-xs-12 col-lg-6 col-lg-offset-3 col-md-8 col-md-offset-2">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ $show->title }}</h3>
|
||||
<small style="float: right"><a class="btn btn-primary" href="{{ url()->previous() }}">Back</a></small>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-md-6">
|
||||
<p><strong>ID: #</strong>{{ $show->id }}
|
||||
<br><strong>Title:</strong> {{ $show->title }}
|
||||
<br><strong>Description:</strong><br>{{ $show->description }}
|
||||
<br><strong>Price:</strong> €{{ $show->price }}
|
||||
<br><strong>Vault Price:</strong> {{ $show->vault_price }}
|
||||
<br><strong>Seats:</strong> {{ $show->seats }}</p>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-6 text-center" style="padding: 15px">
|
||||
<img src="{{ $show->image }}" alt="Image" style="width: 50%; height: auto; border-radius: 10px">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
107
resources/views/panel/shows/create.blade.php
Normal file
107
resources/views/panel/shows/create.blade.php
Normal file
|
@ -0,0 +1,107 @@
|
|||
@extends('layouts.admin')
|
||||
|
||||
@section('css')
|
||||
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
|
||||
<meta name="csrf-token" content="{{ csrf_token() }}" />
|
||||
@endsection
|
||||
|
||||
@section('page', 'Show Date Manager')
|
||||
|
||||
@section('content')
|
||||
<div class="col-xs-12 col-lg-6 col-lg-offset-3 col-md-8 col-md-offset-2">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title" style="margin-top: 8px">Add Show Date</h3>
|
||||
<small style="float: right"><a class="btn btn-primary" href="{{ route('panel.shows') }}">Back</a></small>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
@if(session('error'))
|
||||
<div class="alert alert-success" role="alert">
|
||||
{{ session('error') }}
|
||||
<a class="close" data-dismiss="alert" aria-label="close">×</a>
|
||||
</div>
|
||||
|
||||
@endif
|
||||
<form method="POST" action="{{ route('panel.shows.create') }}" class="col-xs-10 col-xs-offset-1">
|
||||
@csrf
|
||||
|
||||
<div class="form-group @error('show_id') has-error @enderror">
|
||||
<label for="show_id" class="text-md-right">{{ __('Show ID:') }}</label>
|
||||
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><i class="glyphicon glyphicon-tag"></i></span>
|
||||
<input id="show_id" type="text" class="form-control" placeholder="Show ID" name="show_id" required autocomplete="off" autofocus>
|
||||
</div>
|
||||
@error('show_id')
|
||||
<span class="help-block">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div class="form-group @error('date') has-error @enderror">
|
||||
<label for="date" class="text-md-right"><strong>Date:</strong></label>
|
||||
|
||||
<div class="input-group date" id="picker">
|
||||
<span class="input-group-addon">
|
||||
<i class="glyphicon glyphicon-calendar"></i>
|
||||
</span>
|
||||
<input placeholder="Date" type="text" name="date" class="form-control">
|
||||
</div>
|
||||
@error('date')
|
||||
<span class="help-block">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<button type="submit" class="btn btn-block btn-primary">{{ __('Add Show Date') }}</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('javascript')
|
||||
<script src="https://cdn.jsdelivr.net/momentjs/2.14.1/moment.min.js"></script>
|
||||
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/4.17.37/js/bootstrap-datetimepicker.min.js"></script>
|
||||
<script>
|
||||
$(function () {
|
||||
$('#picker').datetimepicker({
|
||||
format: "DD-MM-YYYY HH:mm",
|
||||
minDate: moment()
|
||||
});
|
||||
|
||||
$.ajaxSetup({
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
|
||||
}
|
||||
});
|
||||
|
||||
$("#show_id").autocomplete({
|
||||
source: function( request, response ) {
|
||||
$.ajax({
|
||||
url: '{{ route('panel.shows.search') }}',
|
||||
type:'POST',
|
||||
dataType: "json",
|
||||
data: {
|
||||
searchText: request.term
|
||||
},
|
||||
success: function (data) {
|
||||
response($.map(data, function (item) {
|
||||
return {
|
||||
label: '#'+item.id+' Title: '+item.title,
|
||||
value: item.id
|
||||
};
|
||||
}));
|
||||
}
|
||||
});
|
||||
},
|
||||
minLength: 3,
|
||||
open: function() {
|
||||
$(this).removeClass("ui-corner-all").addClass("ui-corner-top");
|
||||
},
|
||||
close: function() {
|
||||
$(this).removeClass("ui-corner-top").addClass("ui-corner-all");
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endsection
|
108
resources/views/panel/shows/index.blade.php
Normal file
108
resources/views/panel/shows/index.blade.php
Normal file
|
@ -0,0 +1,108 @@
|
|||
@extends('layouts.admin')
|
||||
|
||||
@section('page', 'Show Date Manager')
|
||||
|
||||
@section('content')
|
||||
<div class="col-lg-8 col-lg-offset-2">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title">Search</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<form id="searchForm">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><i class="glyphicon glyphicon-tag"></i></span>
|
||||
<input id="search" type="text" class="form-control" name="search" value="{{ $search }}" placeholder="Search for show dates by show title" autofocus>
|
||||
</div>
|
||||
<button class="btn btn-block btn-primary">{{ __('Search') }}</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-8 col-lg-offset-2">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title" style="margin-top: 8px; width: 100%">Show Dates<small style="float: right"><a class="btn btn-primary" href="{{ route('panel.shows.add') }}">Add</a></small></h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
@if(session('success'))
|
||||
<div class="alert alert-success" role="alert">
|
||||
{{ session('success') }}
|
||||
<a class="close" data-dismiss="alert" aria-label="close">×</a>
|
||||
</div>
|
||||
|
||||
@elseif(session('error'))
|
||||
<div class="alert alert-success" role="alert">
|
||||
{{ session('error') }}
|
||||
<a class="close" data-dismiss="alert" aria-label="close">×</a>
|
||||
</div>
|
||||
|
||||
@endif
|
||||
<table class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>Title</th>
|
||||
<th class="text-center">Date</th>
|
||||
<th class="text-center" style="width: 105px">Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if(!empty($dates->all()))
|
||||
@foreach($dates as $date)
|
||||
<tr>
|
||||
<td>{{ $date->id }}</td>
|
||||
<td>{{ $date->title }}</td>
|
||||
<td class="text-center">{{ $date->date }}</td>
|
||||
<td style="width: 105px"><a class="btn btn-primary" href="{{ route('panel.shows.info', ['id' => $date->id]) }}"><i class="glyphicon glyphicon-info-sign"></i></a> <a class="btn btn-primary" style="margin-left: 2px" href="{{ route('panel.shows.delete', ['id' => $date->id]) }}"><i class="glyphicon glyphicon-trash"></i></a></td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@else
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>No show dates found</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
@if(!empty($dates->all()))
|
||||
<nav style="float: right">
|
||||
<ul class="pagination">
|
||||
<li @if($page == 1) class="disabled" @endif>
|
||||
<a @if($page != 1) href="{{ route('panel.ums', ['page' => ($page - 1)]) }}" @endif aria-label="Previous"><span aria-hidden="true">«</span></a>
|
||||
</li>
|
||||
@for($i = 1; $i <= $pages; $i++)
|
||||
<li @if($i == $page) class="active" @endif>
|
||||
<a @if($i != $page)href="{{ route('panel.ums', ['page' => $i]) }}" @endif><span>{{ $i }}</span></a>
|
||||
</li>
|
||||
@endfor
|
||||
<li @if($page == $pages) class="disabled" @endif>
|
||||
<a @if($page != $pages) href="{{ route('panel.ums', ['page' => ($page + 1)]) }}" @endif aria-label="Next"><span aria-hidden="true">»</span></a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('javascript')
|
||||
<script>
|
||||
const search = "{{ $search }}";
|
||||
const route = "{{ route('panel.shows', ['page' => 1]) }}";
|
||||
$("form#searchForm").submit(function(e) {
|
||||
e.preventDefault();
|
||||
let term = $("form#searchForm input#search").val();
|
||||
if(term === search)
|
||||
return;
|
||||
|
||||
window.location.replace(route + "/" + term);
|
||||
});
|
||||
</script>
|
||||
@endsection
|
28
resources/views/panel/shows/info.blade.php
Normal file
28
resources/views/panel/shows/info.blade.php
Normal file
|
@ -0,0 +1,28 @@
|
|||
@extends('layouts.admin')
|
||||
|
||||
@section('page', 'Show Date Manager')
|
||||
|
||||
@section('content')
|
||||
<div class="col-xs-12 col-lg-6 col-lg-offset-3 col-md-8 col-md-offset-2">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ $show->title }}</h3>
|
||||
<small style="float: right"><a class="btn btn-primary" href="{{ url()->previous() }}">Back</a></small>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-md-6">
|
||||
@php($time = strtotime($date->date))
|
||||
<p><strong>ID: #</strong>{{ $show->id }}
|
||||
<br><strong>Title:</strong> {{ $show->title }}
|
||||
<br><strong>Seats:</strong> {{ $filled }}/{{ $show->seats }}
|
||||
<br><strong>Date:</strong> {{ date('d-m-Y', $time) }} at {{ date('H:i', $time) }}</p>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-6 text-center" style="padding: 15px">
|
||||
<img src="{{ $show->image }}" alt="Image" style="width: 50%; height: auto; border-radius: 10px">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
|
@ -1,57 +1,12 @@
|
|||
@extends('layouts.admin')
|
||||
|
||||
@section('css')
|
||||
<link href="{{ asset('assets/css/bootstrap-multiselect.css') }}" rel="stylesheet">
|
||||
@endsection
|
||||
|
||||
@section('page', 'User Manager')
|
||||
|
||||
@section('navigation')
|
||||
<li class="treeview">
|
||||
<a>
|
||||
<i class="fas fa-user"></i> <span>Account</span>
|
||||
<span class="pull-right-container"><i class="fa fa-angle-left pull-right"></i></span>
|
||||
</a>
|
||||
<ul class="treeview-menu">
|
||||
<li><a href="{{ route('panel.profile') }}"><i class="fas fa-id-badge"></i> Profile</a></li>
|
||||
<li><a href="{{ route('panel.change') }}"><i class="fas fa-clipboard"></i> Change</a></li>
|
||||
<li class="hidden-xs"><a href="{{ route('panel.security') }}"><i class="fas fa-lock"></i> Security</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="header">NAVIGATION</li>
|
||||
<li>
|
||||
<a href="{{ route('panel.home') }}"><i class="fas fa-tachometer-alt"></i> <span>Dashboard</span></a>
|
||||
</li>
|
||||
@canany(['project_see', 'status_see'])
|
||||
<li class="treeview">
|
||||
<a>
|
||||
<i class="fas fa-list"></i> <span>Projects</span>
|
||||
<span class="pull-right-container"><i class="fa fa-angle-left pull-right"></i></span>
|
||||
</a>
|
||||
<ul class="treeview-menu">
|
||||
@can('project_see')<li><a href="{{ route('panel.project') }}"><i class="fas fa-clipboard"></i> Project</a></li>@endcan
|
||||
@can('order_see')<li><a href="{{ route('panel.order') }}"><i class="fas fa-file-invoice"></i> Order</a></li>@endcan
|
||||
@can('status_see')<li><a href="{{ route('panel.status') }}"><i class="fas fa-clipboard"></i> Status</a></li>@endcan
|
||||
</ul>
|
||||
</li>
|
||||
@endcanany
|
||||
<li class="active treeview menu-open">
|
||||
<a>
|
||||
<i class="fas fa-user"></i> <span>Management</span>
|
||||
<span class="pull-right-container"><i class="fa fa-angle-left pull-right"></i></span>
|
||||
</a>
|
||||
<ul class="treeview-menu">
|
||||
<li class="active"><a><i class="fas fa-id-badge"></i> Users</a></li>
|
||||
@can('roles_see')<li><a href="{{ route('panel.role') }}"><i class="fas fa-lock"></i> Roles</a></li>@endcan
|
||||
</ul>
|
||||
</li>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="col-xs-12 col-lg-6 col-lg-offset-3 col-md-8 col-md-offset-2">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title" style="margin-top: 8px"><strong>#{{ $user->id }}: </strong>{{ $user->fullname() }}</h3>
|
||||
<h3 class="box-title" style="margin-top: 8px"><strong>Username: </strong>{{ $user->username() }}</h3>
|
||||
<small style="float: right"><a class="btn btn-primary" href="{{ route('panel.ums') }}">Back</a></small>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
|
@ -78,35 +33,23 @@
|
|||
@enderror
|
||||
</div>
|
||||
|
||||
<div class="form-group @error('roles') has-error @enderror">
|
||||
<label for="roles" class="text-md-right">{{ __('Roles:') }}</label>
|
||||
|
||||
<select class="form-control" id="roles" name="roles[]" multiple>
|
||||
@if(!empty($roles))
|
||||
@foreach($roles as $role)
|
||||
<option value="{{ $role->name }}" @if($user->hasRole($role->name)) selected @endif >{{ $role->readable_name }}</option>
|
||||
@endforeach
|
||||
@endif
|
||||
<div class="form-group">
|
||||
<label>Verified:</label>
|
||||
<select name="verified" class="form-control" style="width: 100%;" tabindex="-1" aria-hidden="true">
|
||||
<option value="0" @if(empty($user->email_verified_at)) selected="selected" @endif >Unverified</option>
|
||||
<option value="1" @if(!empty($user->email_verified_at)) selected="selected" @endif >Verified</option>
|
||||
</select>
|
||||
@error('roles')
|
||||
<span class="help-block">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div class="form-group @error('permissions') has-error @enderror">
|
||||
<label for="permissions" class="text-md-right">{{ __('Permissions:') }}</label>
|
||||
|
||||
<select class="form-control" id="permissions" name="permissions[]" multiple>
|
||||
@if(!empty($permissions))
|
||||
@foreach($permissions as $permission)
|
||||
<option value="{{ $permission->name }}" @if($user->hasDirectPermission($permission->name)) selected @endif >{{ $permission->name }}</option>
|
||||
@endforeach
|
||||
@endif
|
||||
@if(Auth::user()->is_root)
|
||||
<div class="form-group">
|
||||
<label>Role:</label>
|
||||
<select name="admin" class="form-control" style="width: 100%;" tabindex="-1" aria-hidden="true">
|
||||
<option value="0" @if(!$user->is_admin && !$user->is_root) selected="selected" @endif >Normal</option>
|
||||
<option value="1" @if($user->is_admin && !$user->is_root) selected="selected" @endif >Admin</option>
|
||||
<option value="2" @if(!$user->is_admin && $user->is_root) selected="selected" @endif >Root</option>
|
||||
</select>
|
||||
@error('permissions')
|
||||
<span class="help-block">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<button type="submit" class="btn btn-block btn-primary">{{ __('Edit User') }}</button>
|
||||
</form>
|
||||
|
@ -114,20 +57,3 @@
|
|||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('javascript')
|
||||
<script src="{{ asset('assets/js/bootstrap-multiselect.js') }}"></script>
|
||||
<script>
|
||||
$(function () {
|
||||
$('#roles').multiselect({
|
||||
includeSelectAllOption: true,
|
||||
enableFiltering: true
|
||||
});
|
||||
|
||||
$('#permissions').multiselect({
|
||||
includeSelectAllOption: true,
|
||||
enableFiltering: true
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
|
|
|
@ -2,71 +2,11 @@
|
|||
|
||||
@section('page', 'User Manager')
|
||||
|
||||
@section('navigation')
|
||||
<li class="treeview">
|
||||
<a>
|
||||
<i class="fas fa-user"></i> <span>Account</span>
|
||||
<span class="pull-right-container"><i class="fa fa-angle-left pull-right"></i></span>
|
||||
</a>
|
||||
<ul class="treeview-menu">
|
||||
<li><a href="{{ route('panel.profile') }}"><i class="fas fa-id-badge"></i> Profile</a></li>
|
||||
<li><a href="{{ route('panel.change') }}"><i class="fas fa-clipboard"></i> Change</a></li>
|
||||
<li class="hidden-xs"><a href="{{ route('panel.security') }}"><i class="fas fa-lock"></i> Security</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="header">NAVIGATION</li>
|
||||
<li>
|
||||
<a href="{{ route('panel.home') }}"><i class="fas fa-tachometer-alt"></i> <span>Dashboard</span></a>
|
||||
</li>
|
||||
@canany(['project_see', 'status_see'])
|
||||
<li class="treeview">
|
||||
<a>
|
||||
<i class="fas fa-list"></i> <span>Projects</span>
|
||||
<span class="pull-right-container"><i class="fa fa-angle-left pull-right"></i></span>
|
||||
</a>
|
||||
<ul class="treeview-menu">
|
||||
@can('project_see')<li><a href="{{ route('panel.project') }}"><i class="fas fa-clipboard"></i> Project</a></li>@endcan
|
||||
@can('order_see')<li><a href="{{ route('panel.order') }}"><i class="fas fa-file-invoice"></i> Order</a></li>@endcan
|
||||
@can('status_see')<li><a href="{{ route('panel.status') }}"><i class="fas fa-clipboard"></i> Status</a></li>@endcan
|
||||
</ul>
|
||||
</li>
|
||||
@endcanany
|
||||
<li class="active treeview menu-open">
|
||||
<a>
|
||||
<i class="fas fa-user"></i> <span>Management</span>
|
||||
<span class="pull-right-container"><i class="fa fa-angle-left pull-right"></i></span>
|
||||
</a>
|
||||
<ul class="treeview-menu">
|
||||
<li class="active"><a><i class="fas fa-id-badge"></i> Users</a></li>
|
||||
@can('roles_see')<li><a href="{{ route('panel.role') }}"><i class="fas fa-lock"></i> Roles</a></li>@endcan
|
||||
</ul>
|
||||
</li>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="col-lg-8 col-lg-offset-2">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title">Search</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<form id="searchForm">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><i class="glyphicon glyphicon-tag"></i></span>
|
||||
<input id="search" type="text" class="form-control" name="search" value="{{ $search }}" placeholder="Search for User by name" autofocus>
|
||||
</div>
|
||||
|
||||
<button class="btn btn-block btn-primary">{{ __('Search') }}</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-8 col-lg-offset-2">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title" style="margin-top: 8px">Users</h3>
|
||||
@can('user_edit') <small style="float: right"><a class="btn btn-primary" href="{{ route('panel.ums.add') }}">Add</a></small> @endcan
|
||||
</div>
|
||||
<div class="box-body">
|
||||
@if(session('success'))
|
||||
|
@ -82,35 +22,30 @@
|
|||
</div>
|
||||
|
||||
@endif
|
||||
|
||||
<table class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Full Name</th>
|
||||
<th>Role</th>
|
||||
<th class="hidden-xs hidden-sm hidden-md">Last Active</th>
|
||||
<th>#</th>
|
||||
<th style="width: 30px"></th>
|
||||
<th>UUID</th>
|
||||
<th class="text-center">Role</th>
|
||||
<th class="text-center">Verified</th>
|
||||
<th class="hidden-xs hidden-sm hidden-md text-center">Last Active</th>
|
||||
<th class="text-center" style="width: 155px">Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if(count($users) > 0)
|
||||
@foreach($users as $user)
|
||||
<tr>
|
||||
@php($role = $user->getHighestRole())
|
||||
<td>{{ $user->fullname() }}</td>
|
||||
<td><small><span class="role" style="background-color: {{ $role->color }}">{{ $role->readable_name }}</span></small></td>
|
||||
<td class="hidden-xs hidden-sm hidden-md">@if(!empty($user->last_active)) {{ date('H:i:s d-m-Y', $user->id === Auth::id() ? time() : strtotime($user->last_active)) }} @else {{ __('No Activity') }} @endif</td>
|
||||
<td style="width: 155px"><a class="btn btn-primary" style="margin-left: 4px" href="{{ route('panel.ums.info', ['id' => $user->id]) }}"><i class="glyphicon glyphicon-info-sign"></i></a> @can('user_edit') <a class="btn btn-primary" style="margin-left: 4px" href="{{ route('panel.ums.edit', ['id' => $user->id]) }}"><i class="glyphicon glyphicon-pencil"></i></a><a class="btn btn-primary" style="margin-left: 4px" href="{{ route('panel.ums.delete', ['id' => $user->id]) }}"><i class="glyphicon glyphicon-trash"></i></a> @endcan </td>
|
||||
<td>{{ $user->id }}</td>
|
||||
<td style="width: 30px"><img src="{{ $user->photo() }}" style="width: 25px; height: 25px; border-radius: 3px"></td>
|
||||
<td>{{ $user->fixedUUID() }}</td>
|
||||
<td class="text-center"><span class="text-center bg-green-gradient" style="padding: 8px 15px 8px 15px; border-radius: 3px; color: #fff">{{ ($user->is_root ? 'Root' : ($user->is_admin ? 'Admin' : 'Normal')) }}</span></td>
|
||||
<td class="text-center">{!! $user->email_verified_at != null ? '<i class="fas fa-check yes"></i>' : '<i class="fas fa-times no"></i>' !!}</td>
|
||||
<td class="hidden-xs hidden-sm hidden-md text-center">@if(!empty($user->last_active)) {{ date('H:i:s d-m-Y', $user->id === Auth::id() ? time() : strtotime($user->last_active)) }} @else {{ __('No Activity') }} @endif</td>
|
||||
<td style="width: 155px"><a class="btn btn-primary" href="{{ route('panel.ums.info', ['id' => $user->id]) }}"><i class="glyphicon glyphicon-info-sign"></i></a> <a class="btn btn-primary" style="margin-left: 2px" href="{{ route('panel.ums.edit', ['id' => $user->id]) }}"><i class="glyphicon glyphicon-pencil"></i></a> @if(Auth::user()->is_root) <a class="btn btn-primary" style="margin-left: 2px" href="{{ route('panel.ums.delete', ['id' => $user->id]) }}"><i class="glyphicon glyphicon-trash"></i></a> @endif </td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@else
|
||||
<tr>
|
||||
<td>No Users Found</td>
|
||||
<td></td>
|
||||
<td class="hidden-xs hidden-sm hidden-md"></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
<nav style="float: right">
|
||||
|
@ -132,18 +67,3 @@
|
|||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('javascript')
|
||||
<script>
|
||||
const search = "{{ $search }}";
|
||||
const route = "{{ route('panel.ums', ['page' => 1]) }}";
|
||||
$("form#searchForm").submit(function(e) {
|
||||
e.preventDefault();
|
||||
let term = $("form#searchForm input#search").val();
|
||||
if(term === search)
|
||||
return;
|
||||
|
||||
window.location.replace(route + "/" + term);
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
|
|
|
@ -2,60 +2,20 @@
|
|||
|
||||
@section('page', 'Profile')
|
||||
|
||||
@section('navigation')
|
||||
<li class="treeview">
|
||||
<a>
|
||||
<i class="fas fa-user"></i> <span>Account</span>
|
||||
<span class="pull-right-container"><i class="fa fa-angle-left pull-right"></i></span>
|
||||
</a>
|
||||
<ul class="treeview-menu">
|
||||
<li><a href="{{ route('panel.profile') }}"><i class="fas fa-id-badge"></i> Profile</a></li>
|
||||
<li><a href="{{ route('panel.change') }}"><i class="fas fa-clipboard"></i> Change</a></li>
|
||||
<li class="hidden-xs"><a href="{{ route('panel.security') }}"><i class="fas fa-lock"></i> Security</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="header">NAVIGATION</li>
|
||||
<li>
|
||||
<a href="{{ route('panel.home') }}"><i class="fas fa-tachometer-alt"></i> <span>Dashboard</span></a>
|
||||
</li>
|
||||
@canany(['project_see', 'status_see'])
|
||||
<li class="treeview">
|
||||
<a>
|
||||
<i class="fas fa-list"></i> <span>Projects</span>
|
||||
<span class="pull-right-container"><i class="fa fa-angle-left pull-right"></i></span>
|
||||
</a>
|
||||
<ul class="treeview-menu">
|
||||
@can('project_see')<li><a href="{{ route('panel.project') }}"><i class="fas fa-clipboard"></i> Project</a></li>@endcan
|
||||
@can('order_see')<li><a href="{{ route('panel.order') }}"><i class="fas fa-file-invoice"></i> Order</a></li>@endcan
|
||||
@can('status_see')<li><a href="{{ route('panel.status') }}"><i class="fas fa-clipboard"></i> Status</a></li>@endcan
|
||||
</ul>
|
||||
</li>
|
||||
@endcanany
|
||||
<li class="active treeview menu-open">
|
||||
<a>
|
||||
<i class="fas fa-user"></i> <span>Management</span>
|
||||
<span class="pull-right-container"><i class="fa fa-angle-left pull-right"></i></span>
|
||||
</a>
|
||||
<ul class="treeview-menu">
|
||||
<li class="active"><a><i class="fas fa-id-badge"></i> Users</a></li>
|
||||
@can('roles_see')<li><a href="{{ route('panel.role') }}"><i class="fas fa-lock"></i> Roles</a></li>@endcan
|
||||
</ul>
|
||||
</li>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="col-xs-12 col-lg-6 col-lg-offset-3 col-md-8 col-md-offset-2">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ $user->fullname() }}</h3>
|
||||
<h3 class="box-title">{{ $user->username() }}</h3>
|
||||
<small style="float: right"><a class="btn btn-primary" href="{{ url()->previous() }}">Back</a></small>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<p><strong>ID: </strong>#{{ $user->id }}
|
||||
<br><strong>First Name:</strong> {{ $user->firstname }}
|
||||
<br><strong>Sur Name:</strong> {{ $user->surname }}
|
||||
<p><strong>Roles: </strong>@php($roles = $user->roles->sortBy('index')->all()) @if(!empty($roles)) {!! implode(' ', array_map(function ($v, $k) { return '<small><span class="role" style="background-color: '.$v->color.'">'.$v->readable_name.'</span></small>'; }, $roles, array_keys($roles))) !!} @else <small><span class="role" style="background-color: #7f8c8d">None</span></small> @endif </p>
|
||||
<p><strong>Permissions: </strong>@php($permissions = $user->permissions->all()) @if(!empty($permissions)) {!! implode(' ', array_map(function ($v, $k) { return '<small><span class="role" style="background-color: #7f8c8d">'.$v->name.'</span></small>'; }, $permissions, array_keys($permissions))) !!} @else <small><span class="role" style="background-color: #7f8c8d">None</span></small> @endif </p>
|
||||
<p><strong>ID: #</strong>{{ $user->id }}
|
||||
<br><strong>UUID:</strong> {{ $user->fixedUUID() }}
|
||||
<br><strong>Username:</strong> {{ $user->username() }}
|
||||
<br><strong>Email:</strong> {{ $user->email }}</p>
|
||||
<p><strong>Verified:</strong> {!! $user->email_verified_at != null ? '<i class="fas fa-check yes"></i>' : '<i class="fas fa-times no"></i>' !!}</p>
|
||||
<p><strong>Role:</strong> <span class="text-center bg-green-gradient" style="padding: 8px 15px 8px 15px; border-radius: 3px; color: #fff">{{ ($user->is_root ? 'Root' : ($user->is_admin ? 'Admin' : 'Normal')) }}</span></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Reference in a new issue