add publish module
This commit is contained in:
parent
100f6db9a6
commit
ffbbc04206
93 changed files with 8150 additions and 10228 deletions
|
@ -1,57 +1,54 @@
|
|||
@extends('layouts.app')
|
||||
|
||||
@extends('layouts.settings.layout')
|
||||
|
||||
@section('content')
|
||||
|
||||
|
||||
<h2 class="title">Create New Role</h2>
|
||||
<div>
|
||||
<a href="{{ route('role.index') }}" class="pure-button button-small">
|
||||
<div class="header">
|
||||
<h3 class="header-title">
|
||||
Create New Role
|
||||
</h3>
|
||||
</div>
|
||||
<div class="box-content">
|
||||
<div>
|
||||
<a href="{{ route('role.index') }}" class="pure-button button-small">
|
||||
<i class="fa fa-chevron-left"></i>
|
||||
<span>BACK</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{!! Form::open(['route' => 'user.store', 'method'=>'POST', 'class' => 'pure-form pure-form-aligned']) !!}
|
||||
|
||||
<div class="row">
|
||||
|
||||
|
||||
<div class="pure-control-group">
|
||||
{!! Form::label('name', 'Name:', ['class' => 'control-label']) !!}
|
||||
{!! Form::text('name', null, array('placeholder' => 'Name','class' => 'form-control')) !!}
|
||||
<em>*</em>
|
||||
@if($errors->has('name'))
|
||||
{!! Form::open(['route' => '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>
|
||||
|
||||
@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">
|
||||
<!-- <label for="Roles">Assign Roles</label>-->
|
||||
|
||||
<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>
|
||||
|
||||
@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>
|
||||
|
||||
|
||||
<div class="col-xs-12 col-sm-12 col-md-12 text-center">
|
||||
<button type="submit" class="btn btn-primary">Submit</button>
|
||||
</div>
|
||||
<button type="submit" class="pure-button button-small">Submit</button>
|
||||
{!! Form::close() !!}
|
||||
|
||||
</div>
|
||||
|
||||
{!! Form::close() !!}
|
||||
|
||||
|
||||
@endsection
|
|
@ -1,71 +1,70 @@
|
|||
@extends('layouts.app')
|
||||
@extends('layouts.settings.layout')
|
||||
|
||||
@section('content')
|
||||
<div class="header">
|
||||
<h3 class="header-title">
|
||||
<span>Edit role {{ $role->name }}</span>
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<div class="pure-g">
|
||||
<div class="pure-u-1 pure-u-md-2-3">
|
||||
<div class="content">
|
||||
<h1 class="title">Edit {{ $role->login }}</h1>
|
||||
<div class="pure-g box-content">
|
||||
|
||||
<div>
|
||||
<a href="{{ route('role.index') }}" class="pure-button button-small">
|
||||
<i class="fa fa-chevron-left"></i>
|
||||
<span>BACK</span>
|
||||
</a>
|
||||
<div class="pure-u-1 pure-u-md-2-3">
|
||||
<div>
|
||||
<a href="{{ route('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
|
||||
|
||||
@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' => ['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>
|
||||
|
||||
<div>
|
||||
|
||||
{!! Form::model($role, ['method' => 'PATCH','route' => ['role.update', $role->id], 'class' => 'pure-form pure-form-aligned']) !!}
|
||||
<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>
|
||||
|
||||
<fieldset>
|
||||
<div class="pure-control-group @if ($errors->has('login')) field-validation-error @endif">
|
||||
{!! Form::label('name', 'Name:', ['class' => 'control-label']) !!}
|
||||
{!! Form::text('name', null, array('placeholder' => 'Name','class' => 'form-control')) !!}
|
||||
<em>*</em>
|
||||
</div>
|
||||
|
||||
|
||||
<h5><b>Assign Permissions</b></h5>
|
||||
<div class="pure-control-group checkboxlist @if ($errors->has('roles')) field-validation-error @endif">
|
||||
<!-- <label for="Roles">Assign Permissions</label>-->
|
||||
|
||||
|
||||
@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 pure-button-primary">Save</button>
|
||||
|
||||
</fieldset>
|
||||
|
||||
|
||||
{!! Form::close() !!}
|
||||
|
||||
</div>
|
||||
</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->permissions as $permission)
|
||||
@foreach ($role->perms as $permission)
|
||||
<p>permission: {{ $permission->name }}</p>
|
||||
@endforeach
|
||||
</div>
|
||||
|
|
|
@ -1,29 +1,27 @@
|
|||
@extends('layouts.app')
|
||||
@extends('layouts.settings.layout')
|
||||
|
||||
@section('content')
|
||||
<div class="pure-g">
|
||||
<div class="pure-u-1 pure-u-md-2-3">
|
||||
<div class="header">
|
||||
<h3 class="header-title">
|
||||
<i class="fa fa-key"></i>
|
||||
<span>Roles Management <span>
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<div class="content">
|
||||
<div class="title">
|
||||
<h2><i class="fa fa-key"></i> Roles Management
|
||||
</h2>
|
||||
</div>
|
||||
|
||||
<a class="pure-button button-small is-primary" href="{{ route('role.create') }}">
|
||||
<i class="fa fa-plus-circle"></i>
|
||||
<span>Create New Role</span>
|
||||
</a>
|
||||
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="pure-table roles">
|
||||
<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('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>
|
||||
|
@ -31,21 +29,20 @@
|
|||
<tr>
|
||||
<td>{{ $role->name }}</td>
|
||||
<td>
|
||||
@foreach ($role->permissions()->pluck('name') as $permission)
|
||||
@foreach ($role->perms()->pluck('name') as $permission)
|
||||
<label class="badge badge-success">{{ $permission }}</label>
|
||||
@endforeach
|
||||
</td>
|
||||
<td>
|
||||
<a class="edit" href="{{ route('role.edit', $role->id) }}"> Edit Role</a>
|
||||
<a class="edit" href="{{ route('role.edit', $role->id) }}"> Edit Role</a>
|
||||
</td>
|
||||
|
||||
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@stop
|
Loading…
Add table
editor.link_modal.header
Reference in a new issue