2015-09-11 09:12:49 -04:00
<?php
use Icinga\Module\Businessprocess\BusinessProcess;
?>
2015-03-03 11:29:29 -05:00
<?php if ( ! $this -> compact ) : ?>
2014-10-20 10:26:06 -04:00
< div class = "controls" >
<? = $this -> tabs ?>
2015-03-16 04:08:00 -04:00
< h1 >< form method = "post" action = " <? = $this -> url () -> without ( 'node' ) -> without ( 'unlocked' ) ?> " >
<? = $this -> formSelect ( 'config' , $this -> configName , array ( 'class' => 'autosubmit' ), $this -> processList ) ?>
< / form >
2015-10-07 10:51:37 -04:00
< a href = " <? = $this -> url () -> with ( 'mode' , 'toplevel' ) -> without ( 'unlocked' ) ?> " title = " <? = $this -> escape ( 'Switch to toplevel view' ) ?> " > <? = $this -> icon ( 'dashboard' ) ?> </ a >
2015-03-16 04:08:00 -04:00
<?php if ( $this -> bpconfig -> isLocked ()) : ?>
< a href = " <? = $this -> url () -> with ( 'unlocked' , true ) ?> " title = " <? = $this -> escape ( $this -> translate ( 'Unlock this process' )) ?> " > <? = $this -> icon ( 'lock' ) ?> </ a >
<?php else : ?>
<?php if ( ! $this -> bpconfig -> isEmpty ()) : ?>
2015-10-07 10:51:37 -04:00
< a href = " <? = $this -> url () -> without ( 'unlocked' ) ?> " style = "color: red" title = " <? = $this -> escape ( $this -> translate ( 'Lock this process' )) ?> " > <? = $this -> icon ( 'lock-open' ) ?> </ a >
2015-03-16 04:08:00 -04:00
<?php endif ?>
< a href = " <? = $this -> url ( 'businessprocess/process/config' , array ( 'config' => $this -> configName )) ?> " title = " <? = $this -> escape ( 'Modify this process' ) ?> " data-base-target = "_next" > <? = $this -> icon ( 'wrench' ) ?> </ a >
<?php endif ?>
2014-10-20 10:26:06 -04:00
< / div >
2015-03-03 11:29:29 -05:00
<?php endif ?>
2014-10-20 10:26:06 -04:00
2015-03-03 11:29:29 -05:00
< div class = "content <? = $this -> compact ? ' compact' : '' ?> " data-base-target = "_next" >
2015-03-16 04:08:00 -04:00
<?php if ( ! $this -> bpconfig -> isLocked ()) : ?>
<? = $this -> qlink ( 'Add new node' , 'businessprocess/node/add' , array ( 'config' => $this -> configName )) ?>
2015-03-03 11:29:29 -05:00
<?php endif ?>
2015-03-16 04:08:00 -04:00
<?php if ( $this -> bpconfig -> hasErrors () || $this -> bpconfig -> hasChanges () || $this -> bpconfig -> hasSimulations ()) : ?>
2015-03-03 04:50:19 -05:00
< ul class = "error" >
2015-03-16 04:08:00 -04:00
<?php foreach ( $this -> bpconfig -> getErrors () as $error ) : ?>
2015-03-03 04:50:19 -05:00
< li > <? = $this -> escape ( $error ) ?> </ li >
<?php endforeach ?>
2015-03-16 04:08:00 -04:00
<?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),
2015-10-07 10:51:37 -04:00
null
2015-03-16 04:08:00 -04:00
) ?>< / 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),
2015-10-07 10:51:37 -04:00
null
2015-03-16 04:08:00 -04:00
) ?>< / li >
<?php endif ?>
2015-03-03 04:50:19 -05:00
< / ul >
<?php endif ?>
2016-11-24 03:39:44 -05:00
< div id = " <? = $this -> bp -> getHtmlId () ?> " class = "bp" >
2014-12-02 05:34:03 -05:00
<? = $this -> bp -> renderHtml ( $this ) ?>
2015-03-16 04:08:00 -04:00
<?php if ( ! $this -> bpconfig -> isLocked ()) : ?>
2015-09-11 09:12:49 -04:00
<?php if ( $this -> bp instanceof BusinessProcess ) : /* do not render when showing subtree */ ?>
2015-03-16 04:08:00 -04:00
<? = $this -> bp -> renderUnbound ( $this ) ?>
<?php endif ?>
2015-09-11 09:12:49 -04:00
<?php endif ?>
2015-03-16 04:08:00 -04:00
< / div >
2014-12-02 05:34:03 -05:00
<? = $this -> render ( 'warnings.phtml' ) ?>
2014-10-20 10:26:06 -04:00
< / div >