2014-10-22 19:59:09 +02:00
|
|
|
<div class="page-header">
|
|
|
|
<h2><?= t('List of authorized users') ?></h2>
|
|
|
|
</div>
|
2014-07-20 12:26:15 +02:00
|
|
|
|
2014-10-22 19:59:09 +02:00
|
|
|
<?php if (empty($users['allowed'])): ?>
|
|
|
|
<div class="alert alert-info"><?= t('Everybody have access to this project.') ?></div>
|
|
|
|
<?php else: ?>
|
|
|
|
<div class="listing">
|
|
|
|
<p><?= t('Only those users have access to this project:') ?></p>
|
|
|
|
<ul>
|
|
|
|
<?php foreach ($users['allowed'] as $user_id => $username): ?>
|
|
|
|
<li>
|
|
|
|
<strong><?= Helper\escape($username) ?></strong>
|
|
|
|
(<a href="?controller=project&action=revoke&project_id=<?= $project['id'] ?>&user_id=<?= $user_id.Helper\param_csrf() ?>"><?= t('revoke') ?></a>)
|
|
|
|
</li>
|
|
|
|
<?php endforeach ?>
|
|
|
|
</ul>
|
|
|
|
<p><?= t('Don\'t forget that administrators have access to everything.') ?></p>
|
|
|
|
</div>
|
|
|
|
<?php endif ?>
|
2014-07-20 12:26:15 +02:00
|
|
|
|
2014-10-22 19:59:09 +02:00
|
|
|
<?php if (! empty($users['not_allowed'])): ?>
|
|
|
|
<form method="post" action="?controller=project&action=allow&project_id=<?= $project['id'] ?>" autocomplete="off">
|
2014-07-20 12:26:15 +02:00
|
|
|
|
2014-10-22 19:59:09 +02:00
|
|
|
<?= Helper\form_csrf() ?>
|
2014-07-20 12:26:15 +02:00
|
|
|
|
2014-10-22 19:59:09 +02:00
|
|
|
<?= Helper\form_hidden('project_id', array('project_id' => $project['id'])) ?>
|
2014-07-20 12:26:15 +02:00
|
|
|
|
2014-10-22 19:59:09 +02:00
|
|
|
<?= Helper\form_label(t('User'), 'user_id') ?>
|
|
|
|
<?= Helper\form_select('user_id', $users['not_allowed']) ?><br/>
|
2014-07-20 12:26:15 +02:00
|
|
|
|
2014-10-22 19:59:09 +02:00
|
|
|
<div class="form-actions">
|
|
|
|
<input type="submit" value="<?= t('Allow this user') ?>" class="btn btn-blue"/>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
<?php endif ?>
|