コード例 #1
0
 /**
  * @param bool            $delete_item
  * @param bool            $delete_folder
  * @param ilCloudFileNode $node
  *
  * @return string
  */
 public function getSelectionListItemsHTML($delete_item = false, $delete_folder = false, ilCloudFileNode $node)
 {
     global $lng, $ilCtrl;
     /**
      * @var ilCtrl $ilCtrl
      */
     $this->node = $node;
     if ($delete_item && !$node->getIsDir() || $delete_folder && $node->getIsDir() || $this->checkHasAction()) {
         include_once "./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php";
         $this->selection_list = new ilAdvancedSelectionListGUI();
         $this->selection_list->setId("id_action_list_" . $this->node->getId());
         $this->selection_list->setListTitle($lng->txt("actions"));
         $this->selection_list->setItemLinkClass("xsmall");
         if ($this->getAsyncMode()) {
             $this->selection_list->setAsynch(true);
             $this->selection_list->setAsynchUrl(html_entity_decode($ilCtrl->getLinkTargetByClass("ilobjcloudgui", "asyncGetActionListContent", false) . "&node_id=" . $node->getId()));
         } else {
             $this->addSelectionListItems($delete_item, $delete_folder);
         }
         return $this->selection_list->getHtml();
     } else {
         return "";
     }
 }
コード例 #2
0
 /**
  * show desktop
  */
 function show()
 {
     // preload block settings
     include_once "Services/Block/classes/class.ilBlockSetting.php";
     ilBlockSetting::preloadPDBlockSettings();
     // add template for content
     $this->pd_tpl = new ilTemplate("tpl.usr_personaldesktop.html", true, true, "Services/PersonalDesktop");
     $this->tpl->getStandardTemplate();
     // display infopanel if something happened
     ilUtil::infoPanel();
     //$this->tpl->setTitleIcon(ilUtil::getImagePath("icon_pd_b.png"),
     //	$this->lng->txt("personal_desktop"));
     //		$this->tpl->setTitleIcon(ilUtil::getImagePath("icon_pd_b.png"),
     //			"");
     $this->tpl->setTitle($this->lng->txt("overview"));
     $this->tpl->setVariable("IMG_SPACE", ilUtil::getImagePath("spacer.png", false));
     $this->tpl->setContent($this->getCenterColumnHTML());
     $this->tpl->setRightContent($this->getRightColumnHTML());
     $this->tpl->setLeftContent($this->getLeftColumnHTML());
     if (count($this->action_menu->getItems())) {
         /**
          * @var $tpl ilTemplate
          * @var $lng ilLanguage
          */
         global $tpl, $lng;
         $this->action_menu->setAsynch(false);
         $this->action_menu->setAsynchUrl('');
         $this->action_menu->setListTitle($lng->txt('actions'));
         $this->action_menu->setId('act_pd');
         $this->action_menu->setSelectionHeaderClass('small');
         $this->action_menu->setItemLinkClass('xsmall');
         $this->action_menu->setLinksMode('il_ContainerItemCommand2');
         $this->action_menu->setHeaderIcon(ilAdvancedSelectionListGUI::DOWN_ARROW_DARK);
         $this->action_menu->setUseImages(false);
         $htpl = new ilTemplate('tpl.header_action.html', true, true, 'Services/Repository');
         $htpl->setVariable('ACTION_DROP_DOWN', $this->action_menu->getHTML());
         $tpl->setHeaderActionMenu($htpl->get());
     }
     $this->tpl->show();
 }
コード例 #3
0
 /**
  * GetDropDownHTML
  *
  * @param
  * @return
  */
 function renderDropDown($a_tpl, $a_id)
 {
     global $lng, $ilSetting, $rbacsystem;
     $id = strtolower($a_id);
     $id_up = strtoupper($a_id);
     $a_tpl->setCurrentBlock("entry_" . $id);
     include_once "./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php";
     $selection = new ilAdvancedSelectionListGUI();
     if ($this->active == $a_id || $this->active == "" && $a_id == "repository") {
         $selection->setSelectionHeaderClass("MMActive");
         $a_tpl->setVariable("SEL", '<span class="ilAccHidden">(' . $lng->txt("stat_selected") . ')</span>');
     } else {
         $selection->setSelectionHeaderClass("MMInactive");
     }
     $selection->setSelectionHeaderSpanClass("MMSpan");
     $selection->setHeaderIcon(ilAdvancedSelectionListGUI::ICON_ARROW);
     $selection->setItemLinkClass("small");
     $selection->setUseImages(false);
     switch ($id) {
         // desktop drop down
         case "desktop":
             $selection->setListTitle($lng->txt("personal_desktop"));
             $selection->setId("dd_pd");
             // overview
             $selection->addItem($lng->txt("overview"), "", "ilias.php?baseClass=ilPersonalDesktopGUI", "", "", "_top");
             if (!$ilSetting->get("disable_personal_workspace")) {
                 // workspace
                 $selection->addItem($lng->txt("personal_workspace"), "", "ilias.php?baseClass=ilPersonalDesktopGUI&amp;cmd=jumpToWorkspace", "", "", "_top");
             }
             // profile
             $selection->addItem($lng->txt("personal_profile"), "", "ilias.php?baseClass=ilPersonalDesktopGUI&amp;cmd=jumpToProfile", "", "", "_top");
             // skills
             $skmg_set = new ilSetting("skmg");
             if ($skmg_set->get("enable_skmg")) {
                 $selection->addItem($lng->txt("skills"), "", "ilias.php?baseClass=ilPersonalDesktopGUI&amp;cmd=jumpToSkills", "", "", "_top");
             }
             // portfolio
             if ($ilSetting->get('user_portfolios')) {
                 $selection->addItem($lng->txt("portfolio"), "", "ilias.php?baseClass=ilPersonalDesktopGUI&amp;cmd=jumpToPortfolio", "", "", "_top");
             }
             // news
             if ($ilSetting->get("block_activated_news")) {
                 $selection->addItem($lng->txt("news"), "", "ilias.php?baseClass=ilPersonalDesktopGUI&amp;cmd=jumpToNews", "", "", "_top");
             }
             // Learning Progress
             include_once "Services/Tracking/classes/class.ilObjUserTracking.php";
             if (ilObjUserTracking::_enabledLearningProgress()) {
                 //$ilTabs->addTarget("learning_progress", $this->ctrl->getLinkTargetByClass("ilLearningProgressGUI"));
                 $selection->addItem($lng->txt("learning_progress"), "", "ilias.php?baseClass=ilPersonalDesktopGUI&amp;cmd=jumpToLP", "", "", "_top");
             }
             // calendar
             include_once './Services/Calendar/classes/class.ilCalendarSettings.php';
             $settings = ilCalendarSettings::_getInstance();
             if ($settings->isEnabled()) {
                 $selection->addItem($lng->txt("calendar"), "", "ilias.php?baseClass=ilPersonalDesktopGUI&amp;cmd=jumpToCalendar", "", "", "_top");
             }
             // mail
             if ($this->mail) {
                 $selection->addItem($lng->txt('mail'), '', 'ilias.php?baseClass=ilMailGUI', '', '', '_top');
             }
             // contacts
             if (!$this->ilias->getSetting('disable_contacts') && ($this->ilias->getSetting('disable_contacts_require_mail') || $rbacsystem->checkAccess('internal_mail', ilMailGlobalServices::getMailObjectRefId()))) {
                 $selection->addItem($lng->txt('mail_addressbook'), '', 'ilias.php?baseClass=ilPersonalDesktopGUI&amp;cmd=jumpToContacts', '', '', '_top');
             }
             // private notes
             if (!$this->ilias->getSetting("disable_notes")) {
                 $selection->addItem($lng->txt("notes_and_comments"), "", "ilias.php?baseClass=ilPersonalDesktopGUI&amp;cmd=jumpToNotes", "", "", "_top");
             }
             // bookmarks
             if (!$this->ilias->getSetting("disable_bookmarks")) {
                 $selection->addItem($lng->txt("bookmarks"), "", "ilias.php?baseClass=ilPersonalDesktopGUI&amp;cmd=jumpToBookmarks", "", "", "_top");
             }
             // settings
             $selection->addItem($lng->txt("personal_settings"), "", "ilias.php?baseClass=ilPersonalDesktopGUI&amp;cmd=jumpToSettings", "", "", "_top");
             break;
             // shop
         // shop
         case 'shop':
             $selection->setListTitle($lng->txt("shop"));
             $selection->setId("dd_shp");
             $selection->addItem($lng->txt("shop"), "", "ilias.php?baseClass=ilShopController&cmd=firstpage", "", "", "_top");
             break;
             // administration
         // administration
         case "administration":
             $selection->setListTitle($lng->txt("administration"));
             $selection->setId("dd_adm");
             $selection->setAsynch(true);
             $selection->setAsynchUrl("ilias.php?baseClass=ilAdministrationGUI&cmd=getDropDown&cmdMode=asynch");
             //$this->renderEntry($a_tpl, "administration",
             //	$lng->txt("administration"),
             //	$this->getScriptTarget("ilias.php?baseClass=ilAdministrationGUI"),
             //	$this->target);
             break;
     }
     //		$selection->setTriggerEvent("mouseover");
     //		$selection->setAutoHide(true);
     // bs-patch start
     global $ilUser;
     $a_tpl->setVariable("TXT_ADMINISTRATION", $lng->txt("administration"));
     $a_tpl->parseCurrentBlock();
     return;
     // bs-patch end
     $html = $selection->getHTML();
     $a_tpl->setVariable($id_up . "_DROP_DOWN", $html);
     $a_tpl->parseCurrentBlock();
 }
コード例 #4
0
 /**
  * @param array $a_set
  */
 protected function fillRow(array $a_set)
 {
     // For checkboxes in first column
     if (count($this->getOption('actions_multi')) && $a_set['status'] == 3) {
         $this->tpl->setCurrentBlock('CHECKBOXES');
         $this->tpl->setVariable('VALUE', $a_set['id']);
         $this->tpl->parseCurrentBlock();
     } else {
         $this->tpl->setCurrentBlock('COL');
         $this->tpl->setVariable('VALUE', '');
         $this->tpl->parseCurrentBlock();
     }
     $utc = ilCertificateConfig::get('time_format_utc');
     $date_function = $utc ? 'gmdate' : 'date';
     foreach ($this->columns as $k => $column) {
         $value = is_null($a_set[$column]) ? '' : $a_set[$column];
         if ($this->isColumnSelected($column)) {
             // Format dates
             if (in_array($column, array('valid_from', 'valid_to')) && $value != '') {
                 $time = strtotime($value);
                 $time = $utc ? $time + srCertificate::TIME_ZONE_CORRECTION : $time;
                 switch ($this->user->getDateFormat()) {
                     case ilCalendarSettings::DATE_FORMAT_DMY:
                         $value = $date_function('d.m.Y', $time);
                         break;
                     case ilCalendarSettings::DATE_FORMAT_MDY:
                         $value = $date_function('m/d/Y', $time);
                         break;
                 }
             } elseif (in_array($column, array('valid_from', 'valid_to')) && $value == '') {
                 $value = $this->pl->txt('unlimited');
             }
             if ($column == 'status') {
                 $value = $this->pl->txt("cert_status_" . (int) $value);
             }
             // Set value
             $this->tpl->setCurrentBlock('COL');
             $this->tpl->setVariable('VALUE', $value);
             $this->tpl->parseCurrentBlock();
         }
     }
     // Actions
     if (count($this->getOption('actions'))) {
         if ($this->hasAction($a_set)) {
             $this->ctrl->setParameterByClass(get_class($this->parent_obj), 'cert_id', $a_set['id']);
             $this->ctrl->setParameterByClass(get_class($this->parent_obj), 'status', $a_set['status']);
             $async_url = $this->ctrl->getLinkTargetByClass(array(ilCertificatePlugin::getBaseClass(), get_class($this->parent_obj)), 'buildActions', '', true);
             $actions = new ilAdvancedSelectionListGUI();
             $actions->setId('action_list_' . $a_set['id']);
             $actions->setAsynchUrl($async_url);
             $actions->setAsynch(true);
             $actions->setListTitle($this->pl->txt('actions'));
         } else {
             $actions = '&nbsp;';
         }
         $this->tpl->setCurrentBlock('ACTIONS');
         $this->tpl->setVariable('ACTIONS', is_string($actions) ? $actions : $actions->getHTML());
         $this->tpl->parseCurrentBlock();
     }
 }
コード例 #5
0
 /**
  * 
  */
 protected function showAcceptedTermsOfService()
 {
     /**
      * @var $agree_date ilNonEditableValueGUI
      */
     $agree_date = $this->form_gui->getItemByPostVar('agree_date');
     if ($agree_date && $agree_date->getValue()) {
         $this->lng->loadLanguageModule('tos');
         require_once 'Services/TermsOfService/classes/class.ilTermsOfServiceHelper.php';
         /**
          * @var $entity ilTermsOfServiceAcceptanceEntity
          */
         $entity = ilTermsOfServiceHelper::getCurrentAcceptanceForUser($this->object);
         if ($entity->getId()) {
             $show_agreement_text = new ilCheckboxInputGUI($this->lng->txt('tos_show_signed_text'), 'tos_show_signed_text');
             $agreement_lang = new ilNonEditableValueGUI($this->lng->txt('language'), '');
             $agreement_lang->setValue($this->lng->txt('meta_l_' . $entity->getIso2LanguageCode()));
             $show_agreement_text->addSubItem($agreement_lang);
             $agreement_document = new ilNonEditableValueGUI($this->lng->txt('tos_agreement_document'), '', true);
             require_once 'Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php';
             $action = new ilAdvancedSelectionListGUI();
             $action->setId('asl_content_accepted_content');
             $action->setListTitle($this->lng->txt('tos_accepted_content'));
             $action->setHeaderIcon(ilUtil::getImagePath('icon_preview.png'));
             $action->setAsynch(true);
             $action->setAsynchUrl($this->ctrl->getLinkTarget($this, 'showAgreementTextAsynch', '', true, false));
             $agreement_document->setValue($entity->getSource() . $action->getHtml());
             $show_agreement_text->addSubItem($agreement_document);
             $agree_date->addSubItem($show_agreement_text);
         }
     } else {
         if ($agree_date) {
             $agree_date->setValue($this->lng->txt('tos_not_accepted_yet'));
         }
     }
 }