protected function renderAdditionalActions(class_model $objListEntry)
 {
     if ($objListEntry->rightEdit() && $objListEntry instanceof class_module_votings_voting) {
         return array($this->objToolkit->listButton(getLinkAdmin($this->getArrModule("modul"), "listAnswers", "&systemid=" . $objListEntry->getSystemid(), "", $this->getLang("action_list_answers"), "icon_folderActionOpen")));
     }
     return parent::renderAdditionalActions($objListEntry);
 }
 /**
  * This method is called, when the widget should generate it's content.
  * Return the complete content using the methods provided by the base class.
  * Do NOT use the toolkit right here!
  *
  * @return string
  */
 public function getWidgetOutput()
 {
     $strReturn = "";
     $strReturn .= $this->widgetText($this->getLang("workflows_intro"));
     $strReturn .= $this->widgetText(class_module_workflows_workflow::getPendingWorkflowsForUserCount(array_merge(array(class_carrier::getInstance()->getObjSession()->getUserID()), class_carrier::getInstance()->getObjSession()->getGroupIdsAsArray())));
     $strReturn .= $this->widgetText(getLinkAdmin("workflows", "myList", "", $this->getLang("workflows_show")));
     return $strReturn;
 }
 /**
  * Creates a summary of the message
  *
  * @return string
  */
 protected function actionView()
 {
     /** @var class_module_messaging_message $objMessage */
     $objMessage = class_objectfactory::getInstance()->getObject($this->getSystemid());
     //different permission handlings
     if ($objMessage !== null && !$objMessage->rightView()) {
         return $this->strOutput = $this->getLang("commons_error_permissions");
     } else {
         if ($objMessage == null) {
             $strText = $this->getLang("message_not_existing");
             $strOk = $this->getLang("commons_ok");
             $strLink = class_link::getLinkAdminHref($this->getArrModule("modul"), "list");
             $strCore = class_resourceloader::getInstance()->getCorePathForModule("module_v4skin");
             $strMessage = "<script type='text/javascript'>\n                KAJONA.admin.loader.loadFile('_webpath_{$strCore}/module_v4skin/admin/skins/kajona_v4/js/kajona_dialog.js', function() {\n                    jsDialog_1.setTitle('&nbsp; ');\n                    jsDialog_1.setContent('{$strText}', '{$strOk}', '{$strLink}'); jsDialog_1.init();\n                    \$('#'+jsDialog_1.containerId+'_cancelButton').css('display', 'none');\n                });\n            </script>";
             return $strMessage;
         }
     }
     if ($objMessage->getStrUser() == $this->objSession->getUserID()) {
         $strReturn = "";
         if (!$objMessage->getBitRead()) {
             $objMessage->setBitRead(true);
             $objMessage->updateObjectToDb();
         }
         $objSender = new class_module_user_user($objMessage->getStrSenderId());
         $strReference = "";
         if (validateSystemid($objMessage->getStrMessageRefId())) {
             $objRefMessage = new class_module_messaging_message($objMessage->getStrMessageRefId());
             $strReference = $objRefMessage->getStrDisplayName();
             if ($objRefMessage->rightView()) {
                 $strReference = getLinkAdmin($this->getArrModule("modul"), "view", "&systemid=" . $objRefMessage->getSystemid(), $strReference, "", "", false);
             }
         }
         $arrMetaData = array(array($this->getLang("message_subject"), $objMessage->getStrTitle()), array($this->getLang("message_date"), dateToString($objMessage->getObjDate())), array($this->getLang("message_type"), $objMessage->getObjMessageProvider()->getStrName()), array($this->getLang("message_sender"), $objSender->getStrDisplayName()), array($this->getLang("message_reference"), $strReference));
         $strReturn .= $this->objToolkit->dataTable(null, $arrMetaData);
         $strBody = nl2br($objMessage->getStrBody());
         $strBody = replaceTextLinks($strBody);
         $strReturn .= $this->objToolkit->getFieldset($objMessage->getStrTitle(), $this->objToolkit->getTextRow($strBody));
         return $strReturn;
     } else {
         return $this->getLang("commons_error_permissions");
     }
 }
 /**
  * @see interface_calendarsource_admin::getArrCalendarEntries()
  */
 public function getArrCalendarEntries(class_date $objStartDate, class_date $objEndDate)
 {
     $arrEntries = array();
     if ($this->objSession->getSession(self::STR_CALENDAR_FILTER_EVENT) != "disabled") {
         $arrEvents = class_module_eventmanager_event::getAllEvents(null, null, $objStartDate, $objEndDate);
         foreach ($arrEvents as $objOneEvent) {
             $objEntry = new class_calendarentry();
             $strAlt = $this->getLang("calendar_type_event");
             $strTitle = $objOneEvent->getStrTitle();
             if (uniStrlen($strTitle) > 15) {
                 $strAlt = $strTitle . "<br />" . $strAlt;
                 $strTitle = uniStrTrim($strTitle, 14);
             }
             $strName = getLinkAdmin($this->arrModule["modul"], "edit", "&systemid=" . $objOneEvent->getSystemid(), $strTitle, $strAlt);
             $objEntry->setStrName($strName);
             $arrEntries[] = $objEntry;
         }
     }
     return $arrEntries;
 }
 public function getOutputModuleNavi()
 {
     $arrReturn = array();
     $arrReturn[] = array("view", getLinkAdmin($this->arrModule["modul"], "list", "", $this->getLang("commons_list"), "", "", true, "adminnavi"));
     return $arrReturn;
 }
 /**
  * @param string $strListIdentifier
  * @param bool $bitDialog
  *
  * @return array|string
  */
 protected function getNewEntryAction($strListIdentifier, $bitDialog = false)
 {
     if ($strListIdentifier == "moduleList") {
         return "";
     }
     if ($strListIdentifier == "aspectList" && $this->getObjModule()->rightEdit()) {
         return $this->objToolkit->listButton(getLinkAdmin($this->getArrModule("modul"), "newAspect", "", $this->getLang("aspect_create"), $this->getLang("aspect_create"), "icon_new"));
     }
     return parent::getNewEntryAction($strListIdentifier);
 }
 protected function renderAdditionalActions(class_model $objListEntry)
 {
     if ($objListEntry instanceof class_module_guestbook_guestbook) {
         return array($this->objToolkit->listButton(getLinkAdmin($this->arrModule["modul"], "listPost", "&systemid=" . $objListEntry->getSystemid(), "", $this->getLang("action_view_guestbook"), "icon_bookLens")));
     }
 }
 /**
  * Renders the list of available packages or any other kind of gui-representation
  * of the packageprovider.
  *
  * Whenever the provider is capable of uploading new packages, the copy & and upload process
  * should be triggered by the admin-class again.
  * So make sure links or forms point to
  * module = packagemanager
  * action = uploadPackage
  * provider = class_name
  * The provider will be called using the processPackageUpload method.
  *
  * @throws class_exception
  * @return string
  */
 public function renderPackageList()
 {
     $objUser = new class_module_user_user(class_session::getInstance()->getUserID());
     $intStart = ($this->getPageNumber() - 1) * $objUser->getIntItemsPerPage();
     $intEnd = $intStart + $objUser->getIntItemsPerPage() - 1;
     $objToolkit = class_carrier::getInstance()->getObjToolkit("admin");
     $objLang = class_carrier::getInstance()->getObjLang();
     $objManager = new class_module_packagemanager_manager();
     $objRemoteloader = $this->getRemoteloader();
     $objRemoteloader->setStrQueryParams($this->buildQueryParams($intStart, $intEnd));
     $strResponse = "";
     try {
         $strResponse = $objRemoteloader->getRemoteContent();
     } catch (class_exception $objEx) {
         return $objLang->getLang("package_remote_errorloading", self::$STR_MODULE_NAME);
     }
     $arrResponse = json_decode($strResponse, true);
     if ($arrResponse === null) {
         throw new class_exception("Error loading the remote package list. Got: <br />" . htmlToString($strResponse, true), class_exception::$level_ERROR);
     }
     $objRemoteParser = class_module_packagemanager_remoteparser_factory::getRemoteParser($arrResponse, $this->getPageNumber(), $intStart, $intEnd, get_class($this), "&name=" . urlencode($this->getParam("name")) . "&type=" . $this->getParam("type"));
     $arrPackages = $objRemoteParser->getArrPackages();
     $strReturn = $this->createFilterCriteria();
     $strReturn .= $objToolkit->listHeader();
     if (!$this->containsItems($arrPackages)) {
         $strReturn .= $objToolkit->getTextRow($objLang->getLang("commons_list_empty", null));
     } else {
         $intI = 0;
         foreach ($arrPackages as $arrOnePackage) {
             //check if already installed locally
             if ($objManager->getPackage($arrOnePackage["title"]) !== null) {
                 $strAction = $objToolkit->listButton(getImageAdmin("icon_installDisabled", $objLang->getLang("package_noinstall_installed", self::$STR_MODULE_NAME)));
             } else {
                 $strAction = $objToolkit->listButton(getLinkAdmin(self::$STR_MODULE_NAME, "uploadPackage", "provider=" . get_class($this) . "&systemid=" . $arrOnePackage["systemid"], $objLang->getLang("package_install", self::$STR_MODULE_NAME), $objLang->getLang("package_install", self::$STR_MODULE_NAME), "icon_install"));
             }
             $strIcon = "icon_module";
             if ($arrOnePackage["type"] == "TEMPLATE") {
                 $strIcon = "icon_dot";
             }
             $arrOnePackage["version"] = $objLang->getLang("type_" . $arrOnePackage["type"], self::$STR_MODULE_NAME) . ", V " . $arrOnePackage["version"];
             $strReturn .= $objToolkit->genericAdminList($arrOnePackage["systemid"], $arrOnePackage["title"], getImageAdmin($strIcon), $strAction, $intI++, $arrOnePackage["version"], $arrOnePackage["description"]);
         }
     }
     $strReturn .= $objToolkit->listFooter();
     $strReturn .= $objRemoteParser->paginationFooter();
     return $strReturn;
 }
 /**
  * @param class_model $objListEntry
  * @param bool $bitDialog
  *
  * @return string
  */
 protected function renderEditAction(class_model $objListEntry, $bitDialog = false)
 {
     if ($objListEntry instanceof class_module_pages_element) {
         if ($objListEntry->rightEdit()) {
             return $this->objToolkit->listButton(getLinkAdmin("pages", "editElement", "&systemid=" . $objListEntry->getSystemid(), $this->getLang("element_bearbeiten"), $this->getLang("element_bearbeiten"), "icon_edit"));
         }
     } else {
         if ($objListEntry instanceof class_module_pages_folder) {
             return parent::renderEditAction($objListEntry, true);
         } else {
             return parent::renderEditAction($objListEntry);
         }
     }
     return "";
 }
 /**
  * Creates a pathnavigation through all folders till the current page / folder
  *
  * @return array
  */
 protected function getArrOutputNaviEntries()
 {
     $arrPathLinks = parent::getArrOutputNaviEntries();
     foreach ($this->getArrReports() as $objOneReport) {
         if ($this->getActionForReport($objOneReport) == $this->getParam("action")) {
             $arrPathLinks[] = getLinkAdmin($this->getArrModule("modul"), $this->getActionForReport($objOneReport), "", $objOneReport->getTitle());
         }
     }
     return $arrPathLinks;
 }