|
|
@@ -234,8 +234,14 @@ class TableAjax extends ViewAjax {
|
|
|
}
|
|
|
|
|
|
public function render() {
|
|
|
- $pInitList = $this->_fetchConnectedProcesInitList();
|
|
|
- $pInitListSelected = $this->getProcesInitSelected();
|
|
|
+ {
|
|
|
+ $pInitList = $this->_fetchConnectedProcesInitList();
|
|
|
+ $userAcl = User::getAcl();
|
|
|
+ $procesIds = array_keys($pInitList);
|
|
|
+ $mapTree = $userAcl->getProcesInitMapTreeOnlyIds($procesIds);
|
|
|
+ DBG::_('DBG_MAP', '1', "mapTree", $mapTree, __CLASS__, __FUNCTION__, __LINE__);
|
|
|
+ $pInitListSelected = $this->getProcesInitSelected();
|
|
|
+ }
|
|
|
$hasGeomFlds = $this->hasGeomFields();
|
|
|
|
|
|
$tblAjaxMap = null;
|
|
|
@@ -393,22 +399,23 @@ class TableAjax extends ViewAjax {
|
|
|
<span class="caret"></span>
|
|
|
</a>
|
|
|
<ul class="dropdown-menu pull-left">
|
|
|
- <?php foreach ($pInitList as $kId => $vLabel) : ?>
|
|
|
- <?php if ($pInitListSelected && $pInitListSelected == $kId) : ?>
|
|
|
+ <?php foreach ($mapTree as $vInitId => $gotoIds) : ?>
|
|
|
+ <?php if ($pInitListSelected && $pInitListSelected == $vInitId) : ?>
|
|
|
<li class="disabled">
|
|
|
<?php else : ?>
|
|
|
<li>
|
|
|
<?php endif; ?>
|
|
|
- <a href="procesy5.php?task=PROCES_VIEW_LIST&id_proces=<?php echo $kId; ?>&HIDE_PANEL=0&show_big_img=1&group_stanowiska=1" target="_blank" style="display:none"><i class="glyphicon glyphicon-info-sign"></i></a>
|
|
|
- <a href="index.php?FUNCTION_INIT=MENU_SELECT_PROCES&_action=setPermsByProces&id_proces=<?php echo $kId; ?>&MENU_INIT=VIEWTABLE_AJAX&ZASOB_ID=<?php echo $this->_zasobID; ?>" title="<?php echo htmlspecialchars("{{$kId}} {$vLabel}"); ?>">
|
|
|
- <i class="glyphicon glyphicon-info-sign"
|
|
|
- onclick="window.open('procesy5.php?task=PROCES_VIEW_LIST&id_proces=<?php echo $kId; ?>&HIDE_PANEL=0&show_big_img=1&group_stanowiska=1');return false;"
|
|
|
- style="color:#aaa;"
|
|
|
- onmouseover="this.style.color='#337AB7'"
|
|
|
- onmouseout="this.style.color='#aaa'"></i>
|
|
|
- <?php echo "{{$kId}} " . V::strShortUtf8($vLabel, 50); ?>
|
|
|
- </a>
|
|
|
+ <?php $this->_viewProcesInitListItem($vInitId, $gotoIds, $pInitList); ?>
|
|
|
</li>
|
|
|
+ <?php foreach ($gotoIds as $vGotoId => $vBool) : ?>
|
|
|
+ <?php if ($pInitListSelected && $pInitListSelected == $vGotoId) : ?>
|
|
|
+ <li class="disabled">
|
|
|
+ <?php else : ?>
|
|
|
+ <li>
|
|
|
+ <?php endif; ?>
|
|
|
+ <?php $this->_viewProcesGotoAndRetListItem($vGotoId, $pInitList); ?>
|
|
|
+ </li>
|
|
|
+ <?php endforeach; ?>
|
|
|
<?php endforeach; ?>
|
|
|
</ul>
|
|
|
</div>
|
|
|
@@ -2940,6 +2947,37 @@ function hidePopover() {
|
|
|
return $out;
|
|
|
}
|
|
|
|
|
|
+ public function _viewProcesInitListItem($vInitId, $gotoIds, $pInitList) {
|
|
|
+ $vLabel = $pInitList[$vInitId];
|
|
|
+ $kId = $vInitId;
|
|
|
+ ?>
|
|
|
+ <a href="index.php?FUNCTION_INIT=MENU_SELECT_PROCES&_action=setPermsByProces&id_proces=<?php echo $kId; ?>&MENU_INIT=VIEWTABLE_AJAX&ZASOB_ID=<?php echo $this->_zasobID; ?>" title="<?php echo htmlspecialchars("{{$kId}} {$vLabel}"); ?>">
|
|
|
+ <i class="glyphicon glyphicon-info-sign"
|
|
|
+ onclick="window.open('procesy5.php?task=PROCES_VIEW_LIST&id_proces=<?php echo $kId; ?>&HIDE_PANEL=0&show_big_img=1&group_stanowiska=1');return false;"
|
|
|
+ style="color:#aaa;"
|
|
|
+ onmouseover="this.style.color='#337AB7'"
|
|
|
+ onmouseout="this.style.color='#aaa'"></i>
|
|
|
+ <?php echo "{{$kId}} " . V::strShortUtf8($vLabel, 50); ?>
|
|
|
+ </a>
|
|
|
+<?php
|
|
|
+ }
|
|
|
+ public function _viewProcesGotoAndRetListItem($vGotoId, $pInitList) {
|
|
|
+ $vLabel = $pInitList[$vGotoId];
|
|
|
+ $kId = $vGotoId;
|
|
|
+ // TODO:?: prevent to execute procedure
|
|
|
+ ?>
|
|
|
+ <a href="index.php?FUNCTION_INIT=MENU_SELECT_PROCES&_action=setPermsByProces&id_proces=<?php echo $kId; ?>&MENU_INIT=VIEWTABLE_AJAX&ZASOB_ID=<?php echo $this->_zasobID; ?>" title="<?php echo htmlspecialchars("{{$kId}} {$vLabel}"); ?>">
|
|
|
+ <i class="glyphicon glyphicon-arrow-right" style="color:#aaa"></i>
|
|
|
+ <i class="glyphicon glyphicon-info-sign"
|
|
|
+ onclick="window.open('procesy5.php?task=PROCES_VIEW_LIST&id_proces=<?php echo $kId; ?>&HIDE_PANEL=0&show_big_img=1&group_stanowiska=1');return false;"
|
|
|
+ style="color:#aaa;"
|
|
|
+ onmouseover="this.style.color='#337AB7'"
|
|
|
+ onmouseout="this.style.color='#aaa'"></i>
|
|
|
+ <?php echo "{{$kId}} " . V::strShortUtf8($vLabel, 50); ?>
|
|
|
+ </a>
|
|
|
+<?php
|
|
|
+ }
|
|
|
+
|
|
|
public function hasAdditionalLayers() {
|
|
|
$layers = TableAjaxMap::getAdditionalLayers($this->_zasobID);
|
|
|
return !empty($layers);
|