/** * @param class_model|interface_admin_listable|interface_model $objOneIterable * @param string $strListIdentifier * * @return string */ public function getActionIcons($objOneIterable, $strListIdentifier = "") { if ($strListIdentifier == "searchResultList") { //call the original module to render the action-icons $objAdminInstance = class_module_system_module::getModuleByName($objOneIterable->getArrModule("modul"))->getAdminInstanceOfConcreteModule(); if ($objAdminInstance != null && $objAdminInstance instanceof class_admin_simple) { return $objAdminInstance->getActionIcons($objOneIterable); } } return parent::getActionIcons($objOneIterable, $strListIdentifier); }
/** * @param interface_admin_listable $objOneIterable * @param string $strListIdentifier * * @return string */ protected function renderGridEntryClickAction($objOneIterable, $strListIdentifier) { if ($strListIdentifier == self::INT_LISTTYPE_FOLDERVIEW && $objOneIterable instanceof class_module_mediamanager_file) { if ($objOneIterable->getIntType() == class_module_mediamanager_file::$INT_TYPE_FOLDER) { return "onclick=\"document.location='" . class_link::getLinkAdminHref($this->getArrModule("modul"), "folderContentFolderviewMode", "&form_element=" . $this->getParam("form_element") . "&systemid=" . $objOneIterable->getSystemid()) . "'\""; } else { if ($objOneIterable->getIntType() == class_module_mediamanager_file::$INT_TYPE_FILE) { $strValue = $objOneIterable->getStrFilename(); $arrMime = $this->objToolkit->mimeType($strValue); $bitImage = false; if ($arrMime[1] == "jpg" || $arrMime[1] == "png" || $arrMime[1] == "gif") { $bitImage = true; } if ($bitImage && $this->getParam("form_element") == "ckeditor") { $strValue = _webpath_ . "/image.php?image=" . $strValue; } else { $strValue = _webpath_ . $strValue; } return "onclick=\"KAJONA.admin.folderview.selectCallback([['" . $this->getParam("form_element") . "', '" . $strValue . "']]);\""; } } return ""; } return parent::renderGridEntryClickAction($objOneIterable, $strListIdentifier); }
/** * @param class_model|interface_admin_listable|interface_model|class_module_pages_pageelement $objOneIterable * @param string $strListIdentifier * * @return string */ public function getActionIcons($objOneIterable, $strListIdentifier = "") { $strActions = ""; if ($objOneIterable instanceof class_module_pages_pageelement) { $objLockmanager = $objOneIterable->getLockManager(); //Create a row to handle the element, check all necessary stuff such as locking etc $strActions = ""; //First step - Record locked? Offer button to unlock? But just as admin! For the user, who locked the record, the unlock-button //won't be visible if (!$objLockmanager->isAccessibleForCurrentUser()) { //So, return a button, if we have an admin in front of us if ($objLockmanager->isUnlockableForCurrentUser()) { $strActions .= $this->objToolkit->listButton(class_link::getLinkAdmin("pages_content", "list", "&systemid=" . $this->getSystemid() . "&adminunlockid=" . $objOneIterable->getSystemid(), "", $this->getLang("ds_entsperren"), "icon_lockerOpen")); } //If the Element is locked, then its not allowed to edit or delete the record, so disable the icons if ($objOneIterable->rightEdit()) { $strActions .= $this->objToolkit->listButton(class_adminskin_helper::getAdminImage("icon_editLocked", $this->getLang("ds_gesperrt"))); } if ($objOneIterable->rightDelete()) { $strActions .= $this->objToolkit->listButton(class_adminskin_helper::getAdminImage("icon_deleteLocked", $this->getLang("ds_gesperrt"))); } } else { if ($objOneIterable->rightEdit()) { $strActions .= $this->objToolkit->listButton(class_link::getLinkAdmin("pages_content", "edit", "&systemid=" . $objOneIterable->getSystemid(), "", $this->getLang("element_bearbeiten"), "icon_edit")); } if ($objOneIterable->rightDelete()) { $strActions .= $this->objToolkit->listDeleteButton($objOneIterable->getStrName() . ($objOneIterable->getConcreteAdminInstance()->getContentTitle() != "" ? " - " . $objOneIterable->getConcreteAdminInstance()->getContentTitle() : "") . ($objOneIterable->getStrTitle() != "" ? " - " . $objOneIterable->getStrTitle() : ""), $this->getLang("element_loeschen_frage"), class_link::getLinkAdminHref("pages_content", "deleteElementFinal", "&systemid=" . $objOneIterable->getSystemid() . ($this->getParam("pe") == "" ? "" : "&peClose=" . $this->getParam("pe")))); } } //The Icons to sort the list and to copy the element $strActions .= $this->objToolkit->listButton(class_link::getLinkAdminDialog("pages_content", "copyElement", "&systemid=" . $objOneIterable->getSystemid(), "", $this->getLang("element_copy"), "icon_copy")); //The status-icons $strActions .= $this->objToolkit->listStatusButton($objOneIterable->getSystemid()); } else { if ($objOneIterable instanceof class_module_pages_element) { $objAdminInstance = class_module_system_module::getModuleByName("pages")->getAdminInstanceOfConcreteModule(); if ($objAdminInstance != null && $objAdminInstance instanceof class_admin_simple) { return $objAdminInstance->getActionIcons($objOneIterable); } } } return $strActions; }
/** * Renders a simple admin-object, implementing interface_model * * @param interface_admin_listable|interface_model|class_model $objEntry * @param string $strActions * @param int $intCount * @param bool $bitCheckbox * * @return string */ public function simpleAdminList(interface_admin_listable $objEntry, $strActions, $intCount, $bitCheckbox = false) { $strImage = $objEntry->getStrIcon(); if (is_array($strImage)) { $strImage = class_adminskin_helper::getAdminImage($strImage[0], $strImage[1]); } else { $strImage = class_adminskin_helper::getAdminImage($strImage); } $strCSSAddon = ""; if (method_exists($objEntry, "getIntRecordStatus")) { $strCSSAddon = $objEntry->getIntRecordStatus() == 0 ? "disabled" : ""; } return $this->genericAdminList($objEntry->getSystemid(), $objEntry->getStrDisplayName(), $strImage, $strActions, $intCount, $objEntry->getStrAdditionalInfo(), $objEntry->getStrLongDescription(), $bitCheckbox, $strCSSAddon); }