|
@@ -559,6 +559,30 @@ jQuery(document).on('p5UIBtnAjax:Storage:checkObjectInstallAjax:ajaxLoaded', fun
|
|
|
UI::alert('info', "Lista obiketów zaktualizowana");
|
|
UI::alert('info', "Lista obiketów zaktualizowana");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ {
|
|
|
|
|
+ echo UI::h('style', ['type' => "text/css"], "
|
|
|
|
|
+ .p5UI__dropdown-content { padding:8px; background-color: #f6f6f6; box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2) }
|
|
|
|
|
+ .p5UI__dropdown-content a { display:block; color:#000; padding:8px; text-decoration:none }
|
|
|
|
|
+ .p5UI__dropdown-content a:hover { background-color:#ebebeb }
|
|
|
|
|
+ ");
|
|
|
|
|
+ echo UI::h('script', [], "
|
|
|
|
|
+ function p5_Storage_actions_filterInput(n) {
|
|
|
|
|
+ var input, filter, ul, li, a, i, div;
|
|
|
|
|
+ input = n // .id-myInput
|
|
|
|
|
+ filter = input.value.toUpperCase()
|
|
|
|
|
+ div = n.parentNode // .id-myDropdown
|
|
|
|
|
+ a = div.getElementsByTagName('a')
|
|
|
|
|
+ for (i = 0; i < a.length; i++) {
|
|
|
|
|
+ if (a[i].innerHTML.toUpperCase().indexOf(filter) > -1) {
|
|
|
|
|
+ a[i].style.display = ''
|
|
|
|
|
+ } else {
|
|
|
|
|
+ a[i].style.display = 'none'
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ ");
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
UI::table([
|
|
UI::table([
|
|
|
'caption' => "Obiekty w bazie '{$sourceItem['name']}' " .
|
|
'caption' => "Obiekty w bazie '{$sourceItem['name']}' " .
|
|
|
UI::hButtonPost('<i class="glyphicon glyphicon-refresh"></i>' . " odśwież", [
|
|
UI::hButtonPost('<i class="glyphicon glyphicon-refresh"></i>' . " odśwież", [
|
|
@@ -569,6 +593,7 @@ jQuery(document).on('p5UIBtnAjax:Storage:checkObjectInstallAjax:ajaxLoaded', fun
|
|
|
]),
|
|
]),
|
|
|
'rows' => array_map(function ($item) use ($idStorage) {
|
|
'rows' => array_map(function ($item) use ($idStorage) {
|
|
|
$addToZasobyLink = $this->getLink('addAclObjectToZasoby', ['idStorage' => $idStorage, 'namespace' => $item['namespace']]);
|
|
$addToZasobyLink = $this->getLink('addAclObjectToZasoby', ['idStorage' => $idStorage, 'namespace' => $item['namespace']]);
|
|
|
|
|
+ $typeName = Api_WfsNs::typeName($item['namespace']);
|
|
|
return [
|
|
return [
|
|
|
'namespace' => '<span style="color:#888">' . substr($item['namespace'], 0, strlen($item['namespace']) - strlen($item['name'])) . '</span>' .
|
|
'namespace' => '<span style="color:#888">' . substr($item['namespace'], 0, strlen($item['namespace']) - strlen($item['name'])) . '</span>' .
|
|
|
'<span>' . $item['name'] . '</span>',
|
|
'<span>' . $item['name'] . '</span>',
|
|
@@ -581,13 +606,25 @@ jQuery(document).on('p5UIBtnAjax:Storage:checkObjectInstallAjax:ajaxLoaded', fun
|
|
|
], "Dodaj do Zasobów"),
|
|
], "Dodaj do Zasobów"),
|
|
|
// 'opis' => $item['description'],
|
|
// 'opis' => $item['description'],
|
|
|
'active?' => ($item['isActive']) ? '<span class="label label-success">TAK</span>' : '<span class="text text-muted">nie</span>',
|
|
'active?' => ($item['isActive']) ? '<span class="label label-success">TAK</span>' : '<span class="text text-muted">nie</span>',
|
|
|
- 'struktura' => UI::h('a', [ 'href' => $this->getLink('tableStruct', [ 'idStorage' => $idStorage, 'table' => $item['name'] ]) ], "struktura"),
|
|
|
|
|
- 'struktura OBJ' => UI::h('a', [ 'href' => $this->getLink('objectStruct', [ 'idStorage' => $idStorage, 'namespace' => $item['namespace'] ]) ], "obj struct"),
|
|
|
|
|
- 'raw info' => UI::h('a', [ 'href' => $this->getLink('rawInfo', [ 'idStorage' => $idStorage, 'table' => $item['name'] ]) ], "raw info"),
|
|
|
|
|
- 'reinstall' => UI::h('a', [ 'href' => $item['reinstallLink'] ], "reinstall"),
|
|
|
|
|
- 'view table' => UI::h('a', [ 'href' => Router::getRoute('ViewTableAjax')->getLink('', ['namespace' => $item['namespace']]) ], "view table"),
|
|
|
|
|
- 'view object' => UI::h('a', [ 'href' => Router::getRoute('ViewObject')->getLink('', ['namespace' => $item['namespace']]) ], "view object"),
|
|
|
|
|
- // 'xsd' => UI::h('a', [ 'href' => $this->getLink('xsd', [ 'idStorage' => $idStorage ]) ], "xsd"),
|
|
|
|
|
|
|
+ 'installed' => $item['isStructInstalled'] ? '<span class="label label-success">TAK</span>' : '<span class="text text-muted">nie</span>',
|
|
|
|
|
+ 'menu' => UI::h('div', ['class'=>"p5UI__dropdown-wrap"], [
|
|
|
|
|
+ UI::h('button', ['onClick' => "p5UI__dropdown(event, this, 'left bottom')", 'class' => "btn btn-xs btn-default p5UI__dropdown-btn"], [
|
|
|
|
|
+ '<i class="glyphicon glyphicon-menu-hamburger"></i>',
|
|
|
|
|
+ " menu"
|
|
|
|
|
+ ]),
|
|
|
|
|
+ UI::h('div', ['class' => "p5UI__dropdown-content"], [
|
|
|
|
|
+ UI::h('input', ['type' => "text", 'placeholder' => "Search..", 'class' => "p5UI__dropdown-input", 'onkeyup' => "p5_Storage_actions_filterInput(this)"], null),
|
|
|
|
|
+ UI::h('a', [ 'href' => $item['reinstallLink'] ], "reinstall"),
|
|
|
|
|
+ UI::h('a', [ 'href' => $this->getLink('tableStruct', [ 'idStorage' => $idStorage, 'table' => $item['name'] ]) ], "struktura"),
|
|
|
|
|
+ UI::h('a', [ 'href' => $this->getLink('objectStruct', [ 'idStorage' => $idStorage, 'namespace' => $item['namespace'] ]) ], "obj struct"),
|
|
|
|
|
+ UI::h('a', [ 'href' => $this->getLink('rawInfo', [ 'idStorage' => $idStorage, 'table' => $item['name'] ]) ], "raw info"),
|
|
|
|
|
+ UI::h('a', [ 'href' => Router::getRoute('ViewTableAjax')->getLink('', ['namespace' => $item['namespace']]) ], "view table"),
|
|
|
|
|
+ UI::h('a', [ 'href' => Router::getRoute('ViewObject')->getLink('', ['namespace' => $item['namespace']]) ], "view object"),
|
|
|
|
|
+ // 'xsd' => UI::h('a', [ 'href' => $this->getLink('xsd', [ 'idStorage' => $idStorage ]) ], "xsd"),
|
|
|
|
|
+ UI::h('a', [ 'href' => "wfs-data.php/default_db/?SERVICE=WFS&VERSION=1.0.0&SRSNAME=EPSG:3003&REQUEST=DescribeFeatureType&TYPENAME={$typeName}" ], "wfs DescribeFeatureType"),
|
|
|
|
|
+ UI::h('a', [ 'href' => "wfs-data.php/default_db/?SERVICE=WFS&VERSION=1.0.0&SRSNAME=EPSG:3003&REQUEST=GetFeature&TYPENAME={$typeName}&MAXFEATURES=10" ], "wfs GetFeature (max: 10)"),
|
|
|
|
|
+ ])
|
|
|
|
|
+ ]),
|
|
|
];
|
|
];
|
|
|
}, $objectStorage->getItems([
|
|
}, $objectStorage->getItems([
|
|
|
'#refFrom' => [
|
|
'#refFrom' => [
|