$(function() { $('.action-delete').on('click', function(event) { event.preventDefault(); var href = $(this).attr('href'); var ID = href.split('/').slice(-1)[0]; var dialogDiv = $('
').appendTo('body'); $(dialogDiv).dialog({ resizable: false, width: '400px', modal: true, closeOnEscape: true, position: ['center', 'center'], close: function(event) { event.preventDefault(); $(this).remove(); $('#content-table-inner').blockUI(); $.ajax({ type: 'POST', url: 'url('file_avatar_action', array('action' => 'delete', 'id' => '')); ?>' + ID, data: {id: ID} }).done(function(response) { //jezeli odpowiedź ok to odśwież tabelę (za pomocą paginatora pobierz tą samą stronę) //jeżeli odpowiedż error to wyswietl go $('#content-table-inner').unblockUI(); return true; }).fail(function() { $('#content-table-inner').unblockUI(); //wyswietl error return false; }); }, open: function(event) { event.preventDefault(); $(this).empty(); dialogDiv.append(''); }, buttons: { 'translator->translate('main_cancel'); ?>': function() { $(this).dialog("close"); }, 'translator->translate('delete'); ?>': function() { $(this).dialog("close"); } } }); }); }); */ ?> fileRows) { echo ""; echo "", $this->Msg('Brak wyników'), ""; echo ""; } else { ?> fileRows as $phraseRow): ?> isAllowed($identity['username'], 'content-file_avatar') && $acl->isAllowed($identity['username'], 'file_avatar-details')) ? true : false; $allowToggleActive = ($acl->isAllowed($identity['username'], 'file_avatar-toggle_active') && $acl->isAllowed($identity['username'], 'file_avatar-toggle_active')) ? true : false; $allowChangeGroup = ($acl->isAllowed($identity['username'], 'file_avatar-change_group') && $acl->isAllowed($identity['username'], 'file_avatar-change_group')) ? true : false; $allowOverrideFile = ($acl->isAllowed($identity['username'], 'file_avatar-override_file') && $acl->isAllowed($identity['username'], 'file_avatar-override_file')) ? true : false; $allowDelete = ($acl->isAllowed($identity['username'], 'file_avatar-delete') && $acl->isAllowed($identity['username'], 'file_avatar-delete')) ? true : false; $options = ''; if ($phraseRow['status'] == 'VIS') { $optionLabel = 'inactivate'; } else { $optionLabel = 'activate'; } $options .= $allowView ? "
  • url('file_avatar_action', array('action' => 'details', 'id' => $escaper->escapeHtml($phraseRow['avatar_id'])))}\">{$this->translator->translate('view', 'content_file_avatar')}
  • " : ''; $options .= $allowToggleActive ? "
  • url('file_avatar_action', array('action' => 'toggleActive', 'id' => $escaper->escapeHtml($phraseRow['avatar_id'])))}\">{$this->translator->translate($optionLabel, 'content_file_avatar')}
  • " : ''; $options .= $allowChangeGroup ? "
  • url('file_avatar_action', array('action' => 'changeGroup', 'id' => $escaper->escapeHtml($phraseRow['avatar_id'])))}\">{$this->translator->translate('change_group', 'content_file_avatar')}
  • " : ''; $options .= $allowOverrideFile ? "
  • url('file_avatar_action', array('action' => 'overrideFile', 'id' => $escaper->escapeHtml($phraseRow['avatar_id'])))}\">{$this->translator->translate('override_file', 'content_file_avatar')}
  • " : ''; $options .= $allowDelete ? "
  • url('file_avatar_action', array('action' => 'delete', 'id' => $escaper->escapeHtml($phraseRow['avatar_id'])))}\">{$this->translator->translate('delete', 'content_file_avatar')}
  • " : ''; if ($options != '') { $options = "

    {$this->translator->translate('options')}

    '; } ?> escapeHtml($phraseRow['avatar_id']); ?> escapeHtml($phraseRow['avatar_name']); ?> translator->translate('VIS', 'content_file_avatar');; } else { echo $this->translator->translate('HID', 'content_file_avatar');; } ?>