process/show: add dummy edit mode

This commit is contained in:
Thomas Gelf 2014-11-30 12:14:11 +01:00
parent 1dfd67a15e
commit b50e8a082c
3 changed files with 15 additions and 0 deletions

View file

@ -32,6 +32,11 @@ class Bpapp_ProcessController extends Controller
$bp->setSimulationMode();
$this->addSimulation($bp);
}
if ($this->params->get('edit')) {
$bp->setEditMode();
}
}
public function sourceAction()

View file

@ -0,0 +1,9 @@
<?php if ($this->bp->isEditMode()): ?>
<?php if ($this->bp->hasBeenChanged()): ?>
<a href="<?= $this->url()->without('edit') ?>" title="<?= $this->escape('Store modifications') ?>"><?= $this->icon('ok') ?></a>
<?php endif ?>
<a href="<?= $this->url()->without('edit') ?>" title="<?= $this->escape('Dismiss modifications') ?>"><?= $this->icon('cancel') ?></a>
<?php else: ?>
<a href="<?= $this->url()->with('edit', true) ?>" title="<?= $this->escape('Modify this process') ?>"><?= $this->icon('wrench') ?></a>
<?php endif ?>

View file

@ -3,6 +3,7 @@
<h1><?= $this->escape($this->title) ?>
<a href="<?= $this->url()->with('mode', 'toplevel') ?>" title="<?= $this->escape('Switch to toplevel view') ?>"><?= $this->icon('dashboard') ?></a>
<?= $this->render('simulationlink.phtml') ?>
<?= $this->render('editlink.phtml') ?>
</h1>
</div>