Implemented Changes to Project Duplication to include Swimlanes and Tasks.

ProjectDuplication::duplicate accepts additional param of type array now. Array includes which optional parts to duplicate. Optional parts are: 'swimlane', 'category', 'task', 'action'.
This commit is contained in:
Michael Lüpkes
2015-02-03 11:16:10 +01:00
parent 24300f828a
commit e5ea361255
8 changed files with 218 additions and 16 deletions

View File

@@ -4,11 +4,20 @@
<div class="confirm">
<p class="alert alert-info">
<?= t('Do you really want to duplicate this project: "%s"?', $project['name']) ?>
<?= t('Which parts of the project do you want to duplicate?') ?>
</p>
<form method="post" action="<?= $this->u('project', 'duplicate', array('project_id' => $project['id'], 'duplicate' => 'yes')) ?>" autocomplete="off">
<div class="form-actions">
<?= $this->a(t('Yes'), 'project', 'duplicate', array('project_id' => $project['id'], 'duplicate' => 'yes'), true, 'btn btn-red') ?>
<?= t('or') ?> <?= $this->a(t('cancel'), 'project', 'show', array('project_id' => $project['id'])) ?>
</div>
<?= $this->formCsrf() ?>
<?= $this->formCheckbox('category', t('Categories'), 1, true) ?>
<?= $this->formCheckbox('action', t('Actions'), 1, true) ?>
<?= $this->formCheckbox('swimlane', t('Swimlanes'), 1, true) ?>
<?= $this->formCheckbox('task', t('Tasks'), 1, true) ?>
<div class="form-actions">
<input type="submit" value="<?= t('Duplicate') ?>" class="btn btn-red"/>
<?= t('or') ?> <?= $this->a(t('cancel'), 'project', 'show', array('project_id' => $project['id'])) ?>
</div>
</form>
</div>