diff options
author | Frédéric Guillot <fred@kanboard.net> | 2014-10-24 22:51:30 -0400 |
---|---|---|
committer | Frédéric Guillot <fred@kanboard.net> | 2014-10-24 22:51:30 -0400 |
commit | 90e06162999c8ec7fa9bcfa391800f7907419d9b (patch) | |
tree | f0f8d4a760f25c4f7773e0a1851031db6b08b9f2 /app/Template/action_index.php | |
parent | 180efb962c6fc4da47ed39e60db137d63ffaad5b (diff) |
Rename Locales and Templates folders to be more consistent
Diffstat (limited to 'app/Template/action_index.php')
-rw-r--r-- | app/Template/action_index.php | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/app/Template/action_index.php b/app/Template/action_index.php new file mode 100644 index 00000000..30874591 --- /dev/null +++ b/app/Template/action_index.php @@ -0,0 +1,65 @@ +<div class="page-header"> + <h2><?= t('Automatic actions for the project "%s"', $project['name']) ?></h2> +</div> + +<?php if (! empty($actions)): ?> + +<h3><?= t('Defined actions') ?></h3> +<table> + <tr> + <th><?= t('Event name') ?></th> + <th><?= t('Action name') ?></th> + <th><?= t('Action parameters') ?></th> + <th><?= t('Action') ?></th> + </tr> + + <?php foreach ($actions as $action): ?> + <tr> + <td><?= Helper\in_list($action['event_name'], $available_events) ?></td> + <td><?= Helper\in_list($action['action_name'], $available_actions) ?></td> + <td> + <ul> + <?php foreach ($action['params'] as $param): ?> + <li> + <?= Helper\in_list($param['name'], $available_params) ?> = + <strong> + <?php if (Helper\contains($param['name'], 'column_id')): ?> + <?= Helper\in_list($param['value'], $columns_list) ?> + <?php elseif (Helper\contains($param['name'], 'user_id')): ?> + <?= Helper\in_list($param['value'], $users_list) ?> + <?php elseif (Helper\contains($param['name'], 'project_id')): ?> + <?= Helper\in_list($param['value'], $projects_list) ?> + <?php elseif (Helper\contains($param['name'], 'color_id')): ?> + <?= Helper\in_list($param['value'], $colors_list) ?> + <?php elseif (Helper\contains($param['name'], 'category_id')): ?> + <?= Helper\in_list($param['value'], $categories_list) ?> + <?php elseif (Helper\contains($param['name'], 'label')): ?> + <?= Helper\escape($param['value']) ?> + <?php endif ?> + </strong> + </li> + <?php endforeach ?> + </ul> + </td> + <td> + <a href="?controller=action&action=confirm&project_id=<?= $project['id'] ?>&action_id=<?= $action['id'] ?>"><?= t('Remove') ?></a> + </td> + </tr> + <?php endforeach ?> + +</table> + +<?php endif ?> + +<h3><?= t('Add an action') ?></h3> +<form method="post" action="?controller=action&action=event&project_id=<?= $project['id'] ?>" autocomplete="off"> + <?= Helper\form_csrf() ?> + <?= Helper\form_hidden('project_id', $values) ?> + + <?= Helper\form_label(t('Action'), 'action_name') ?> + <?= Helper\form_select('action_name', $available_actions, $values) ?><br/> + + <div class="form-actions"> + <input type="submit" value="<?= t('Next step') ?>" class="btn btn-blue"/> + </div> +</form>
\ No newline at end of file |