diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-03-05 13:39:55 -0500 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-03-05 13:39:55 -0500 |
commit | 1e169ae16c68c28b4626a731366a658f6ddfd3a3 (patch) | |
tree | 7ecd01f4b1ae8e282447f0fee4ae050a88d27791 /app/Template | |
parent | 9983e1422b6a473bf8be0b56773140a3886a239a (diff) |
Import automatic actions from another project
Diffstat (limited to 'app/Template')
-rw-r--r-- | app/Template/action/index.php | 6 | ||||
-rw-r--r-- | app/Template/action_project/project.php | 22 |
2 files changed, 28 insertions, 0 deletions
diff --git a/app/Template/action/index.php b/app/Template/action/index.php index 6e9c16a5..1cc14782 100644 --- a/app/Template/action/index.php +++ b/app/Template/action/index.php @@ -1,5 +1,11 @@ <div class="page-header"> <h2><?= t('Automatic actions for the project "%s"', $project['name']) ?></h2> + <ul> + <li> + <i class="fa fa-plus fa-fw"></i> + <?= $this->url->link(t('Import from another project'), 'ActionProject', 'project', array('project_id' => $project['id']), false, 'popover') ?> + </li> + </ul> </div> <?php if (! empty($actions)): ?> diff --git a/app/Template/action_project/project.php b/app/Template/action_project/project.php new file mode 100644 index 00000000..d056239b --- /dev/null +++ b/app/Template/action_project/project.php @@ -0,0 +1,22 @@ +<section id="main"> + <div class="page-header"> + <h2><?= t('Import actions from another project') ?></h2> + </div> + <?php if (empty($projects_list)): ?> + <p class="alert"><?= t('There is no available project.') ?></p> + <?php else: ?> + <form class="popover-form" method="post" action="<?= $this->url->href('ActionProject', 'save', array('project_id' => $project['id'])) ?>" autocomplete="off"> + + <?= $this->form->csrf() ?> + + <?= $this->form->label(t('Create from another project'), 'src_project_id') ?> + <?= $this->form->select('src_project_id', $projects_list) ?> + + <div class="form-actions"> + <button type="submit" class="btn btn-blue"><?= t('Save') ?></button> + <?= t('or') ?> + <?= $this->url->link(t('cancel'), 'Action', 'index', array(), false, 'close-popover') ?> + </div> + </form> + <?php endif ?> +</section>
\ No newline at end of file |