<div class="modobox-sub-header-modify-element-name">{{ $role->name }}</div>

	<div class="row margin-bottom-0">
		<div class="col-sm-12 information_messages_manage padding-left-10 padding-right-10">
			<div class="alert alert-info noradius margin-bottom-0">
				<div class="bg-blue alert-icon">
					<i class="glyph-icon icon-info"></i>
				</div>
				<div class="alert-content">
					<h4 class="alert-title">{{ __('Gestion des droits') }}</h4>
				</div>
			</div>
		</div>
	</div>

	<div class="row">
		<div id="rights" class="col-sm-12" style="padding: 30px;">

			<form class="form-horizontal light" name="{{ $model->name }}_manage_form" onsubmit="return false;" method="POST">
				<input type="hidden" name="role_id" value="{{ $role->id }}" class="form-control" /> 

				@foreach ($permissions as $app => $modules)
					<div>
						<h3 class="brand">
							<a class="collapsed" role="button" data-toggle="collapse" data-parent="#rights" href="#collapse_{{ $app }}" aria-expanded="true" aria-controls="collapse_{{ $app }}">
								{{ $app }}
							</a>
						</h3>
					</div>
					<div id="collapse_{{ $app }}" class="collapse content-box light p-2" role="tabpanel">
						
						@foreach ($modules as $module = $actions)	
							<h4 class="brand">{{ $module }}</h4>
							<div class="inline-group">
								@foreach ($actions as $permission)
									<label class="brand ml-3">{{ $permission->action }}</label>
									<input type="checkbox" name="permissions[{{ $permission->id }}]" value="1">
								@endforeach
							</div>
						@endforeach

					</div>
				@endforeach
			</form>
		</div>
	</div>
</form>
