|
|
@@ -406,6 +406,11 @@ class TableAjax extends ViewAjax {
|
|
|
UI::showMessagesForTable($this->_tbl);
|
|
|
UI::endContainer();
|
|
|
$namespace = $acl->getNamespace();
|
|
|
+ {
|
|
|
+ $nsSiblings = ACL::getNamespaceSiblings($namespace);
|
|
|
+ $siblingSelected = $namespace;
|
|
|
+ $baseUrl = Router::getRoute('ViewTableAjax')->getLink();
|
|
|
+ }
|
|
|
echo UI::h('div', [ 'class' => "AjaxTableCont" ], [
|
|
|
UI::h('ul', [ 'class' => "breadcrumb" ], [
|
|
|
UI::h('li', [], [
|
|
|
@@ -454,6 +459,27 @@ class TableAjax extends ViewAjax {
|
|
|
])
|
|
|
: '',
|
|
|
|
|
|
+ ($nsSiblings)
|
|
|
+ ? UI::h('div', [ 'class' => "btn-group pull-right" ], [
|
|
|
+ UI::h('a', [ 'class' => "btn btn-xs btn-default dropdown-toggle",
|
|
|
+ 'style' => "margin-right:16px",
|
|
|
+ 'data-toggle' => "dropdown",
|
|
|
+ 'href' => "#",
|
|
|
+ 'title' => "Powiązane obiekty z " . $this->getLabel(),
|
|
|
+ ], "Obiekty <span class=\"caret\"></span>"),
|
|
|
+ UI::h('ul', [ 'class' => "dropdown-menu pull-left", 'style' => "max-height:250px;overflow:auto;" ], array_map(function ($sibling) use ($baseUrl, $siblingSelected) {
|
|
|
+ $siblingLabel = explode('/', $sibling); $siblingLabel = array_pop($siblingLabel);
|
|
|
+ return UI::h('li', [ 'class' => "" ], [
|
|
|
+ UI::h('a', [
|
|
|
+ 'href' => "{$baseUrl}&namespace={$sibling}",
|
|
|
+ 'class' => "btn btn-link " . ($siblingSelected === $sibling ? "active" : ""),
|
|
|
+ 'style' => "text-align:left"
|
|
|
+ ], $siblingLabel),
|
|
|
+ ]);
|
|
|
+ }, $nsSiblings)),
|
|
|
+ ])
|
|
|
+ : '',
|
|
|
+
|
|
|
($this->_tbl == 'IN7_MK_BAZA_DYSTRYBUCJI')
|
|
|
? UI::h('a', [ 'class' => "pull-right", 'style' => "padding:0 20px 0 0", 'href' => "index.php?MENU_INIT=TREEJS&ZASOB_ID={$this->_zasobID}" ], "<i class=\"glyphicon glyphicon-eye-open\"></i> Drzewo")
|
|
|
: '',
|