add breadcrumbs
This commit is contained in:
parent
de9cb50084
commit
8dd6567ccc
21 changed files with 527 additions and 218 deletions
54
resources/views/settings/access/role/create.blade.php
Normal file
54
resources/views/settings/access/role/create.blade.php
Normal file
|
@ -0,0 +1,54 @@
|
|||
@extends('settings.layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="header">
|
||||
<h3 class="header-title">
|
||||
Create New Role
|
||||
</h3>
|
||||
</div>
|
||||
<div class="box-content">
|
||||
<div>
|
||||
<a href="{{ route('access.role.index') }}" class="pure-button button-small">
|
||||
<i class="fa fa-chevron-left"></i>
|
||||
<span>BACK</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
{!! Form::open(['route' => 'access.role.store', 'method'=>'POST', 'class' => 'pure-form pure-form-aligned']) !!}
|
||||
|
||||
<div class="pure-control-group @if ($errors->has('name')) field-validation-error @endif">
|
||||
{!! Form::label('name', 'Name:', ['class' => 'control-label']) !!}
|
||||
{!! Form::text('name', null, array('placeholder' => 'Name','class' => 'form-control')) !!}
|
||||
<em>*</em>
|
||||
{{-- @if($errors->has('name'))
|
||||
<p class="field-validation-error">
|
||||
{{ $errors->first('name') }}
|
||||
</p>
|
||||
@endif --}}
|
||||
</div>
|
||||
<div class="pure-control-group @if ($errors->has('display_name')) field-validation-error @endif">
|
||||
{!! Form::label('display_name', 'Display Label:', ['class' => 'control-label']) !!}
|
||||
{!! Form::text('display_name', null, array('placeholder' => 'Display Label','class' => 'form-control')) !!}
|
||||
</div>
|
||||
<div class="pure-control-group @if ($errors->has('description')) field-validation-error @endif">
|
||||
{!! Form::label('description', 'Description:', ['class' => 'control-label']) !!}
|
||||
{!! Form::text('description', null, array('placeholder' => 'Description for the role','class' => 'form-control')) !!}
|
||||
</div>
|
||||
|
||||
|
||||
<h5><b>Assign Permissions</b></h5>
|
||||
<div class="pure-control-group checkboxlist @if ($errors->has('roles')) field-validation-error @endif">
|
||||
@foreach ($permissions as $permission)
|
||||
<label for={{"permission". $permission->id }} class="pure-checkbox">
|
||||
<input name="permissions[]" value={{ $permission->id }} type="checkbox" class="form-check-input">
|
||||
{{ $permission->name }}
|
||||
</label>
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
<button type="submit" class="pure-button button-small">Submit</button>
|
||||
{!! Form::close() !!}
|
||||
|
||||
</div>
|
||||
|
||||
@endsection
|
75
resources/views/settings/access/role/edit.blade.php
Normal file
75
resources/views/settings/access/role/edit.blade.php
Normal file
|
@ -0,0 +1,75 @@
|
|||
@extends('settings.layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="header">
|
||||
<h3 class="header-title">
|
||||
<span>Edit role {{ $role->name }}</span>
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<div class="pure-g box-content">
|
||||
|
||||
<div class="pure-u-1 pure-u-md-2-3">
|
||||
<div>
|
||||
<a href="{{ route('access.role.index') }}" class="pure-button button-small">
|
||||
<i class="fa fa-chevron-left"></i>
|
||||
<span>BACK</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@if (count($errors) > 0)
|
||||
<div class="alert alert-danger">
|
||||
<strong>Whoops!</strong> There were some problems with your input.<br><br>
|
||||
<ul>
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div>
|
||||
{!! Form::model($role, ['method' => 'PATCH','route' => ['access.role.update', $role->id], 'class' => 'pure-form pure-form-aligned']) !!}
|
||||
|
||||
<fieldset>
|
||||
<div class="pure-control-group @if ($errors->has('name')) field-validation-error @endif">
|
||||
{!! Form::label('name', 'Name:', ['class' => 'control-label']) !!}
|
||||
{!! Form::text('name', null, array('placeholder' => 'Name','class' => 'form-control')) !!}
|
||||
<em>*</em>
|
||||
</div>
|
||||
<div class="pure-control-group @if ($errors->has('display_name')) field-validation-error @endif">
|
||||
{!! Form::label('display_name', 'Display Label:', ['class' => 'control-label']) !!}
|
||||
{!! Form::text('display_name', null, array('placeholder' => 'Display Label','class' => 'form-control')) !!}
|
||||
</div>
|
||||
<div class="pure-control-group @if ($errors->has('description')) field-validation-error @endif">
|
||||
{!! Form::label('description', 'Description:', ['class' => 'control-label']) !!}
|
||||
{!! Form::text('description', null, array('placeholder' => 'Description for the role','class' => 'form-control')) !!}
|
||||
</div>
|
||||
|
||||
<h5><b>Assign Permissions</b></h5>
|
||||
<div class="pure-control-group checkboxlist @if ($errors->has('roles')) field-validation-error @endif">
|
||||
@foreach ($permissions as $permission)
|
||||
<label for={{"permission". $permission->id }} class="pure-checkbox">
|
||||
<input name="permissions[]" value={{ $permission->id }} {{ (in_array($permission->id, $checkeds)) ? 'checked=checked' : '' }} type="checkbox" class="form-check-input">
|
||||
{{ $permission->name }}
|
||||
</label>
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
<button type="submit" class="pure-button button-small">Save</button>
|
||||
</fieldset>
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="pure-u-1 pure-u-md-1-3">
|
||||
<div class="sidebar">
|
||||
@foreach ($role->perms as $permission)
|
||||
<p>permission: {{ $permission->name }}</p>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@endsection
|
48
resources/views/settings/access/role/role.blade.php
Normal file
48
resources/views/settings/access/role/role.blade.php
Normal file
|
@ -0,0 +1,48 @@
|
|||
@extends('settings.layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="header">
|
||||
<h3 class="header-title">
|
||||
<i class="fa fa-key"></i>
|
||||
<span>Roles Management <span>
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<div class="pure-g box-content">
|
||||
<div class="pure-u-1 pure-u-md-2-3">
|
||||
<a class="pure-button button-small is-primary" href="{{ route('access.role.create') }}">
|
||||
<i class="fa fa-plus-circle"></i>
|
||||
<span>Create New Role</span>
|
||||
</a>
|
||||
<br>
|
||||
<table class="pure-table pure-table-horizontal roles">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Role</th>
|
||||
<th>Permissions</th>
|
||||
<th width="280px">Action</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($roles as $role)
|
||||
<tr>
|
||||
<td>{{ $role->name }}</td>
|
||||
<td>
|
||||
@foreach ($role->perms()->pluck('name') as $permission)
|
||||
<label class="badge badge-success">{{ $permission }}</label>
|
||||
@endforeach
|
||||
</td>
|
||||
<td>
|
||||
<a class="edit" href="{{ route('access.role.edit', $role->id) }}"> Edit Role</a>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@stop
|
67
resources/views/settings/access/user/create.blade.php
Normal file
67
resources/views/settings/access/user/create.blade.php
Normal file
|
@ -0,0 +1,67 @@
|
|||
@extends('settings.layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="header">
|
||||
<h3 class="header-title">
|
||||
Create New User
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
@if (count($errors) > 0)
|
||||
<div class="alert alert-danger">
|
||||
<strong>Whoops!</strong> There were some problems with your input.<br><br>
|
||||
<ul>
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="box-content">
|
||||
<div>
|
||||
<a href="{{ route('access.user.index') }}" class="pure-button button-small">
|
||||
<i class="fa fa-chevron-left"></i>
|
||||
<span>BACK</span>
|
||||
</a>
|
||||
</div>
|
||||
{!! Form::open(['route' => 'access.user.store', 'method'=>'POST', 'class' => 'pure-form pure-form-aligned']) !!}
|
||||
|
||||
<div class="pure-control-group @if ($errors->has('login')) field-validation-error @endif">
|
||||
<label>Login:</label>
|
||||
{!! Form::text('login', null, array('placeholder' => 'Name','class' => 'form-control')) !!}
|
||||
<em>*</em>
|
||||
</div>
|
||||
|
||||
<div class="pure-control-group @if ($errors->has('email')) field-validation-error @endif">
|
||||
<label>Email:</label>
|
||||
{!! Form::text('email', null, array('placeholder' => 'Email','class' => 'form-control')) !!}
|
||||
<em>*</em>
|
||||
</div>
|
||||
|
||||
<div class="pure-control-group @if ($errors->has('password')) field-validation-error @endif">
|
||||
<label>Password:</label>
|
||||
{!! Form::password('password', array('placeholder' => 'Password','class' => 'form-control')) !!}
|
||||
<em>*</em>
|
||||
</div>
|
||||
|
||||
<div class="pure-control-group @if ($errors->has('password')) field-validation-error @endif">
|
||||
<label>Confirm Password:</label>
|
||||
{!! Form::password('password_confirmation', array('placeholder' => 'Confirm Password','class' => 'form-control')) !!}
|
||||
<em>*</em>
|
||||
</div>
|
||||
|
||||
<h5><b>Assign Roles</b></h5>
|
||||
<div class="pure-control-group checkboxlist @if ($errors->has('roles')) field-validation-error @endif">
|
||||
@foreach ($roles as $role)
|
||||
<label for={{"role". $role->id }} class="pure-checkbox">
|
||||
<input name="roles[]" value={{ $role->id }} type="checkbox" class="form-check-input">
|
||||
{{ $role->name }}
|
||||
</label>
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
<button type="submit" class="pure-button button-small">Submit</button>
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
@endsection
|
93
resources/views/settings/access/user/edit.blade.php
Normal file
93
resources/views/settings/access/user/edit.blade.php
Normal file
|
@ -0,0 +1,93 @@
|
|||
@extends('settings.layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="header">
|
||||
<h3 class="header-title">
|
||||
<span>Edit {{ $user->login }}</span>
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="pure-g box-content">
|
||||
<div class="pure-u-1 pure-u-md-2-3">
|
||||
<div>
|
||||
<a href="{{ route('access.user.index') }}" class="pure-button button-small">
|
||||
<i class="fa fa-chevron-left"></i>
|
||||
<span>BACK</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@if (count($errors) > 0)
|
||||
<div class="alert alert-danger">
|
||||
<strong>Whoops!</strong> There were some problems with your input.<br><br>
|
||||
<ul>
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div>
|
||||
{!! Form::model($user, ['method' => 'PATCH','route' => ['access.user.update', $user->id], 'class' => 'pure-form pure-form-aligned']) !!}
|
||||
|
||||
<fieldset>
|
||||
<div class="pure-control-group @if ($errors->has('login')) field-validation-error @endif">
|
||||
<label>Login:</label>
|
||||
{!! Form::text('login', null, array('placeholder' => 'Name','class' => 'form-control')) !!}
|
||||
<em>*</em>
|
||||
</div>
|
||||
|
||||
<div class="pure-control-group @if ($errors->has('email')) field-validation-error @endif">
|
||||
<label>Email:</label>
|
||||
{!! Form::text('email', null, array('placeholder' => 'Email','class' => 'form-control')) !!}
|
||||
<em>*</em>
|
||||
</div>
|
||||
|
||||
<div class="pure-control-group @if ($errors->has('password')) field-validation-error @endif">
|
||||
<label>Password:</label>
|
||||
{!! Form::password('password', array('placeholder' => 'Password','class' => 'form-control')) !!}
|
||||
<em>*</em>
|
||||
</div>
|
||||
|
||||
<div class="pure-control-group @if ($errors->has('password')) field-validation-error @endif">
|
||||
<label>Confirm Password:</label>
|
||||
{!! Form::password('password_confirmation', array('placeholder' => 'Confirm Password','class' => 'form-control')) !!}
|
||||
<em>*</em>
|
||||
</div>
|
||||
|
||||
<h5><b>Assign Roles</b></h5>
|
||||
<div class="pure-control-group checkboxlist @if ($errors->has('roles')) field-validation-error @endif">
|
||||
<!-- <label for="Roles">Assign Roles</label>-->
|
||||
|
||||
|
||||
@foreach ($roles as $role)
|
||||
|
||||
<label for={{"role". $role->id }} class="pure-checkbox">
|
||||
<input name="roles[]" value={{ $role->id }} {{ (in_array($role->id, $checkeds)) ? 'checked=checked' : '' }} type="checkbox" class="form-check-input">
|
||||
{{ $role->name }}
|
||||
</label>
|
||||
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
<button type="submit" class="pure-button button-small">Save</button>
|
||||
|
||||
</fieldset>
|
||||
|
||||
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="pure-u-1 pure-u-md-1-3">
|
||||
<div class="sidebar">
|
||||
@foreach ($user->roles as $role)
|
||||
<p>role: {{ $role->name }}</p>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@endsection
|
63
resources/views/settings/access/user/user.blade.php
Normal file
63
resources/views/settings/access/user/user.blade.php
Normal file
|
@ -0,0 +1,63 @@
|
|||
@extends('settings.layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="header">
|
||||
<h3 class="header-title">
|
||||
<i class="fa fa-users"></i>
|
||||
<span> Users Management</span>
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<div class="pure-g box-content">
|
||||
|
||||
<div class="pure-u-1 pure-u-md-2-3">
|
||||
<a class="pure-button button-small is-primary" href="{{ route('access.user.create') }}">
|
||||
<i class="fa fa-plus-circle"></i>
|
||||
<span>Create New User</span>
|
||||
</a>
|
||||
<br><br>
|
||||
|
||||
@if ($message = Session::get('success'))
|
||||
<div class="alert summary-success">
|
||||
<p>{{ $message }}</p>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<table class="pure-table users">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>No</th>
|
||||
<th>Name</th>
|
||||
<th>Email</th>
|
||||
<th>Roles</th>
|
||||
<th width="280px">Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($users as $key => $user)
|
||||
<tr>
|
||||
<td>{{ ++$i }}</td>
|
||||
<td>{{ $user->login }}</td>
|
||||
<td>{{ $user->email }}</td>
|
||||
<td>
|
||||
@if(!empty($user->roles))
|
||||
@foreach($user->roles as $role)
|
||||
<label class="badge badge-success">{{ $role->name }}</label>
|
||||
@endforeach
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
<a class="edit" href="{{ route('access.user.edit', $user->id) }}"> Edit</a>
|
||||
<span> </span>
|
||||
<a class="delete" href="{{ route('access.user.destroy', $user->id) }}"><span> Delete</span></a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
{!! $users->render() !!}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@stop
|
Loading…
Add table
editor.link_modal.header
Reference in a new issue