diff options
author | Frédéric Guillot <fred@kanboard.net> | 2014-12-01 21:23:46 -0500 |
---|---|---|
committer | Frédéric Guillot <fred@kanboard.net> | 2014-12-01 21:23:46 -0500 |
commit | 50a9e2ba7db6a155cee75771d73c584d721cf687 (patch) | |
tree | cf985e7050b9293e2ec4b13d40689a4a0b10644f /app/Template/project/users.php | |
parent | 67eae33fb88e840047a33558de56090d8bcc62fb (diff) |
Move project templates to a subfolder
Diffstat (limited to 'app/Template/project/users.php')
-rw-r--r-- | app/Template/project/users.php | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/app/Template/project/users.php b/app/Template/project/users.php new file mode 100644 index 00000000..0908533f --- /dev/null +++ b/app/Template/project/users.php @@ -0,0 +1,59 @@ +<div class="page-header"> + <h2><?= t('List of authorized users') ?></h2> +</div> + +<?php if ($project['is_everybody_allowed']): ?> + <div class="alert alert-info"><?= t('Everybody have access to this project.') ?></div> +<?php else: ?> + + <?php if (empty($users['allowed'])): ?> + <div class="alert alert-error"><?= t('Nobody have access to this project.') ?></div> + <?php else: ?> + <div class="alert alert-info"> + <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> + <?php if ($project['is_private'] == 0): ?> + (<?= Helper\a(t('revoke'), 'project', 'revoke', array('project_id' => $project['id'], 'user_id' => $user_id), true) ?>) + <?php endif ?> + </li> + <?php endforeach ?> + </ul> + <p><?= t('Don\'t forget that administrators have access to everything.') ?></p> + </div> + <?php endif ?> + + <?php if ($project['is_private'] == 0 && ! empty($users['not_allowed'])): ?> + <hr/> + <form method="post" action="<?= Helper\u('project', 'allow', array('project_id' => $project['id'])) ?>" autocomplete="off"> + + <?= Helper\form_csrf() ?> + + <?= Helper\form_hidden('project_id', array('project_id' => $project['id'])) ?> + + <?= Helper\form_label(t('User'), 'user_id') ?> + <?= Helper\form_select('user_id', $users['not_allowed']) ?><br/> + + <div class="form-actions"> + <input type="submit" value="<?= t('Allow this user') ?>" class="btn btn-blue"/> + </div> + </form> + <?php endif ?> + +<?php endif ?> + +<?php if ($project['is_private'] == 0): ?> +<hr/> +<form method="post" action="<?= Helper\u('project', 'allowEverybody', array('project_id' => $project['id'])) ?>"> + <?= Helper\form_csrf() ?> + + <?= Helper\form_hidden('id', array('id' => $project['id'])) ?> + <?= Helper\form_checkbox('is_everybody_allowed', t('Allow everybody to access to this project'), 1, $project['is_everybody_allowed']) ?> + + <div class="form-actions"> + <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/> + </div> +</form> +<?php endif ?> |