mirror of
https://github.com/Icinga/icingaweb2-module-businessprocess.git
synced 2026-05-28 04:34:08 -04:00
process/show: reduce to a minimun, remove...
...bprenderer.phtml
This commit is contained in:
parent
cd13afd560
commit
3f9d0d781d
2 changed files with 2 additions and 91 deletions
|
|
@ -1,13 +0,0 @@
|
|||
<?php if (! $this->compact && ! $this->showFullscreen): ?>
|
||||
<div class="controls">
|
||||
<?= $this->tabs ?>
|
||||
<h1><?= $this->title ?></h1>
|
||||
<?= $this->breadcrumb->render() ?>
|
||||
<?= $this->actions->render() ?>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
||||
<div class="content<?= $this->compact ? ' compact' : '' ?>">
|
||||
<?= $this->bpRenderer->render() ?>
|
||||
<?= $this->render('warnings.phtml') ?>
|
||||
</div>
|
||||
|
|
@ -1,78 +1,2 @@
|
|||
<?php
|
||||
|
||||
use Icinga\Module\Businessprocess\BusinessProcess;
|
||||
|
||||
?>
|
||||
<?php if (! $this->compact): ?>
|
||||
<div class="controls">
|
||||
<?= $this->tabs ?>
|
||||
<h1><?= $this->escape($this->title) ?></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>-->
|
||||
<?= $this->breadcrumb->render() ?>
|
||||
<?= $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">
|
||||
<?php
|
||||
|
||||
try {
|
||||
echo $this->bp->renderHtml($this);
|
||||
} catch (Exception $e) {
|
||||
printf(
|
||||
'<ul class="error"><li>%s: %s</li></ul>',
|
||||
$this->translate('Error'),
|
||||
$this->escape($e->getMessage())
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
<?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>
|
||||
<?= $this->controls->render() ?>
|
||||
<?= $this->content->render() ?>
|
||||
|
|
|
|||
Loading…
Reference in a new issue