public static function showDependedUpon($base_mod) { PHPWS_Core::initCoreClass('Module.php'); $module = new PHPWS_Module($base_mod); $dependents = $module->isDependedUpon(); if (empty($dependents)) { return dgettext('boost', 'This module does not have dependents.'); } $template['TITLE'] = sprintf(dgettext('boost', '%s Dependencies'), $module->getProperName()); $content[] = PHPWS_Text::backLink() . '<br />'; $content[] = dgettext('boost', 'The following modules depend on this module to function:'); foreach ($dependents as $mod) { $dep_module = new PHPWS_Module($mod); $content[] = $dep_module->getProperName(); } $content[] = PHPWS_Boost::uninstallLink($base_mod); $template['CONTENT'] = implode('<br />', $content); return PHPWS_Template::process($template, 'boost', 'main.tpl'); }
public function event($js = false) { PHPWS_Core::initModClass('calendar', 'Event.php'); if (!$this->event->id) { PHPWS_Core::errorPage('404'); } $template = $this->event->getTpl(); if ($js) { $template['CLOSE_WINDOW'] = javascript('close_window', array('value' => dgettext('calendar', 'Close'))); } else { $template['BACK_LINK'] = PHPWS_Text::backLink(dgettext('calendar', 'Back')); } $template['DOWNLOAD'] = $this->eventDownloadLink($this->event->id); $template['VIEW_LINKS'] = $this->viewLinks('event'); return PHPWS_Template::process($template, 'calendar', 'view/event.tpl'); }
public function getTpl() { javascript('jquery'); $tpl = $this->tplFormatTime(); if ($this->show_busy && !$this->_schedule->checkPermissions()) { $tpl['SUMMARY'] = dgettext('calendar', 'Busy'); $tpl['DESCRIPTION'] = null; } else { $tpl['SUMMARY'] = $this->getSummary(); $tpl['DESCRIPTION'] = $this->getDescription(); } if ($this->_schedule->checkPermissions()) { $link[] = $this->editLink('icon'); $link[] = $this->deleteLink('icon'); if (PHPWS_Core::moduleExists('blog')) { if (Current_User::allow('blog', 'edit_blog', null, null, true)) { $link[] = $this->blogLink('icon'); } } $tpl['LINKS'] = implode(' ', $link); } if (!empty($this->location)) { $tpl['LOCATION_LABEL'] = dgettext('calendar', 'Location'); $tpl['LOCATION'] = $this->getLocation(); } $tpl['BACK_LINK'] = PHPWS_Text::backLink(); return $tpl; }