/** * @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; }
/** * @param class_model * @param string $strAltActive tooltip text for the icon if record is active * @param string $strAltInactive tooltip text for the icon if record is inactive * * @return string */ protected function renderStatusAction(class_model $objListEntry, $strAltActive = "", $strAltInactive = "") { if ($objListEntry->rightEdit()) { if (class_module_system_setting::getConfigValue("_packagemanager_defaulttemplate_") == $objListEntry->getStrName()) { return $this->objToolkit->listButton(class_adminskin_helper::getAdminImage("icon_enabled", $this->getLang("pack_active_no_status"))); } else { return $this->objToolkit->listStatusButton($objListEntry, true); } } return ""; }
/** * @param class_model $objListEntry * * @return array */ protected function renderAdditionalActions(class_model $objListEntry) { if ($objListEntry instanceof class_module_system_module) { $arrReturn = array(); $arrReturn[] = $this->objToolkit->listButton(class_link::getLinkAdminDialog("system", "moduleAspect", "&systemid=" . $objListEntry->getSystemid(), "", $this->getLang("modul_aspectedit"), "icon_aspect", $this->getLang("modul_aspectedit"))); if ($objListEntry->rightEdit() && class_carrier::getInstance()->getObjSession()->isSuperAdmin()) { if ($objListEntry->getStrName() == "system") { $arrReturn[] = $this->objToolkit->listButton(class_link::getLinkAdmin("system", "moduleList", "", "", $this->getLang("modul_status_system"), "icon_enabled")); } else { if ($objListEntry->getIntRecordStatus() == 0) { $arrReturn[] = $this->objToolkit->listButton(class_link::getLinkAdmin("system", "moduleStatus", "&systemid=" . $objListEntry->getSystemid(), "", $this->getLang("modul_status_disabled"), "icon_disabled")); } else { $arrReturn[] = $this->objToolkit->listButton(class_link::getLinkAdmin("system", "moduleStatus", "&systemid=" . $objListEntry->getSystemid(), "", $this->getLang("modul_status_enabled"), "icon_enabled")); } } } return $arrReturn; } return parent::renderAdditionalActions($objListEntry); }