Initial commit
This commit is contained in:
commit
b105bd7db7
171 changed files with 28322 additions and 0 deletions
111
resources/views/panel/home.blade.php
Normal file
111
resources/views/panel/home.blade.php
Normal file
|
@ -0,0 +1,111 @@
|
|||
@extends('layouts.admin')
|
||||
|
||||
@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">
|
||||
{{ 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
|
||||
<div class="row">
|
||||
<div class="col-lg-3 col-xs-6">
|
||||
<div class="small-box bg-blue-gradient">
|
||||
<div class="inner">
|
||||
<h3>{{ $projects }}</h3>
|
||||
<p>Projects</p>
|
||||
</div>
|
||||
<div class="icon">
|
||||
<i class="fas fa-project-diagram"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-3 col-xs-6">
|
||||
<div class="small-box bg-blue-gradient">
|
||||
<div class="inner">
|
||||
<h3>{{ $finished_projects }}</h3>
|
||||
<p>Finished Projects</p>
|
||||
</div>
|
||||
<div class="icon">
|
||||
<i class="fas fa-terminal"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-3 col-xs-6">
|
||||
<div class="small-box bg-blue-gradient">
|
||||
<div class="inner">
|
||||
<h3>{{ $orders }}</h3>
|
||||
<p>Orders</p>
|
||||
</div>
|
||||
<div class="icon">
|
||||
<i class="fas fa-file-invoice"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-3 col-xs-6">
|
||||
<div class="small-box bg-blue-gradient">
|
||||
<div class="inner">
|
||||
<h3>€{{ $total_paid }}</h3>
|
||||
<p>Total Earned</p>
|
||||
</div>
|
||||
<div class="icon">
|
||||
<i class="fas fa-money-bill"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
133
resources/views/panel/ums/edit.blade.php
Normal file
133
resources/views/panel/ums/edit.blade.php
Normal file
|
@ -0,0 +1,133 @@
|
|||
@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>
|
||||
<small style="float: right"><a class="btn btn-primary" href="{{ route('panel.ums') }}">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.ums.update') }}" class="col-xs-10 col-xs-offset-1">
|
||||
@csrf
|
||||
<input type="number" name="id" value="{{ $user->id }}" style="display: none">
|
||||
|
||||
<div class="form-group @error('email') has-error @enderror">
|
||||
<label for="email" class="text-md-right">{{ __('Email:') }}</label>
|
||||
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><i class="glyphicon glyphicon-envelope"></i></span>
|
||||
<input id="email" type="email" class="form-control" placeholder="Email Address" name="email" value="{{ $user->email }}" required autocomplete="off" autofocus>
|
||||
</div>
|
||||
@error('email')
|
||||
<span class="help-block">{{ $message }}</span>
|
||||
@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
|
||||
</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
|
||||
</select>
|
||||
@error('permissions')
|
||||
<span class="help-block">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<button type="submit" class="btn btn-block btn-primary">{{ __('Edit User') }}</button>
|
||||
</form>
|
||||
</div>
|
||||
</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
|
149
resources/views/panel/ums/index.blade.php
Normal file
149
resources/views/panel/ums/index.blade.php
Normal file
|
@ -0,0 +1,149 @@
|
|||
@extends('layouts.admin')
|
||||
|
||||
@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'))
|
||||
<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>Full Name</th>
|
||||
<th>Role</th>
|
||||
<th class="hidden-xs hidden-sm hidden-md">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>
|
||||
</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">
|
||||
<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>
|
||||
</div>
|
||||
</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
|
62
resources/views/panel/ums/info.blade.php
Normal file
62
resources/views/panel/ums/info.blade.php
Normal file
|
@ -0,0 +1,62 @@
|
|||
@extends('layouts.admin')
|
||||
|
||||
@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>
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
Reference in a new issue