function getHTML() { if ($this->getCurrentDetailLevel() == 0) { return ""; } else { return parent::getHTML(); } }
/** * Get bloch HTML code. */ function getHTML($a_export = false) { global $ilCtrl, $lng, $ilUser, $ilAccess; $this->export = $a_export; if (!$this->export && $ilAccess->checkAccess("write", "", $_GET["ref_id"])) { $this->addBlockCommand($ilCtrl->getLinkTargetByClass("ilobjwikigui", "editImportantPages"), $lng->txt("edit"), "_top"); } return parent::getHTML(); }
function getHTML() { // workaround to show details row $this->setData(array("dummy")); if ($this->getCurrentDetailLevel() == 0) { return ""; } else { return parent::getHTML(); } }
/** * @return string */ public function getHTML() { ilYuiUtil::initJson(); $chatSetting = new ilSetting('chatroom'); if ($this->getCurrentDetailLevel() == 0 || !$chatSetting->get('chat_enabled', 0) || !(bool) @ilChatroomServerConnector::checkServerConnection()) { return ''; } else { return parent::getHTML(); } }
public function getHTML() { global $tpl, $ilCtrl; if (!$ilCtrl->isAsynch()) { unset($_SESSION[self::getBlockType()]); } $this->initProviders(); if (!$this->validate()) { return ""; } $tpl->addJavaScript("Services/Classification/js/ilClassification.js"); return parent::getHTML(); }
public function getHTML() { global $ilUser, $rbacsystem; $umail = new ilMail($ilUser->getId()); if (!$rbacsystem->checkAccess('internal_mail', $umail->getMailObjectReferenceId())) { return ''; } if ($this->getCurrentDetailLevel() == 0) { return ''; } else { $html = parent::getHTML(); return $html; } }
function getHTML() { return parent::getHTML(); }
/** * Get bloch HTML code. */ function getHTML() { global $ilCtrl, $lng, $ilUser; $news_set = new ilSetting("news"); $enable_internal_rss = $news_set->get("enable_rss_for_internal"); $hide_block = ilBlockSetting::_lookup($this->getBlockType(), "hide_news_block", 0, $this->block_id); if ($hide_block) { $this->setFooterInfo($lng->txt("news_hidden_news_block")); } if ($this->getProperty("title") != "") { $this->setTitle($this->getProperty("title")); } $public_feed = ilBlockSetting::_lookup($this->getBlockType(), "public_feed", 0, $this->block_id); if ($public_feed) { if ($enable_internal_rss) { $this->addBlockCommand(ILIAS_HTTP_PATH . "/feed.php?client_id=" . rawurlencode(CLIENT_ID) . "&" . "ref_id=" . $_GET["ref_id"], $lng->txt("news_feed_url"), "_blank", ilUtil::getImagePath("rss.png")); } } /* Subscription Concept is abandonded for now (Alex) // subscribe/unsibscribe link include_once("./Services/News/classes/class.ilNewsSubscription.php"); if (ilNewsSubscription::_hasSubscribed($_GET["ref_id"], $ilUser->getId())) { $this->addBlockCommand( $ilCtrl->getLinkTarget($this, "unsubscribeNews"), $lng->txt("news_unsubscribe")); } else { $this->addBlockCommand( $ilCtrl->getLinkTarget($this, "subscribeNews"), $lng->txt("news_subscribe")); } */ // add edit commands if ($this->getEnableEdit()) { $this->addBlockCommand($ilCtrl->getLinkTargetByClass("ilnewsitemgui", "editNews"), $lng->txt("edit")); $ilCtrl->setParameter($this, "add_mode", "block"); $this->addBlockCommand($ilCtrl->getLinkTargetByClass("ilnewsitemgui", "createNewsItem"), $lng->txt("add")); $ilCtrl->setParameter($this, "add_mode", ""); } if ($this->getProperty("settings") == true) { $this->addBlockCommand($ilCtrl->getLinkTarget($this, "editSettings"), $lng->txt("settings")); } // do not display hidden repository news blocks for users // who do not have write permission if (!$this->getEnableEdit() && $this->getRepositoryMode() && ilBlockSetting::_lookup($this->getBlockType(), "hide_news_block", 0, $this->block_id)) { return ""; } // do not display empty news blocks for users // who do not have write permission if (count($this->getData()) == 0 && !$this->getEnableEdit() && $this->getRepositoryMode() && !$this->dynamic && (!$news_set->get("enable_rss_for_internal") || !ilBlockSetting::_lookup($this->getBlockType(), "public_feed", 0, $this->block_id))) { return ""; } $en = ""; if ($ilUser->getPref("il_feed_js") == "n") { // $en = getJSEnabler(); } return parent::getHTML() . $en; }
/** * Get bloch HTML code. */ function getHTML() { global $ilCtrl, $lng, $ilUser; return parent::getHTML(); }
/** * Get block HTML code. */ function getHTML() { global $ilCtrl, $lng, $ilAccess, $ilUser; $this->poll_block->setRefId($this->getRefId()); $this->may_write = $ilAccess->checkAccess("write", "", $this->getRefId()); $this->has_content = $this->poll_block->hasAnyContent($ilUser->getId(), $this->getRefId()); if (!$this->may_write && !$this->has_content) { return ""; } $poll_obj = $this->poll_block->getPoll(); $this->setTitle($poll_obj->getTitle()); $this->setData(array($poll_obj)); $ilCtrl->setParameterByClass($this->getRepositoryObjectGUIName(), "ref_id", $this->getRefId()); if (!$this->poll_block->getMessage($ilUser->getId())) { // notification include_once "./Services/Notification/classes/class.ilNotification.php"; if (ilNotification::hasNotification(ilNotification::TYPE_POLL, $ilUser->getId(), $this->poll_block->getPoll()->getId())) { $this->addBlockCommand($ilCtrl->getLinkTargetByClass(array("ilrepositorygui", $this->getRepositoryObjectGUIName()), "unsubscribe"), $lng->txt("poll_notification_unsubscribe")); } else { $this->addBlockCommand($ilCtrl->getLinkTargetByClass(array("ilrepositorygui", $this->getRepositoryObjectGUIName()), "subscribe"), $lng->txt("poll_notification_subscribe")); } } if ($this->may_write) { // edit $this->addBlockCommand($ilCtrl->getLinkTargetByClass(array("ilrepositorygui", $this->getRepositoryObjectGUIName()), "render"), $lng->txt("edit_content")); $this->addBlockCommand($ilCtrl->getLinkTargetByClass(array("ilrepositorygui", $this->getRepositoryObjectGUIName()), "edit"), $lng->txt("settings")); /* delete (#10993 - see ilBlockGUI) $parent_id = $tree->getParentId($this->getRefId()); $type = ilObject::_lookupType($parent_id, true); $class = $objDefinition->getClassName($type); if($class) { $class = "ilobj".strtolower($class)."gui"; $ilCtrl->setParameterByClass($class, "ref_id", $parent_id); $ilCtrl->setParameterByClass($class, "item_ref_id", $this->getRefId()); $this->addBlockCommand( $ilCtrl->getLinkTargetByClass($class, "delete"), $lng->txt("delete")); } */ } $ilCtrl->clearParametersByClass($this->getRepositoryObjectGUIName()); return parent::getHTML(); }
/** * Get bloch HTML code. */ function getHTML() { global $ilCtrl, $lng, $ilUser, $ilAccess; if ($this->getCurrentDetailLevel() == 0) { return ""; } // add edit commands #if ($this->getEnableEdit()) if ($this->mode == ilCalendarCategories::MODE_PERSONAL_DESKTOP_ITEMS or $this->mode == ilCalendarCategories::MODE_PERSONAL_DESKTOP_MEMBERSHIP) { include_once "./Services/News/classes/class.ilRSSButtonGUI.php"; $this->addBlockCommand($this->ctrl->getLinkTarget($this, 'showCalendarSubscription'), $lng->txt('ical_export'), "", "", true, false, ilRSSButtonGUI::get(ilRSSButtonGUI::ICON_ICAL)); } if ($this->mode == ilCalendarCategories::MODE_REPOSITORY) { if (!isset($_GET["bkid"])) { if ($ilAccess->checkAccess('edit_event', '', (int) $_GET['ref_id'])) { $ilCtrl->setParameter($this, "add_mode", "block"); $this->addBlockCommand($ilCtrl->getLinkTargetByClass("ilCalendarAppointmentGUI", "add"), $lng->txt("add_appointment")); $ilCtrl->setParameter($this, "add_mode", ""); } global $ilObjDataCache; include_once "Modules/Course/classes/class.ilCourseParticipants.php"; $obj_id = $ilObjDataCache->lookupObjId((int) $_GET['ref_id']); $participants = ilCourseParticipants::_getInstanceByObjId($obj_id); $users = array_unique(array_merge($participants->getTutors(), $participants->getAdmins())); //$users = $participants->getParticipants(); include_once 'Services/Booking/classes/class.ilBookingEntry.php'; //$users = ilBookingEntry::isBookable($users, $obj_id); $users = ilBookingEntry::lookupBookableUsersForObject($obj_id, $users); if ($users) { foreach ($users as $user_id) { if (!isset($_GET["bkid"])) { $ilCtrl->setParameter($this, "bkid", $user_id); $this->addBlockCommand($ilCtrl->getLinkTargetByClass("ilCalendarMonthGUI", ""), $lng->txt("cal_consultation_hours_for") . ' ' . ilObjUser::_lookupFullname($user_id)); $this->cal_footer[] = array('link' => $ilCtrl->getLinkTargetByClass('ilCalendarMonthGUI', ''), 'txt' => $lng->txt("cal_consultation_hours_for") . ' ' . ilObjUser::_lookupFullname($user_id)); } } $ilCtrl->setParameter($this, "bkid", ""); } } else { $ilCtrl->setParameter($this, "bkid", ""); $this->addBlockCommand($ilCtrl->getLinkTarget($this), $lng->txt("back")); $ilCtrl->setParameter($this, "bkid", (int) $_GET["bkid"]); } } if ($this->getProperty("settings") == true) { $this->addBlockCommand($ilCtrl->getLinkTarget($this, "editSettings"), $lng->txt("settings")); } $ilCtrl->setParameterByClass("ilcolumngui", "seed", isset($_GET["seed"]) ? $_GET["seed"] : ""); $ret = parent::getHTML(); $ilCtrl->setParameterByClass("ilcolumngui", "seed", ""); return $ret; }
function getHTML() { global $ilUser; $this->users_online_pref = $ilUser->getPref("show_users_online"); if ($this->users_online_pref != "y" && $this->users_online_pref != "associated") { return ""; } $this->getUsers(); if ($this->getCurrentDetailLevel() == 0) { return ""; } else { return parent::getHTML(); } }
/** * Get bloch HTML code. */ function getHTML() { global $ilCtrl, $lng, $ilUser; // set footer info $this->setFooterInfo($lng->txt("news_block_information"), true); $news_set = new ilSetting("news"); $enable_internal_rss = $news_set->get("enable_rss_for_internal"); $allow_shorter_periods = $news_set->get("allow_shorter_periods"); $allow_longer_periods = $news_set->get("allow_longer_periods"); $enable_private_feed = $news_set->get("enable_private_feed"); // subscribe/unsibscribe link include_once "./Services/News/classes/class.ilNewsSubscription.php"; // show feed url if ($enable_internal_rss) { include_once "./Services/News/classes/class.ilRSSButtonGUI.php"; $this->addBlockCommand($ilCtrl->getLinkTarget($this, "showFeedUrl"), $lng->txt("news_get_feed_url"), "", "", true, false, ilRSSButtonGUI::get(ilRSSButtonGUI::ICON_RSS)); } if ($allow_shorter_periods || $allow_longer_periods || $enable_private_feed) { $this->addBlockCommand($ilCtrl->getLinkTarget($this, "editSettings"), $lng->txt("settings")); } $per = ilNewsItem::_lookupUserPDPeriod($ilUser->getId()); if ($per > 0) { switch ($per) { case 2: case 3: case 5: $per_str = sprintf($lng->txt("news_period_x_days"), $per); break; case 7: $per_str = $lng->txt("news_period_1_week"); break; case 14: $per_str = sprintf($lng->txt("news_period_x_weeks"), 2); break; case 30: $per_str = $lng->txt("news_period_1_month"); break; case 60: $per_str = sprintf($lng->txt("news_period_x_months"), 2); break; case 120: $per_str = sprintf($lng->txt("news_period_x_months"), 4); break; case 180: $per_str = sprintf($lng->txt("news_period_x_months"), 6); break; case 366: $per_str = $lng->txt("news_period_1_year"); break; } if ($per_str != "") { $this->setTitle($this->getTitle() . ' <span style="font-weight:normal;">- ' . $per_str . "</span>"); } } if ($this->getCurrentDetailLevel() == 0) { return ""; } $en = ""; if ($ilUser->getPref("il_feed_js") == "n") { $en = $this->getJSEnabler(); } return ilBlockGUI::getHTML() . $en; }
/** * Get block HTML code. */ function getHTML() { global $ilCtrl, $lng, $ilUser, $ilAccess, $ilSetting; return parent::getHTML(); }
function getHTML() { $html = parent::getHTML(); if (count($this->feedbacks) == 0) { return ""; } else { return $html; } }
/** * Get block HTML code. */ function getHTML($a_export = false) { global $ilCtrl, $lng, $ilAccess; $this->export = $a_export; $has_write = $ilAccess->checkAccess("write", "", $this->ref_id); if ($this->isHidden()) { #16029 - hide completely return; } if (!$this->export && $has_write) { $this->addBlockCommand($ilCtrl->getLinkTargetByClass("ilwikipagegui", "editAdvancedMetaData"), $lng->txt("edit"), "_top"); if (!$this->isHidden()) { $this->addBlockCommand($ilCtrl->getLinkTargetByClass("ilwikipagegui", "hideAdvancedMetaData"), $lng->txt("hide"), "_top"); } /* #16029 - moved to page actions else { $this->addBlockCommand( $ilCtrl->getLinkTargetByClass("ilwikipagegui", "unhideAdvancedMetaData"), $lng->txt("show"), "_top"); } */ } return parent::getHTML(); }
/** * Get block HTML code. */ function getHTML() { global $ilCtrl, $lng, $ilUser, $ilAccess, $ilSetting; $this->getCalendars(); return parent::getHTML(); }
function getHTML() { global $ilCtrl, $ilSetting, $tpl, $lng, $ilHelp, $ilDB; $ilDB->useSlave(true); // both views are activated (show buttons) if ($ilSetting->get('disable_my_offers') == 0 && $ilSetting->get('disable_my_memberships') == 0) { /* $ilCtrl->setParameter($this, 'block_type', $this->getBlockType()); $ilCtrl->setParameter($this, 'view', self::VIEW_MY_OFFERS); $this->addHeaderLink($ilCtrl->getLinkTarget($this, 'changeView'), $this->lng->txt('pd_my_offers'), ($this->view == self::VIEW_MY_OFFERS ? false : true) ); $ilCtrl->setParameter($this, 'view', self::VIEW_MY_MEMBERSHIPS); $this->addHeaderLink($ilCtrl->getLinkTarget($this, 'changeView'), $this->lng->txt('pd_my_memberships'), ($this->view == self::VIEW_MY_MEMBERSHIPS ? false : true) ); $ilCtrl->clearParameters($this);*/ } // workaround to show details row $this->setData(array("dummy")); include_once "Services/Object/classes/class.ilObjectListGUI.php"; ilObjectListGUI::prepareJSLinks("", $ilCtrl->getLinkTargetByClass(array("ilcommonactiondispatchergui", "ilnotegui"), "", "", true, false), $ilCtrl->getLinkTargetByClass(array("ilcommonactiondispatchergui", "iltagginggui"), "", "", true, false)); switch ((int) $this->view) { case self::VIEW_MY_MEMBERSHIPS: $ilHelp->setDefaultScreenId(ilHelpGUI::ID_PART_SCREEN, "crs_grp"); if ($ilSetting->get('disable_my_offers') == 0) { $tpl->setTitle($lng->txt("my_courses_groups")); } $this->setTitle($this->lng->txt('pd_my_memberships')); $this->setContent($this->getMembershipItemsBlockHTML()); break; case self::VIEW_MY_OFFERS: default: $ilHelp->setDefaultScreenId(ilHelpGUI::ID_PART_SCREEN, "sel_items"); if (!in_array(self::VIEW_MY_MEMBERSHIPS, $this->allowed_views)) { $this->setTitle($this->lng->txt('selected_items')); } else { $this->setTitle($this->lng->txt('pd_my_offers')); } $this->setContent($this->getSelectedItemsBlockHTML()); break; } if ($this->getContent() == "") { $this->setEnableDetailRow(false); } $ilCtrl->clearParametersByClass("ilpersonaldesktopgui"); $ilCtrl->clearParameters($this); $ilDB->useSlave(false); return parent::getHTML(); }
/** * Get block HTML code. */ function getHTML() { global $ilCtrl, $lng, $ilAccess, $ilUser, $tree, $objDefinition; $this->poll_block->setRefId($this->getRefId()); $this->may_write = $ilAccess->checkAccess("write", "", $this->getRefId()); $this->has_content = $this->poll_block->hasAnyContent($ilUser->getId(), $this->getRefId()); if (!$this->may_write && !$this->has_content) { return ""; } $poll_obj = $this->poll_block->getPoll(); $this->setTitle($poll_obj->getTitle()); $this->setData(array($poll_obj)); if ($this->may_write) { // edit $ilCtrl->setParameterByClass("ilobjpollgui", "ref_id", $this->getRefId()); $this->addBlockCommand($ilCtrl->getLinkTargetByClass(array("ilrepositorygui", "ilobjpollgui"), "render"), $lng->txt("edit_content")); $this->addBlockCommand($ilCtrl->getLinkTargetByClass(array("ilrepositorygui", "ilobjpollgui"), "edit"), $lng->txt("settings")); /* delete (#10993 - see ilBlockGUI) $parent_id = $tree->getParentId($this->getRefId()); $type = ilObject::_lookupType($parent_id, true); $class = $objDefinition->getClassName($type); if($class) { $class = "ilobj".strtolower($class)."gui"; $ilCtrl->setParameterByClass($class, "ref_id", $parent_id); $ilCtrl->setParameterByClass($class, "item_ref_id", $this->getRefId()); $this->addBlockCommand( $ilCtrl->getLinkTargetByClass($class, "delete"), $lng->txt("delete")); } */ $ilCtrl->clearParametersByClass("ilobjpollgui"); } return parent::getHTML(); }