diff options
author | Frédéric Guillot <fred@kanboard.net> | 2014-08-30 14:08:46 -0800 |
---|---|---|
committer | Frédéric Guillot <fred@kanboard.net> | 2014-08-30 14:08:46 -0800 |
commit | 9194a2604d79ef97994d01c35fb454f745b5412c (patch) | |
tree | 365dd4294e536c440610bee4f07a1bffb00d00eb /app/Templates/project_users.php | |
parent | e1eba08398c6c6ece684f9db6dedb0dff5d43071 (diff) |
Projects management refactoring
Diffstat (limited to 'app/Templates/project_users.php')
-rw-r--r-- | app/Templates/project_users.php | 70 |
1 files changed, 30 insertions, 40 deletions
diff --git a/app/Templates/project_users.php b/app/Templates/project_users.php index 8afac709..dca3524f 100644 --- a/app/Templates/project_users.php +++ b/app/Templates/project_users.php @@ -1,46 +1,36 @@ -<section id="main"> - <div class="page-header"> - <h2><?= t('Project access list for "%s"', $project['name']) ?></h2> - <ul> - <li><a href="?controller=project"><?= t('All projects') ?></a></li> - </ul> - </div> - <section> +<div class="page-header"> + <h2><?= t('List of authorized users') ?></h2> +</div> - <?php if (! empty($users['not_allowed'])): ?> - <form method="post" action="?controller=project&action=allow&project_id=<?= $project['id'] ?>" autocomplete="off"> +<?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 ?> - <?= Helper\form_csrf() ?> +<?php if (! empty($users['not_allowed'])): ?> + <form method="post" action="?controller=project&action=allow&project_id=<?= $project['id'] ?>" autocomplete="off"> - <?= Helper\form_hidden('project_id', array('project_id' => $project['id'])) ?> + <?= Helper\form_csrf() ?> - <?= Helper\form_label(t('User'), 'user_id') ?> - <?= Helper\form_select('user_id', $users['not_allowed']) ?><br/> + <?= Helper\form_hidden('project_id', array('project_id' => $project['id'])) ?> - <div class="form-actions"> - <input type="submit" value="<?= t('Allow this user') ?>" class="btn btn-blue"/> - <?= t('or') ?> <a href="?controller=project"><?= t('cancel') ?></a> - </div> - </form> - <?php endif ?> + <?= Helper\form_label(t('User'), 'user_id') ?> + <?= Helper\form_select('user_id', $users['not_allowed']) ?><br/> - <h3><?= t('List of authorized users') ?></h3> - <?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 ?> - - </section> -</section>
\ No newline at end of file + <div class="form-actions"> + <input type="submit" value="<?= t('Allow this user') ?>" class="btn btn-blue"/> + </div> + </form> +<?php endif ?>
\ No newline at end of file |