Skip to content

Commit 13f9478

Browse files
committed
fixed max nesting lvl
1 parent 964e2fe commit 13f9478

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+1860
-2
lines changed

app/Authentication/AuthenticationServiceProvider.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ public function boot()
7171
require __DIR__ . "/validators.php";
7272
// package routes
7373
require __DIR__ . '/../Http/routes.php';
74+
// other bootstrap commands
75+
require __DIR__ . '/bootstrap.php';
7476

7577
$this->registerCommands();
7678

app/Authentication/bootstrap.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<?php
2+
// increase max nesting level
3+
ini_set('xdebug.max_nesting_level', 250);
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
@extends('laravel-authentication-acl::admin.layouts.baseauth')
2+
@section('title')
3+
Admin login
4+
@stop
5+
@section('container')
6+
<div class="row centered-form">
7+
<div class="col-xs-12 col-sm-8 col-md-4 col-sm-offset-2 col-md-offset-4">
8+
<div class="panel panel-info">
9+
<div class="panel-heading">
10+
<h3 class="panel-title bariol-thin">Login to {!!Config::get('acl_base.app_name')!!}</h3>
11+
</div>
12+
<?php $message = Session::get('message'); ?>
13+
@if( isset($message) )
14+
<div class="alert alert-success">{{$message}}</div>
15+
@endif
16+
@if($errors && ! $errors->isEmpty() )
17+
@foreach($errors->all() as $error)
18+
<div class="alert alert-danger">{{$error}}</div>
19+
@endforeach
20+
@endif
21+
<div class="panel-body">
22+
{!! Form::open(array('url' => URL::route("user.login.process"), 'method' => 'post') ) !!}
23+
<div class="row">
24+
<div class="col-xs-12 col-sm-12 col-md-12">
25+
<div class="form-group">
26+
<div class="input-group">
27+
<span class="input-group-addon"><i class="fa fa-envelope"></i></span>
28+
{!! Form::email('email', '', ['id' => 'email', 'class' => 'form-control', 'placeholder' => 'Email address', 'required', 'autocomplete' => 'off']) !!}
29+
</div>
30+
</div>
31+
</div>
32+
</div>
33+
<div class="row">
34+
<div class="col-xs-12 col-sm-12 col-md-12">
35+
<div class="form-group">
36+
<div class="input-group">
37+
<span class="input-group-addon"><i class="fa fa-lock"></i></span>
38+
{!! Form::password('password', ['id' => 'password', 'class' => 'form-control', 'placeholder' => 'Password', 'required', 'autocomplete' => 'off']) !!}
39+
</div>
40+
</div>
41+
</div>
42+
</div>
43+
{!! Form::label('remember','Remember me') !!}
44+
{!! Form::checkbox('remember') !!}
45+
<input type="submit" value="Login" class="btn btn-info btn-block">
46+
{!! Form::close() !!}
47+
<div class="row">
48+
<div class="col-xs-12 col-sm-12 col-md-12 margin-top-10">
49+
{!! link_to_route('user.reminder.process','Forgot password?') !!}
50+
</div>
51+
</div>
52+
</div>
53+
</div>
54+
</div>
55+
</div>
56+
@stop
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
@extends('laravel-authentication-acl::admin.layouts.base-2cols')
2+
3+
@section('title')
4+
Admin area: dashboard
5+
@stop
6+
7+
@section('content')
8+
<div class="row">
9+
<div class="col-md-12 col-sm-12 col-xs-12">
10+
<h3><i class="fa fa-dashboard"></i> Dashboard</h3>
11+
<hr/>
12+
</div>
13+
<div class="col-md-12 col-sm-12 col-xs-12">
14+
<div class="stats-item margin-left-5 margin-bottom-12"><i class="fa fa-user icon-large"></i> <span class="text-large margin-left-15">{!! $registered !!}</span>
15+
<br/>Total users</div>
16+
<div class="stats-item margin-left-5 margin-bottom-12"><i class="fa fa-unlock-alt icon-large"></i> <span class="text-large margin-left-15">{!! $active !!}</span>
17+
<br/>Active users</div>
18+
<div class="stats-item margin-left-5 margin-bottom-12"><i class="fa fa-lock icon-large"></i> <span class="text-large margin-left-15">{!! $pending !!}</span>
19+
<br/>Pending users</div>
20+
<div class="stats-item margin-left-5 margin-bottom-12"><i class="fa fa-ban icon-large"></i> <span class="text-large margin-left-15">{!! $banned !!}</span>
21+
<br/>Banned users</div>
22+
</div>
23+
</div>
24+
@stop
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
@extends('laravel-authentication-acl::admin.layouts.base-2cols')
2+
3+
@section('title')
4+
Admin area: edit group
5+
@stop
6+
7+
@section('content')
8+
<div class="row">
9+
<div class="col-md-12">
10+
{{-- model general errors from the form --}}
11+
@if($errors->has('model') )
12+
<div class="alert alert-danger">{!! $errors->first('model') !!}</div>
13+
@endif
14+
15+
{{-- successful message --}}
16+
<?php $message = Session::get('message'); ?>
17+
@if( isset($message) )
18+
<div class="alert alert-success">{{$message}}</div>
19+
@endif
20+
<div class="panel panel-info">
21+
<div class="panel-heading">
22+
<h3 class="panel-title bariol-thin">{!! isset($group->id) ? '<i class="fa fa-pencil"></i> Edit' : '<i class="fa fa-users"></i> Create' !!} group</h3>
23+
</div>
24+
<div class="panel-body">
25+
<div class="row">
26+
<div class="col-md-6 col-xs-12">
27+
{{-- group base form --}}
28+
<h4>General data</h4>
29+
{!! Form::model($group, [ 'url' => [URL::route('groups.edit'), $group->id], 'method' => 'post'] ) !!}
30+
<!-- name text field -->
31+
<div class="form-group">
32+
{!! Form::label('name','Name: *') !!}
33+
{!! Form::text('name', null, ['class' => 'form-control', 'placeholder' => 'group name']) !!}
34+
</div>
35+
<span class="text-danger">{!! $errors->first('name') !!}</span>
36+
{!! Form::hidden('id') !!}
37+
<a href="{!! URL::route('groups.delete',['id' => $group->id, '_token' => csrf_token()]) !!}" class="btn btn-danger pull-right margin-left-5 delete">Delete</a>
38+
{!! Form::submit('Save', array("class"=>"btn btn-info pull-right ")) !!}
39+
{!! Form::close() !!}
40+
</div>
41+
<div class="col-md-6 col-xs-12">
42+
{{-- group permission form --}}
43+
<h4><i class="fa fa-lock"></i> Permissions</h4>
44+
{{-- permissions --}}
45+
@include('laravel-authentication-acl::admin.group.perm')
46+
</div>
47+
</div>
48+
</div>
49+
</div>
50+
</div>
51+
</div>
52+
@stop
53+
54+
@section('footer_scripts')
55+
<script>
56+
$(".delete").click(function(){
57+
return confirm("Are you sure to delete this item?");
58+
});
59+
</script>
60+
@stop
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<div class="row margin-bottom-12">
2+
<div class="col-md-12">
3+
<a href="{!! URL::route('groups.edit') !!}" class="btn btn-info pull-right"><i class="fa fa-plus"></i> Add New</a>
4+
</div>
5+
</div>
6+
@if( ! $groups->isEmpty() )
7+
<table class="table table-hover">
8+
<thead>
9+
<tr>
10+
<th>Group name</th>
11+
<th>Operations</th>
12+
</tr>
13+
</thead>
14+
<tbody>
15+
@foreach($groups as $group)
16+
<tr>
17+
<td style="width:90%">{!! $group->name !!}</td>
18+
<td style="width:10%">
19+
@if(! $group->protected)
20+
<a href="{!! URL::route('groups.edit', ['id' => $group->id]) !!}"><i class="fa fa-edit fa-2x"></i></a>
21+
<a href="{!! URL::route('groups.delete',['id' => $group->id, '_token' => csrf_token()]) !!}" class="margin-left-5 delete"><i class="fa fa-trash-o fa-2x"></i></a>
22+
<span class="clearfix"></span>
23+
@else
24+
<i class="fa fa-times fa-2x light-blue"></i>
25+
<i class="fa fa-times fa-2x margin-left-12 light-blue"></i>
26+
@endif
27+
</td>
28+
</tr>
29+
@endforeach
30+
</tbody>
31+
</table>
32+
@else
33+
<span class="text-warning"><h5>No results found.</h5></span>
34+
@endif
35+
<div class="paginator">
36+
{!! $groups->appends(Input::except(['page']) )->render() !!}
37+
</div>
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
@extends('laravel-authentication-acl::admin.layouts.base-2cols')
2+
3+
@section('title')
4+
Admin area: Groups list
5+
@stop
6+
7+
@section('content')
8+
9+
<div class="row">
10+
<div class="col-md-12">
11+
<div class="col-md-8">
12+
{{-- print messages --}}
13+
<?php $message = Session::get('message'); ?>
14+
@if( isset($message) )
15+
<div class="alert alert-success">{!! $message !!}</div>
16+
@endif
17+
{{-- print errors --}}
18+
@if($errors && ! $errors->isEmpty() )
19+
@foreach($errors->all() as $error)
20+
<div class="alert alert-danger">{!! $error !!}</div>
21+
@endforeach
22+
@endif
23+
<div class="panel panel-info">
24+
<div class="panel-heading">
25+
<h3 class="panel-title bariol-thin"><i class="fa fa-group"></i> {!! Input::all() ? 'Search results:' : 'Groups' !!}</h3>
26+
</div>
27+
<div class="panel-body">
28+
@include('laravel-authentication-acl::admin.group.groups-table')
29+
</div>
30+
</div>
31+
</div>
32+
<div class="col-md-4">
33+
@include('laravel-authentication-acl::admin.group.search')
34+
</div>
35+
</div>
36+
</div>
37+
@stop
38+
39+
@section('footer_scripts')
40+
<script>
41+
$(".delete").click(function(){
42+
return confirm("Are you sure to delete this item?");
43+
});
44+
</script>
45+
@stop
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
{!! Form::open(["route" => "groups.edit.permission","role"=>"form", 'class' => 'form-add-perm']) !!}
2+
<div class="form-group">
3+
<div class="input-group">
4+
<span class="input-group-addon form-button button-add-perm"><span class="glyphicon glyphicon-plus-sign add-input"></span></span>
5+
{!! Form::select('permissions', $permission_values, '', ["class"=>"form-control permission-select"]) !!}
6+
</div>
7+
<span class="text-danger">{!! $errors->first('permissions') !!}</span>
8+
{!! Form::hidden('id', $group->id) !!}
9+
{{-- add permission operation --}}
10+
{!! Form::hidden('operation', 1) !!}
11+
</div>
12+
<div class="form-group">
13+
@if(! $group->exists)
14+
<span class="text-danger"><h5>You need to create a group first.</h5></span>
15+
@endif
16+
</div>
17+
{!! Form::close() !!}
18+
19+
@if( $presenter->permissions )
20+
@foreach($presenter->permissions_obj as $permission)
21+
{!! Form::open(["route" => "groups.edit.permission", "role"=>"form", 'name' => $permission->permission]) !!}
22+
<div class="form-group">
23+
<div class="input-group">
24+
<span class="input-group-addon form-button button-del-perm" name="{!! $permission->permission !!}"><span class="glyphicon glyphicon-minus-sign add-input"></span></span>
25+
{!! Form::text('permission_desc', $permission->description, ['class' => 'form-control', 'readonly' => 'readonly']) !!}
26+
{!! Form::hidden('permissions', $permission->permission) !!}
27+
{!! Form::hidden('id', $group->id) !!}
28+
{{-- add permission operation --}}
29+
{!! Form::hidden('operation', 0) !!}
30+
</div>
31+
</div>
32+
{!! Form::close() !!}
33+
@endforeach
34+
@elseif($group->exists)
35+
<span class="text-warning"><h5>There is no permission associated to the group.</h5></span>
36+
@endif
37+
38+
@section('footer_scripts')
39+
@parent
40+
<script>
41+
$(".button-add-perm").click( function(){
42+
<?php if($group->exists): ?>
43+
$('.form-add-perm').submit();
44+
<?php endif; ?>
45+
});
46+
$(".button-del-perm").click( function(){
47+
name = $(this).attr('name');
48+
$('form[name='+name+']').submit();
49+
});
50+
</script>
51+
@stop
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<div class="panel panel-info">
2+
<div class="panel-heading">
3+
<h3 class="panel-title bariol-thin"><i class="fa fa-search"></i> Group search</h3>
4+
</div>
5+
<div class="panel-body">
6+
{!! Form::open(['route' => 'groups.list','method' => 'get']) !!}
7+
<!-- name text field -->
8+
<div class="form-group">
9+
{!! Form::label('name','Name:') !!}
10+
{!! Form::text('name', null, ['class' => 'form-control', 'placeholder' => 'group name']) !!}
11+
</div>
12+
<span class="text-danger">{!! $errors->first('name') !!}</span>
13+
{!! Form::submit('Search', ["class" => "btn btn-info pull-right"]) !!}
14+
{!! Form::close() !!}
15+
</div>
16+
</div>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
@extends('laravel-authentication-acl::admin.base')
2+
3+
@section('container')
4+
<div class="col-mg-12">
5+
@yield('content')
6+
</div>
7+
@stop

0 commit comments

Comments
 (0)