add publish module

This commit is contained in:
Arno Kaimbacher 2018-08-29 17:18:15 +02:00
parent 100f6db9a6
commit ffbbc04206
93 changed files with 8150 additions and 10228 deletions

View file

@ -1,20 +1,13 @@
@extends('layouts.app')
@extends('layouts.settings.layout')
@section('content')
<h2 class="title">Create New User</h2>
<div>
<a href="{{ route('user.index') }}" class="pure-button button-small">
<i class="fa fa-chevron-left"></i>
<span>BACK</span>
</a>
</div>
<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>
@ -25,69 +18,50 @@
</div>
@endif
{!! Form::open(['route' => 'user.store', 'method'=>'POST', 'class' => 'pure-form pure-form-aligned']) !!}
<div class="row">
<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 class="box-content">
<div>
<a href="{{ route('user.index') }}" class="pure-button button-small">
<i class="fa fa-chevron-left"></i>
<span>BACK</span>
</a>
</div>
{!! Form::open(['route' => '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('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 }} type="checkbox" class="form-check-input">
{{ $role->name }}
</label>
@endforeach
</div>
<!--
<div class="col-xs-12 col-sm-12 col-md-12">
<div class="form-group">
<strong>Role:</strong>
{!! Form::select('roles[]', $roles,[], array('class' => 'form-control','multiple')) !!}
<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>-->
<div class="col-xs-12 col-sm-12 col-md-12 text-center">
<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>
<button type="submit" class="btn btn-primary">Submit</button>
<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>
</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>
{!! Form::close() !!}
@endsection

View file

@ -1,12 +1,15 @@
@extends('layouts.app')
@extends('layouts.settings.layout')
@section('content')
<div class="header">
<h3 class="header-title">
<span>Edit {{ $user->login }}</span>
</h3>
</div>
<div class="pure-g">
<div class="pure-u-1 pure-u-md-2-3">
<div class="content">
<h1 class="title">Edit {{ $user->login }}</h1>
<div class="pure-g box-content">
<div class="pure-u-1 pure-u-md-2-3">
<div>
<a href="{{ route('user.index') }}" class="pure-button button-small">
<i class="fa fa-chevron-left"></i>
@ -26,58 +29,55 @@
@endif
<div>
{!! Form::model($user, ['method' => 'PATCH','route' => ['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>
{!! Form::model($user, ['method' => 'PATCH','route' => ['user.update', $user->id], 'class' => 'pure-form pure-form-aligned']) !!}
<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>
<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>
@endforeach
</div>
<button type="submit" class="pure-button pure-button-primary">Save</button>
</fieldset>
<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>
{!! Form::close() !!}
<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>
</div>
</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">

View file

@ -1,67 +1,63 @@
@extends('layouts.app')
@extends('layouts.settings.layout')
@section('content')
<div class="pure-g">
<div class="header">
<h3 class="header-title">
<i class="fa fa-users"></i>
<span> Users Management</span>
</h3>
</div>
<div class="pure-u-1 pure-u-md-2-3">
<div class="content">
<div class="pure-g box-content">
<div class="title">
<h2><i class="fa fa-users"></i> Users Management</h2>
</div>
<a class="pure-button button-small is-primary" href="{{ route('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 alert-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->getRoleNames()))
@foreach($user->getRoleNames() as $roleName)
<label class="badge badge-success">{{ $roleName }}</label>
@endforeach
@endif
</td>
<td>
<a class="edit" href="{{ route('user.edit',$user->id) }}">&nbsp;Edit</a>
<span>&nbsp;</span>
<a class="delete" href="{{ route('user.destroy', $user->id) }}"><span>&nbsp;Delete</span></a>
</td>
</tr>
@endforeach
</tbody>
</table>
{!! $users->render() !!}
<div class="pure-u-1 pure-u-md-2-3">
<a class="pure-button button-small is-primary" href="{{ route('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('user.edit',$user->id) }}">&nbsp;Edit</a>
<span>&nbsp;</span>
<a class="delete" href="{{ route('user.destroy', $user->id) }}"><span>&nbsp;Delete</span></a>
</td>
</tr>
@endforeach
</tbody>
</table>
{!! $users->render() !!}
</div>
</div>
@stop