Esempio n. 1
0
<?php

use Enpowi\Modules\DataOut;
use Enpowi\Users\Group;
use Enpowi\Modules\Module;
Module::is();
$data = (new DataOut())->add('moduleMap', Module::map())->add('anonymousGroup', (new Group('Anonymous'))->updatePerms())->add('registeredGroup', (new Group('Registered'))->updatePerms())->add('editableGroups', Group::editableGroups(true, true))->out();
?>
<form
	v-module
    data="<?php 
echo $data;
?>
"
	action="perms/listService"
	listen
	class="container">

	<table class="table">
		<thead>
			<tr>
				<th v-t colspan="2" class="center">Permission</th>
				<th v-t colspan="{{ editableGroups.length + 2 }}" class="center">Groups</th>
			</tr>
			<tr>
				<th v-t>Module</th>
				<th v-t>Component</th>
				<th class="center">
					{{ anonymousGroup.name }}
					<input type="hidden" name="groupNames[]" value="{{ anonymousGroup.name }}">
				</th>
Esempio n. 2
0
<?php

use Enpowi\App;
use Enpowi\Users\Group;
use Enpowi\Users\User;
use Enpowi\Modules\DataOut;
use Enpowi\Modules\Module;
Module::is();
$data = (new DataOut())->add('user', $user = new User(App::param('email')))->add('groups', Group::editableGroups())->out();
?>
<form
	listen
	v-module
    data="<?php 
echo $data;
?>
"
	action="group/ofUserService"
	class="container">

	<h3>
		<span v-t>Groups for: </span>
		{{ user.email }}
	</h3>

	<input
		name="user"
		type="hidden"
		value="{{ stringify( user ) }}">

	<div v-repeat=" group : groups ">