Initial import
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
/**
|
||||
* @var $data array
|
||||
* @var $actions array
|
||||
* @var $exportData array
|
||||
*/
|
||||
|
||||
use app\widgets\services\UserRight;
|
||||
|
||||
if (!empty($_GET['roletest'])) {
|
||||
$partner = \app\services\Auth::userPartner();
|
||||
if ($partner) {
|
||||
foreach ($partner->userRights as $right) {
|
||||
echo '<br> ' . $right->right_id;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (isset($actions['new']) || isset($actions['edit']) || isset($actions['delete']) || !empty($exportData)): ?>
|
||||
<div style="margin-bottom: 10px;" class="action-buttons">
|
||||
<?php if (isset($actions['new']) && UserRight::add()): ?>
|
||||
<a id="bNew" href="?o=w<?= !empty($_GET['listtab']) ? '&listtab=' . $_GET['listtab'] : '' ?>"
|
||||
class="btn-ib btn-default ct">
|
||||
<i class="la la-plus-circle"></i> <?= $actions['new'] ?>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
<?php if (sizeof($data['list'])): ?>
|
||||
<?php if (isset($actions['edit']) && UserRight::edit()): ?>
|
||||
<a id="bEdit" class="btn-ib btn-default ct disabled">
|
||||
<i class="la la-edit"></i> <?= $actions['edit'] ?>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($actions['delete']) && UserRight::del()): ?>
|
||||
<a id="bDelete" data-model="<?= $data['model'] ?? null ?>" onclick="checkDelete(this)"
|
||||
class="btn-ib btn-default ct disabled">
|
||||
<i class="la la-trash-o"></i> <?= $actions['delete'] ?> <span id="delCount">(0)</span>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
<?php if (!empty($exportData)): ?>
|
||||
<a id="exportDate" href="<?= !empty($_GET['q']) ? '?q=' . $_GET['q'] . '&export=1' : '?export=1' ?>"
|
||||
class="btn-ib btn-default ct">
|
||||
<i class="la la-file-export"></i> <?= !empty($actions['export']) ? $actions['export'] : 'Export' ?>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
Reference in New Issue
Block a user