1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/kanboard_ynh.git synced 2024-09-03 19:36:17 +02:00
kanboard_ynh/sources/app/Template/action/index.php

64 lines
2.6 KiB
PHP
Raw Normal View History

2014-10-22 19:59:09 +02:00
<div class="page-header">
<h2><?= t('Automatic actions for the project "%s"', $project['name']) ?></h2>
</div>
2014-07-20 12:26:15 +02:00
2014-10-22 19:59:09 +02:00
<?php if (! empty($actions)): ?>
2014-07-20 12:26:15 +02:00
2014-10-22 19:59:09 +02:00
<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>
2014-07-20 12:26:15 +02:00
2014-10-22 19:59:09 +02:00
<?php foreach ($actions as $action): ?>
<tr>
2015-01-16 14:23:05 +01:00
<td><?= $this->inList($action['event_name'], $available_events) ?></td>
<td><?= $this->inList($action['action_name'], $available_actions) ?></td>
2014-10-22 19:59:09 +02:00
<td>
<ul>
<?php foreach ($action['params'] as $param): ?>
<li>
2015-01-16 14:23:05 +01:00
<?= $this->inList($param['name'], $available_params) ?> =
2014-10-22 19:59:09 +02:00
<strong>
2015-01-16 14:23:05 +01:00
<?php if ($this->contains($param['name'], 'column_id')): ?>
<?= $this->inList($param['value'], $columns_list) ?>
<?php elseif ($this->contains($param['name'], 'user_id')): ?>
<?= $this->inList($param['value'], $users_list) ?>
<?php elseif ($this->contains($param['name'], 'project_id')): ?>
<?= $this->inList($param['value'], $projects_list) ?>
<?php elseif ($this->contains($param['name'], 'color_id')): ?>
<?= $this->inList($param['value'], $colors_list) ?>
<?php elseif ($this->contains($param['name'], 'category_id')): ?>
<?= $this->inList($param['value'], $categories_list) ?>
<?php elseif ($this->contains($param['name'], 'label')): ?>
<?= $this->e($param['value']) ?>
2014-10-22 19:59:09 +02:00
<?php endif ?>
</strong>
</li>
<?php endforeach ?>
</ul>
</td>
<td>
2015-01-16 14:23:05 +01:00
<?= $this->a(t('Remove'), 'action', 'confirm', array('project_id' => $project['id'], 'action_id' => $action['id'])) ?>
2014-10-22 19:59:09 +02:00
</td>
</tr>
<?php endforeach ?>
</table>
2014-07-20 12:26:15 +02:00
2014-10-22 19:59:09 +02:00
<?php endif ?>
2014-07-20 12:26:15 +02:00
2014-10-22 19:59:09 +02:00
<h3><?= t('Add an action') ?></h3>
2015-01-16 14:23:05 +01:00
<form method="post" action="<?= $this->u('action', 'event', array('project_id' => $project['id'])) ?>" class="listing">
<?= $this->formCsrf() ?>
<?= $this->formHidden('project_id', $values) ?>
2014-07-20 12:26:15 +02:00
2015-01-16 14:23:05 +01:00
<?= $this->formLabel(t('Action'), 'action_name') ?>
<?= $this->formSelect('action_name', $available_actions, $values) ?><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('Next step') ?>" class="btn btn-blue"/>
</div>
</form>