summaryrefslogtreecommitdiff
path: root/app/Template
diff options
context:
space:
mode:
Diffstat (limited to 'app/Template')
-rw-r--r--app/Template/action/index.php6
-rw-r--r--app/Template/action_project/project.php22
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