|
|
@@ -239,6 +239,8 @@ class TableAjax extends ViewAjax {
|
|
|
$tblAjaxMap = new TableAjaxMap($this->_acl, 512, 400);
|
|
|
}
|
|
|
|
|
|
+ $hasPermCreate = $this->_acl->hasCreatePerms();
|
|
|
+
|
|
|
$jsToogleFiltrProcesuFunctionName = 'tableAjaxToggleFiltrProcesInit';
|
|
|
ob_start();
|
|
|
?>
|
|
|
@@ -384,6 +386,12 @@ class TableAjax extends ViewAjax {
|
|
|
<div class="AjaxTableCont">
|
|
|
<ul class="breadcrumb">
|
|
|
<li><a href="#" onclick="return tableAjaxBackToTable();"><?php echo $this->getLabelHtml(); ?></a></li>
|
|
|
+ <!-- TODO: if has perm 'C' then add btn to create new record -->
|
|
|
+ <?php if ($hasPermCreate) : ?>
|
|
|
+ <li><a title="Dodaj nowy rekord"
|
|
|
+ class=""
|
|
|
+ href="#CREATE"><span class="glyphicon glyphicon-plus"></span> Dodaj nowy rekord</a></li>
|
|
|
+ <?php endif; ?>
|
|
|
<?php if ($this->_showProcesInit) : ?>
|
|
|
<div class="btn-group pull-right">
|
|
|
<a class="btn btn-xs btn-info dropdown-toggle"
|
|
|
@@ -3831,6 +3839,17 @@ jQuery(document).ready(function(){
|
|
|
header("Content-type: text/plain");
|
|
|
$DBG = ('1' == V::get('DBG', '', $_REQUEST));
|
|
|
|
|
|
+ if (!$this->_acl->hasCreatePerms()) {
|
|
|
+ ?>
|
|
|
+<div class="container">
|
|
|
+ <div class="alert alert-danger">
|
|
|
+ Brak uprawnień do utworzenia nowego rekordu.
|
|
|
+ </div>
|
|
|
+</div>
|
|
|
+<?php
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
$cols = array();
|
|
|
$forceFilterInit = array();
|
|
|
|