protected function getOutputNaviEntry(interface_model $objInstance)
 {
     if ($objInstance instanceof class_module_eventmanager_event) {
         return getLinkAdmin($this->getArrModule("modul"), "listParticipant", "&systemid=" . $objInstance->getSystemid(), $objInstance->getStrDisplayName());
     }
     if ($objInstance instanceof class_module_eventmanager_participant) {
         return getLinkAdmin($this->getArrModule("modul"), "listParticipant", "&systemid=" . $objInstance->getStrPrevId(), $objInstance->getStrDisplayName());
     }
     return "";
 }
 protected function getOutputNaviEntry(interface_model $objInstance)
 {
     if ($objInstance instanceof class_module_votings_answer) {
         return $objInstance->getStrDisplayName();
     } else {
         if ($objInstance instanceof class_module_votings_voting) {
             return getLinkAdmin($this->getArrModule("modul"), "listAnswers", "&systemid=" . $objInstance->getSystemid(), $objInstance->getStrDisplayName());
         }
     }
     return parent::getOutputNaviEntry($objInstance);
 }
 protected function getOutputNaviEntry(interface_model $objInstance)
 {
     if ($objInstance instanceof class_module_tags_tag) {
         return class_link::getLinkAdmin($this->getArrModule("modul"), "showAssignedRecords", "&systemid=" . $objInstance->getSystemid(), $objInstance->getStrName());
     }
     return null;
 }
 /**
  * Renders the delete action button for the current record.
  * @param \class_model|\interface_model $objListEntry
  * @return string
  */
 protected function renderDeleteAction(interface_model $objListEntry)
 {
     if ($objListEntry->getIntRecordDeleted() == 1) {
         return "";
     }
     if ($objListEntry->rightDelete()) {
         $objLockmanager = $objListEntry->getLockManager();
         if (!$objLockmanager->isAccessibleForCurrentUser()) {
             return $this->objToolkit->listButton(class_adminskin_helper::getAdminImage("icon_deleteLocked", $this->getLang("commons_locked")));
         }
         return $this->objToolkit->listDeleteButton(strip_tags($objListEntry->getStrDisplayName()), $this->getLang($this->getObjLang()->stringToPlaceholder($this->getActionNameForClass("delete", $objListEntry) . "_question"), $objListEntry->getArrModule("modul")), class_link::getLinkAdminHref($objListEntry->getArrModule("modul"), $this->getActionNameForClass("delete", $objListEntry), "&systemid=" . $objListEntry->getSystemid() . $this->strPeAddon));
     }
     return "";
 }
 /**
  * @param interface_model|class_root $objListEntry
  *
  * @return string
  */
 protected function renderDeleteAction(interface_model $objListEntry)
 {
     if ($objListEntry->rightDelete() && $this->getObjModule()->rightDelete()) {
         if (class_module_system_setting::getConfigValue("_packagemanager_defaulttemplate_") == $objListEntry->getStrName()) {
             return $this->objToolkit->listButton(class_adminskin_helper::getAdminImage("icon_deleteDisabled", $this->getLang("pack_active_no_delete")));
         } else {
             return $this->objToolkit->listDeleteButton($objListEntry->getStrDisplayName(), $this->getLang("delete_question"), class_link::getLinkAdminHref($this->getArrModule("modul"), "deleteTemplate", "&systemid=" . $objListEntry->getSystemid() . ""));
         }
     }
     return "";
 }
 /**
  * @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_model $objOneElement
  * @param string $intAllowedLevel
  * @return string
  */
 public static function getPathName(interface_model $objOneElement)
 {
     //fetch the process-path, at least two levels
     $arrParents = $objOneElement->getPathArray();
     // remove first two nodes
     if (count($arrParents) >= 2) {
         array_shift($arrParents);
         array_shift($arrParents);
     }
     //remove current element
     array_pop($arrParents);
     //Only return three levels
     $arrPath = array();
     for ($intI = 0; $intI < 3; $intI++) {
         $strPathId = array_pop($arrParents);
         if (!validateSystemid($strPathId)) {
             break;
         }
         $objObject = class_objectfactory::getInstance()->getObject($strPathId);
         $arrPath[] = $objObject->getStrDisplayName();
     }
     if (count($arrPath) == 0) {
         return "";
     }
     $strPath = implode(" &gt; ", array_reverse($arrPath));
     return $strPath;
 }
 /**
  * @param interface_model $objListEntry
  *
  * @return string
  */
 protected function renderDeleteAction(interface_model $objListEntry)
 {
     if ($objListEntry instanceof class_module_user_user && $objListEntry->rightDelete()) {
         if ($objListEntry->getSystemid() == class_carrier::getInstance()->getObjSession()->getUserID()) {
             return $this->objToolkit->listButton(class_adminskin_helper::getAdminImage("icon_deleteDisabled", $this->getLang("user_loeschen_x")));
         } else {
             return $this->objToolkit->listDeleteButton($objListEntry->getStrDisplayName(), $this->getLang("user_loeschen_frage"), class_link::getLinkAdminHref($this->getArrModule("modul"), "deleteUser", "&systemid=" . $objListEntry->getSystemid()));
         }
     }
     if ($objListEntry instanceof class_module_user_group) {
         if ($objListEntry->getSystemid() != class_module_system_setting::getConfigValue("_guests_group_id_") && $objListEntry->getSystemid() != class_module_system_setting::getConfigValue("_admins_group_id_") && $this->isGroupEditable($objListEntry)) {
             if ($objListEntry->rightDelete()) {
                 return $this->objToolkit->listDeleteButton($objListEntry->getStrDisplayName(), $this->getLang("gruppe_loeschen_frage"), class_link::getLinkAdminHref($this->getArrModule("modul"), "groupDelete", "&systemid=" . $objListEntry->getSystemid()));
             }
         } else {
             return $this->objToolkit->listButton(class_adminskin_helper::getAdminImage("icon_deleteDisabled", $this->getLang("gruppe_loeschen_x")));
         }
     }
     return "";
 }
 /**
  * Serialize an model into an array. Uses the object serializer which 
  * searches in the model for @jsonExport annotations. The system id is 
  * always added
  *
  * @param interface_model $objModel
  * @return array
  */
 protected function serializeObject(interface_model $objModel)
 {
     $objSerializer = new class_object_serializer($objModel);
     return array_merge(array('_id' => $objModel->getSystemid()), $objSerializer->getArrMapping());
 }
 /**
  * @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;
 }
 protected function getOutputNaviEntry(interface_model $objInstance)
 {
     return class_link::getLinkAdmin($this->getArrModule("modul"), "edit", "&systemid=" . $objInstance->getSystemid(), $objInstance->getStrDisplayName());
 }
 /**
  * @param interface_model $objListEntry
  *
  * @return string
  */
 protected function renderDeleteAction(interface_model $objListEntry)
 {
     if ($objListEntry instanceof class_module_system_module) {
         return "";
     }
     if ($objListEntry instanceof class_module_system_aspect && $objListEntry->rightDelete()) {
         return $this->objToolkit->listDeleteButton($objListEntry->getStrName(), $this->getLang("aspect_delete_question"), class_link::getLinkAdminHref($this->getArrModule("modul"), "deleteAspect", "&systemid=" . $objListEntry->getSystemid()));
     }
     return parent::renderDeleteAction($objListEntry);
 }
 /**
  * @param interface_model|class_module_pages_page $objListEntry
  *
  * @return string
  */
 protected function renderDeleteAction(interface_model $objListEntry)
 {
     if ($this->getParam("pe") != "") {
         return "";
     }
     $objLockmanager = $objListEntry->getLockManager();
     if (!$objLockmanager->isAccessibleForCurrentUser()) {
         return $this->objToolkit->listButton(class_adminskin_helper::getAdminImage("icon_deleteLocked", $this->getLang("commons_locked")));
     } else {
         if ($objListEntry instanceof class_module_pages_page && $objListEntry->rightDelete()) {
             return $this->objToolkit->listDeleteButton($objListEntry->getStrDisplayName(), $this->getLang("seite_loeschen_frage"), class_link::getLinkAdminHref($this->getArrModule("modul"), "deletePageFinal", "&systemid=" . $objListEntry->getSystemid()));
         } else {
             if ($objListEntry instanceof class_module_pages_folder && $objListEntry->rightDelete()) {
                 return $this->objToolkit->listDeleteButton($objListEntry->getStrDisplayName(), $this->getLang("pages_ordner_loeschen_frage"), class_link::getLinkAdminHref($this->getArrModule("modul"), "deleteFolderFinal", "&systemid=" . $objListEntry->getSystemid()));
             } else {
                 if ($objListEntry instanceof class_module_pages_element && $objListEntry->rightDelete()) {
                     return $this->objToolkit->listDeleteButton($objListEntry->getStrDisplayName(), $this->getLang("element_loeschen_frage"), class_link::getLinkAdminHref($this->getArrModule("modul"), "deleteElement", "&elementid=" . $objListEntry->getSystemid()));
                 } else {
                     return parent::renderDeleteAction($objListEntry);
                 }
             }
         }
     }
 }