mirror of
https://github.com/Icinga/icingaweb2-module-businessprocess.git
synced 2026-01-23 20:52:52 -05:00
Rendering: improve tile sizes, fullscreen mode
This commit is contained in:
parent
135197cc45
commit
72e7aa798c
4 changed files with 36 additions and 10 deletions
|
|
@ -102,7 +102,9 @@ class ProcessController extends Controller
|
|||
);
|
||||
}
|
||||
|
||||
$controls->add($this->getProcessTabs($bp, $renderer));
|
||||
if (! ($this->showFullscreen || $this->view->compact)) {
|
||||
$controls->add($this->getProcessTabs($bp, $renderer));
|
||||
}
|
||||
if (! $this->view->compact) {
|
||||
$controls->add(Element::create('h1')->setContent($this->view->title));
|
||||
}
|
||||
|
|
@ -141,9 +143,6 @@ class ProcessController extends Controller
|
|||
|
||||
protected function getProcessTabs(BusinessProcess $bp, Renderer $renderer)
|
||||
{
|
||||
if ($this->showFullscreen || $this->view->compact) {
|
||||
return;
|
||||
}
|
||||
|
||||
$tabs = $this->singleTab($bp->getTitle());
|
||||
if (! $renderer->isLocked()) {
|
||||
|
|
@ -175,6 +174,9 @@ class ProcessController extends Controller
|
|||
{
|
||||
$action = $this->params->get('action');
|
||||
$form = null;
|
||||
if ($this->showFullscreen) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ($action === 'add') {
|
||||
$form =$this->loadForm('AddNode')
|
||||
|
|
|
|||
|
|
@ -86,6 +86,30 @@ abstract class Renderer extends Html
|
|||
return $this->parent->getParents();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return BpNode[]
|
||||
*/
|
||||
public function getChildNodes()
|
||||
{
|
||||
if ($this->wantsRootNodes()) {
|
||||
return $this->bp->getRootNodes();
|
||||
} else {
|
||||
return $this->parent->getChildren();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function countChildNodes()
|
||||
{
|
||||
if ($this->wantsRootNodes()) {
|
||||
return $this->bp->countChildren();
|
||||
} else {
|
||||
return $this->parent->countChildren();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $summary
|
||||
* @return Container
|
||||
|
|
|
|||
|
|
@ -63,12 +63,12 @@ class TileRenderer extends Renderer
|
|||
*/
|
||||
protected function howMany()
|
||||
{
|
||||
$count = $this->bp->countChildren();
|
||||
$count = $this->countChildNodes();
|
||||
$howMany = 'normal';
|
||||
|
||||
if ($count < 20) {
|
||||
if ($count <= 6) {
|
||||
$howMany = 'few';
|
||||
} elseif ($count > 50) {
|
||||
} elseif ($count > 12) {
|
||||
$howMany = 'many';
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -505,13 +505,13 @@ div.bp .badges {
|
|||
}
|
||||
|
||||
.tiles.few { font-size: 3em; }
|
||||
.tiles.normal { font-size: 2em; }
|
||||
.tiles.many { font-size: 1.5em; }
|
||||
.tiles.normal { font-size: 2.4em; }
|
||||
.tiles.many { font-size: 1.8em; }
|
||||
|
||||
#layout.twocols, #layout.layout-minimal, .compact {
|
||||
.tiles.few { font-size: 1.8em; }
|
||||
.tiles.normal { font-size: 1.4em; }
|
||||
.tiles.many { font-size: 0.9em; }
|
||||
.tiles.many { font-size: 1.2em; }
|
||||
}
|
||||
|
||||
#layout.fullscreen-layout .controls {
|
||||
|
|
|
|||
Loading…
Reference in a new issue