icingaweb2-module-businessp.../application/views/scripts/process/show.phtml

62 lines
2.1 KiB
PHTML

<?php
use Icinga\Module\Businessprocess\BusinessProcess;
?>
<?php if (! $this->compact): ?>
<div class="controls">
<?= $this->tabs ?>
<h1><form method="post" action="<?= $this->url()->without('node')->without('unlocked') ?>">
<input type="hidden" name="action" value="switchConfig" />
<?= $this->formSelect('config', $this->configName, array('class' => 'autosubmit'), $this->processList) ?>
</form></h1>
<?= $this->actions ?>
</div>
<?php endif ?>
<div class="content<?= $this->compact ? ' compact' : '' ?>" data-base-target="_next">
<div data-base-target="_self"><?= $this->form ?></div>
<?php if (! $this->bpconfig->isLocked()): ?>
<?= $this->qlink('Add new node', 'businessprocess/node/add', array('config' => $this->configName)) ?>
<?php endif ?>
<?php if ($this->bpconfig->hasErrors() || $this->bpconfig->hasChanges() || $this->bpconfig->hasSimulations()): ?>
<ul class="error">
<?php foreach ($this->bpconfig->getErrors() as $error): ?>
<li><?= $this->escape($error) ?></li>
<?php endforeach ?>
<?php if ($this->bpconfig->hasChanges()): ?>
<li><?= sprintf(
$this->translate('This process has %d pending change(s).'),
$this->bpconfig->countChanges()
) ?> <?= $this->qlink(
$this->translate('Store'),
'businessprocess/process/config',
array('config' => $this->configName)
) ?> <?= $this->qlink(
$this->translate('Dismiss'),
$this->url()->with('dismissChanges', true),
null
) ?></li>
<?php endif ?>
<?php if ($this->bpconfig->hasSimulations()): ?>
<li><?= sprintf(
$this->translate('This process shows %d simulated state(s).'),
$this->bpconfig->countSimulations()
) ?> <?= $this->qlink(
$this->translate('Dismiss'),
$this->url()->with('dismissSimulations', true),
null
) ?></li>
<?php endif ?>
</ul>
<?php endif ?>
<div id="<?= $this->bp->getHtmlId() ?>" class="bp">
<?= $this->bp->renderHtml($this) ?>
<?php if (! $this->bpconfig->isLocked()): ?>
<?php if ($this->bp instanceof BusinessProcess): /* do not render when showing subtree */ ?>
<?= $this->bp->renderUnbound($this) ?>
<?php endif ?>
<?php endif ?>
</div>
<?= $this->render('warnings.phtml') ?>
</div>