|
|
@@ -270,10 +270,8 @@ class Core_AclHelper {// Helper class for Acl
|
|
|
$backRefLabel = $backRef['namespace']; // TODO: get DESC from Zasoby
|
|
|
$backRefShort = explode("/", $backRefLabel);
|
|
|
$backRefShort = array_pop($backRefShort);
|
|
|
- $backRefShort = (strlen($backRefShort) > 20) ? substr($backRefShort, 0, 20) . "..." : $backRefShort;
|
|
|
+ $backRefShort = (strlen($backRefShort) > 28) ? substr($backRefShort, 0, 28) . "..." : $backRefShort;
|
|
|
|
|
|
- // 'namespace' => 'default_db/BI_audit_KRS/BI_audit_KRS',
|
|
|
- // 'idInstance' => '24'
|
|
|
try {
|
|
|
$totalBackRefs = ACL::fetchBackRefs($acl->getNamespace(), $id, $backRef['namespace'], [ 'total' => true ]);
|
|
|
} catch (Exception $e) {
|
|
|
@@ -289,8 +287,38 @@ class Core_AclHelper {// Helper class for Acl
|
|
|
'childRefNS' => $acl->getNamespace(),
|
|
|
'childRefPK' => $id,
|
|
|
]),
|
|
|
- 'title' => "Wyszukaj powiązania z '{$backRefLabel}'",
|
|
|
- 'label' => "Wyszukaj powiązania z '{$backRefShort}' <span class=\"badge\">{$totalBackRefs}</span>",
|
|
|
+ 'title' => "Powiązania od '{$backRefLabel}'",
|
|
|
+ 'label' => "Powiązania od '{$backRefShort}' <span class=\"badge\">{$totalBackRefs}</span>",
|
|
|
+ ];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (count($partsNs) > 2) { // is AntAcl
|
|
|
+ $refList = ACL::getRefList($ns);
|
|
|
+ DBG::log($refList, 'array', "\$refList");
|
|
|
+ foreach ($refList as $refInfo) { // [ namespace, idInstance ]
|
|
|
+ $refLabel = $refInfo['namespace']; // TODO: get DESC from Zasoby
|
|
|
+ $refShortLabel = explode("/", $refLabel);
|
|
|
+ $refShortLabel = array_pop($refShortLabel);
|
|
|
+ $refShortLabel = (strlen($refShortLabel) > 28) ? substr($refShortLabel, 0, 28) . "..." : $refShortLabel;
|
|
|
+
|
|
|
+ try {
|
|
|
+ $totalRefs = ACL::fetchRefs($acl->getNamespace(), $id, $refInfo['namespace'], [ 'total' => true ]);
|
|
|
+ } catch (Exception $e) {
|
|
|
+ DBG::log($e);
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ DBG::log($totalRefs, 'array', "\$totalRefs {$refInfo['namespace']} pk({$id})");
|
|
|
+
|
|
|
+ $rowFunList[] = [
|
|
|
+ 'ico' => 'glyphicon glyphicon-random',
|
|
|
+ 'href' => Router::getRoute('ViewTableAjax')->getLink('', [
|
|
|
+ 'namespace' => $refInfo['namespace'],
|
|
|
+ 'backRefNS' => $acl->getNamespace(),
|
|
|
+ 'backRefPK' => $id,
|
|
|
+ 'backRefField' => Api_WfsNs::typeName($refInfo['namespace']),
|
|
|
+ ]),
|
|
|
+ 'title' => "Powiązania do '{$refLabel}'",
|
|
|
+ 'label' => "Powiązania do '{$refShortLabel}' <span class=\"badge\">{$totalRefs}</span>",
|
|
|
];
|
|
|
}
|
|
|
}
|