process/show: add simulation mode

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

View file

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

View file

@ -2,6 +2,7 @@
<?= $this->tabs ?>
<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') ?>
</h1>
</div>

View file

@ -0,0 +1,6 @@
<?php if ($this->bp->isSimulationMode()): ?>
<a href="<?= $this->url()->without('simulation') ?>" title="<?= $this->escape('Switch to live mode') ?>"><?= $this->icon('globe') ?></a>
<?php else: ?>
<a href="<?= $this->url()->with('simulation', true) ?>" title="<?= $this->escape('Switch to simulation mode') ?>"><?= $this->icon('magic') ?></a>
<?php endif ?>