First complete upload CasaDoc
This commit is contained in:
@@ -0,0 +1,78 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('page-title', __('Roles'))
|
||||
@section('page-heading', $edit ? $role->name : __('Create New Role'))
|
||||
|
||||
@section('breadcrumbs')
|
||||
<li class="breadcrumb-item">
|
||||
<a href="{{ route('roles.index') }}">@lang('Roles')</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item active">
|
||||
{{ __($edit ? 'Edit' : 'Create') }}
|
||||
</li>
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
|
||||
@include('partials.messages')
|
||||
|
||||
@if ($edit)
|
||||
{!! Form::open(['route' => ['roles.update', $role], 'method' => 'PUT', 'id' => 'role-form']) !!}
|
||||
@else
|
||||
{!! Form::open(['route' => 'roles.store', 'id' => 'role-form']) !!}
|
||||
@endif
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<h5 class="card-title">
|
||||
@lang('Role Details')
|
||||
</h5>
|
||||
<p class="text-muted">
|
||||
@lang('A general role information.')
|
||||
</p>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<div class="form-group">
|
||||
<label for="name">@lang('Name')</label>
|
||||
<input type="text"
|
||||
class="form-control input-solid"
|
||||
id="name"
|
||||
name="name"
|
||||
placeholder="@lang('Role Name')"
|
||||
value="{{ $edit ? $role->name : old('name') }}">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="display_name">@lang('Display Name')</label>
|
||||
<input type="text"
|
||||
class="form-control input-solid"
|
||||
id="display_name"
|
||||
name="display_name"
|
||||
placeholder="@lang('Display Name')"
|
||||
value="{{ $edit ? $role->display_name : old('display_name') }}">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="description">@lang('Description')</label>
|
||||
<textarea name="description"
|
||||
id="description"
|
||||
class="form-control input-solid">{{ $edit ? $role->description : old('description') }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button type="submit" class="btn btn-primary">
|
||||
{{ __($edit ? 'Update Role' : 'Create Role') }}
|
||||
</button>
|
||||
|
||||
@stop
|
||||
|
||||
@section('scripts')
|
||||
@if ($edit)
|
||||
{!! JsValidator::formRequest('Vanguard\Http\Requests\Role\UpdateRoleRequest', '#role-form') !!}
|
||||
@else
|
||||
{!! JsValidator::formRequest('Vanguard\Http\Requests\Role\CreateRoleRequest', '#role-form') !!}
|
||||
@endif
|
||||
@stop
|
||||
@@ -0,0 +1,76 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('page-title', __('Roles'))
|
||||
@section('page-heading', __('Roles'))
|
||||
|
||||
@section('breadcrumbs')
|
||||
<li class="breadcrumb-item active">
|
||||
@lang('Roles')
|
||||
</li>
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
|
||||
@include('partials.messages')
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row mb-3 pb-3 border-bottom-light">
|
||||
<div class="col-lg-12">
|
||||
<div class="float-right">
|
||||
<a href="{{ route('roles.create') }}" class="btn btn-primary btn-rounded">
|
||||
<i class="fas fa-plus mr-2"></i>
|
||||
@lang('Add Role')
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="table-responsive" id="users-table-wrapper">
|
||||
<table class="table table-striped table-borderless">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="min-width-100">@lang('Name')</th>
|
||||
<th class="min-width-150">@lang('Display Name')</th>
|
||||
<th class="min-width-150">@lang('# of users with this role')</th>
|
||||
<th class="text-center">@lang('Action')</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if (count($roles))
|
||||
@foreach ($roles as $role)
|
||||
<tr>
|
||||
<td>{{ $role->name }}</td>
|
||||
<td>{{ $role->display_name }}</td>
|
||||
<td>{{ $role->users_count }}</td>
|
||||
<td class="text-center">
|
||||
<a href="{{ route('roles.edit', $role) }}" class="btn btn-icon"
|
||||
title="@lang('Edit Role')" data-toggle="tooltip" data-placement="top">
|
||||
<i class="fas fa-edit"></i>
|
||||
</a>
|
||||
@if ($role->removable)
|
||||
<a href="{{ route('roles.destroy', $role) }}" class="btn btn-icon"
|
||||
title="@lang('Delete Role')"
|
||||
data-toggle="tooltip"
|
||||
data-placement="top"
|
||||
data-method="DELETE"
|
||||
data-confirm-title="@lang('Please Confirm')"
|
||||
data-confirm-text="@lang('Are you sure that you want to delete this role?')"
|
||||
data-confirm-delete="@lang('Yes, delete it!')">
|
||||
<i class="fas fa-trash"></i>
|
||||
</a>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@else
|
||||
<tr>
|
||||
<td colspan="4"><em>@lang('No records found.')</em></td>
|
||||
</tr>
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@stop
|
||||
Reference in New Issue
Block a user