/** */ public function display(Horde_Core_Prefs_Ui $ui) { global $injector, $page_output, $prefs, $session; $page_output->addScriptPackage('IMP_Script_Package_Imp'); $view = new Horde_View(array('templatePath' => IMP_TEMPLATES . '/prefs')); $view->addHelper('Horde_Core_View_Helper_Help'); if (!Horde::isConnectionSecure()) { $view->notsecure = true; } else { $smime_url = IMP_Basic_Smime::url(); $view->has_key = $prefs->getValue('smime_public_key') && $prefs->getValue('smime_private_key'); if ($view->has_key) { $view->viewpublic = Horde::link($smime_url->copy()->add('actionID', 'view_personal_public_key'), _("View Personal Public Certificate"), null, 'view_key'); $view->infopublic = Horde::link($smime_url->copy()->add('actionID', 'info_personal_public_key'), _("Information on Personal Public Certificate"), null, 'info_key'); if ($injector->getInstance('IMP_Crypt_Smime')->getPassphrase()) { $view->passphrase = Horde::link($ui->selfUrl(array('special' => true, 'token' => true))->add('unset_smime_passphrase', 1), _("Unload Passphrase")) . _("Unload Passphrase"); } else { $imple = $injector->getInstance('Horde_Core_Factory_Imple')->create('IMP_Ajax_Imple_PassphraseDialog', array('params' => array('reload' => $ui->selfUrl()->setRaw(true)), 'type' => 'smimePersonal')); $view->passphrase = Horde::link('#', _("Enter Passphrase"), null, null, null, null, null, array('id' => $imple->getDomId())) . _("Enter Passphrase"); } $view->viewprivate = Horde::link($smime_url->copy()->add('actionID', 'view_personal_private_key'), _("View Personal Private Key"), null, 'view_key'); $page_output->addInlineScript(array('$("delete_smime_personal").observe("click", function(e) { if (!window.confirm(' . json_encode(_("Are you sure you want to delete your keypair? (This is NOT recommended!)")) . ')) { e.stop(); } })'), true); } elseif ($session->get('imp', 'file_upload')) { $view->import = true; $page_output->addInlineScript(array('$("import_smime_personal").observe("click", function(e) { ' . Horde::popupJs($smime_url, array('params' => array('actionID' => 'import_personal_certs', 'reload' => base64_encode($ui->selfUrl()->setRaw(true))), 'height' => 275, 'width' => 750, 'urlencode' => true)) . '; e.stop(); })'), true); } } return $view->render('smimeprivatekey'); }
/** */ public function display(Horde_Core_Prefs_Ui $ui) { $view = new Horde_View(array('templatePath' => IMP_TEMPLATES . '/prefs')); $view->addHelper('Horde_Core_View_Helper_Label'); $view->elist = $GLOBALS['injector']->getInstance('IMP_Compose_Ui')->encryptList(); return $view->render('encrypt'); }
/** */ public function display(Horde_Core_Prefs_Ui $ui) { $view = new Horde_View(array('templatePath' => IMP_TEMPLATES . '/prefs')); $view->addHelper('Text'); $view->safe_addrs = implode("\n", $this->safeAddrList()->bare_addresses); return $view->render('imagereplacement'); }
/** * Return the rendered information about the Horde_Mime_Part object. * * URL parameters used by this function: * - zip_contents: (integer) If set, show contents of ZIP file. * * @return array See Horde_Mime_Viewer_Driver::render(). */ protected function _renderInfo() { global $injector; $vars = $injector->getInstance('Horde_Variables'); if (!$this->getConfigParam('show_contents') && !$vars->zip_contents) { $status = new IMP_Mime_Status($this->_mimepart, _("This is a compressed file.")); $status->addMimeAction('zipViewContents', _("Click to display the file contents.")); $status->icon('mime/compressed.png'); return array($this->_mimepart->getMimeId() => array('data' => '', 'status' => $status, 'type' => 'text/html; charset=UTF-8')); } $view = new Horde_View(array('templatePath' => IMP_TEMPLATES . '/mime')); $view->addHelper('Text'); $view->downloadclass = 'zipdownload'; $view->files = array(); $view->tableclass = 'zipcontents'; $zlib = Horde_Util::extensionExists('zlib'); foreach ($this->_getZipInfo() as $key => $val) { $file = new stdClass(); $file->name = $val['name']; $file->size = IMP::sizeFormat($val['size']); /* TODO: Add ability to render in-browser for filetypes we can * handle. */ if (!empty($val['size']) && strstr($val['attr'], 'D') === false && ($zlib && $val['method'] == 0x8 || $val['method'] == 0x0)) { $file->download = $this->getConfigParam('imp_contents')->linkView($this->_mimepart, 'download_render', '', array('class' => 'iconImg downloadAtc', 'jstext' => _("Download"), 'params' => array('zip_attachment' => $key))); } else { $file->download = ''; } $view->files[] = $file; } return array($this->_mimepart->getMimeId() => array('data' => $view->render('compressed'), 'type' => 'text/html; charset=UTF-8')); }
/** */ public function display(Horde_Core_Prefs_Ui $ui) { global $injector, $page_output, $prefs, $session; $page_output->addScriptPackage('IMP_Script_Package_Imp'); $imp_pgp = $injector->getInstance('IMP_Crypt_Pgp'); /* Get list of Public Keys on keyring. */ try { $pubkey_list = $imp_pgp->listPublicKeys(); } catch (Horde_Exception $e) { $pubkey_list = array(); } $pgp_url = IMP_Basic_Pgp::url(); $view = new Horde_View(array('templatePath' => IMP_TEMPLATES . '/prefs')); $view->addHelper('Horde_Core_View_Helper_Help'); $view->addHelper('Text'); if (!empty($pubkey_list)) { $plist = array(); $self_url = $ui->selfUrl(array('special' => true, 'token' => true)); foreach ($pubkey_list as $val) { $plist[] = array('name' => $val['name'], 'email' => $val['email'], 'view' => Horde::link($pgp_url->copy()->add(array('actionID' => 'view_public_key', 'email' => $val['email'])), sprintf(_("View %s Public Key"), $val['name']), null, 'view_key'), 'info' => Horde::link($pgp_url->copy()->add(array('actionID' => 'info_public_key', 'email' => $val['email'])), sprintf(_("Information on %s Public Key"), $val['name']), null, 'info_key'), 'delete' => Horde::link($self_url->copy()->add(array('delete_pgp_pubkey' => 1, 'email' => $val['email'])), sprintf(_("Delete %s Public Key"), $val['name']), null, null, "window.confirm('" . addslashes(_("Are you sure you want to delete this public key?")) . "')")); } $view->pubkey_list = $plist; } if ($session->get('imp', 'file_upload')) { $view->can_import = true; $view->no_source = !$prefs->getValue('add_source'); if (!$view->no_source) { $page_output->addInlineScript(array('$("import_pgp_public").observe("click", function(e) { ' . Horde::popupJs($pgp_url, array('params' => array('actionID' => 'import_public_key', 'reload' => base64_encode($ui->selfUrl()->setRaw(true))), 'height' => 275, 'width' => 750, 'urlencode' => true)) . '; e.stop(); })'), true); } } return $view->render('pgppublickey'); }
/** */ public function display(Horde_Core_Prefs_Ui $ui) { global $injector, $page_output, $prefs; $page_output->addScriptFile('prefs/folder.js'); $page_output->addInlineJsVars(array('ImpFolderPrefs.mboxes.trash' => _("Enter the name for your new trash mailbox."))); $imp_search = $injector->getInstance('IMP_Search'); $trash = IMP_Mailbox::getPref(IMP_Mailbox::MBOX_TRASH); $view = new Horde_View(array('templatePath' => IMP_TEMPLATES . '/prefs')); $view->addHelper('FormTag'); $view->addHelper('Horde_Core_View_Helper_Label'); $view->addHelper('Tag'); $iterator = new IMP_Ftree_IteratorFilter($injector->getInstance('IMP_Ftree')); $iterator->add(array($iterator::NONIMAP, $iterator::REMOTE)); $iterator->mboxes = array('INBOX'); $view->flist = new IMP_Ftree_Select(array('iterator' => $iterator, 'new_mbox' => true, 'selected' => $trash)); $view->nombox = IMP_Mailbox::formTo(self::PREF_NO_MBOX); $view->special_use = $this->_getSpecialUse(Horde_Imap_Client::SPECIALUSE_TRASH); if (!$prefs->isLocked('vfolder') || $imp_search['vtrash']->enabled) { $view->vtrash = IMP_Mailbox::formTo($imp_search->createSearchId('vtrash')); if ($trash) { $view->vtrash_select = $trash->vtrash; } } return $view->render('trash'); }
/** * Return the rendered information about the Horde_Mime_Part object. * * URL parameters used by this function: * - tgz_contents: (integer) If set, show contents of ZIP file. * * @return array See Horde_Mime_Viewer_Driver::render(). */ protected function _renderInfo() { global $injector; $vars = $injector->getInstance('Horde_Variables'); if (!$this->getConfigParam('show_contents') && !isset($vars->tgz_contents)) { $status = new IMP_Mime_Status($this->_mimepart, _("This is a compressed file.")); $status->addMimeAction('tgzViewContents', _("Click to display the file contents.")); $status->icon('mime/compressed.png'); return array($this->_mimepart->getMimeId() => array('data' => '', 'status' => $status, 'type' => 'text/html; charset=UTF-8')); } $view = new Horde_View(array('templatePath' => IMP_TEMPLATES . '/mime')); $view->addHelper('Text'); $view->downloadclass = 'tgzdownload'; $view->files = array(); $view->tableclass = 'tgzcontents'; $tgzInfo = $this->_getTgzInfo(); foreach ($tgzInfo as $key => $val) { if (!strlen($val['data'])) { continue; } $file = new stdClass(); $file->download = ''; $file->name = $val['name']; $file->size = IMP::sizeFormat($val['size']); if (!empty($val['size'])) { $file->download = $this->getConfigParam('imp_contents')->linkView($this->_mimepart, 'download_render', '', array('class' => 'iconImg downloadAtc', 'jstext' => _("Download"), 'params' => array('tgz_attachment' => $key))); } $view->files[] = $file; } return array($this->_mimepart->getMimeId() => array('data' => $view->render('compressed'), 'type' => 'text/html; charset=UTF-8')); }
/** */ public function display(Horde_Core_Prefs_Ui $ui) { global $injector, $page_output, $prefs; if ($prefs->isLocked('remote')) { return; } $ui->nobuttons = true; $page_output->addScriptFile('external/base64.js'); $page_output->addScriptFile('prefs/remote.js'); $page_output->addInlineJsVars(array('ImpRemotePrefs.confirm_delete' => _("Are you sure you want to delete this account?"), 'ImpRemotePrefs.empty_email' => _("The e-mail field cannot be empty."), 'ImpRemotePrefs.empty_password' => _("The password field cannot be empty."), 'ImpRemotePrefs.next' => _("Next"), 'ImpRemotePrefs.wait' => _("Please wait..."))); $p_css = new Horde_Themes_Element('prefs.css'); $page_output->addStylesheet($p_css->fs, $p_css->uri); $view = new Horde_View(array('templatePath' => IMP_TEMPLATES . '/prefs')); $view->addHelper('Horde_Core_View_Helper_Image'); $view->addHelper('Text'); switch ($ui->vars->remote_action) { case 'new': $view->new = true; break; default: $view->accounts = iterator_to_array($injector->getInstance('IMP_Remote')); break; } return $view->render('remote'); }
/** */ protected function _init() { global $injector, $notification, $page_output; $this->_assertCategory('Ingo_Rule_System_Whitelist', _("Whitelist")); $ingo_storage = $injector->getInstance('Ingo_Factory_Storage')->create(); $whitelist = $ingo_storage->getSystemRule('Ingo_Rule_System_Whitelist'); /* Token checking & perform requested actions. */ switch ($this->_checkToken(array('rule_update'))) { case 'rule_update': try { $whitelist->addresses = $this->vars->whitelist; $ingo_storage->updateRule($whitelist); $notification->push(_("Changes saved."), 'horde.success'); $injector->getInstance('Ingo_Factory_Script')->activateAll(); } catch (Ingo_Exception $e) { $notification->push($e); } break; } /* Prepare the view. */ $view = new Horde_View(array('templatePath' => INGO_TEMPLATES . '/basic/whitelist')); $view->addHelper('Horde_Core_View_Helper_Help'); $view->addHelper('Horde_Core_View_Helper_Label'); $view->addHelper('Text'); $view->disabled = $whitelist->disable; $view->formurl = $this->_addToken(self::url()); $view->whitelist = implode("\n", $whitelist->addresses); $page_output->addScriptFile('whitelist.js'); $page_output->addInlineJsVars(array('IngoWhitelist.filtersurl' => strval(Ingo_Basic_Filters::url()->setRaw(true)))); $this->title = _("Whitelist Edit"); $this->output = $view->render('whitelist'); }
public function create(Horde_Injector $injector) { $registry = $injector->getInstance('Horde_Registry'); $view = new Horde_View(array('templatePath' => $registry->get('templates', $registry->getApp()))); $view->addHelper('Tag'); $view->addHelper('Text'); return $view; }
/** */ protected function _init() { global $injector, $notification; if (!$this->indices->mailbox->access_search) { $notification->push(_("Searching is not available."), 'horde.error'); $this->indices->mailbox->url('mailbox')->redirect(); } $imp_flags = $injector->getInstance('IMP_Flags'); $imp_search = $injector->getInstance('IMP_Search'); /* If search_basic is set, we are processing the search query. */ if ($this->vars->search_basic) { $c_list = array(); if ($this->vars->search_criteria_text) { switch ($this->vars->search_criteria) { case 'from': case 'subject': $c_list[] = new IMP_Search_Element_Header($this->vars->search_criteria_text, $this->vars->search_criteria, $this->vars->search_criteria_not); break; case 'recip': $c_list[] = new IMP_Search_Element_Recipient($this->vars->search_criteria_text, $this->vars->search_criteria_not); break; case 'body': case 'text': $c_list[] = new IMP_Search_Element_Text($this->vars->search_criteria_text, $this->vars->search_criteria == 'body', $this->vars->search_criteria_not); break; } } if ($this->vars->search_criteria_flag) { $formdata = $imp_flags->parseFormId($this->vars->search_criteria_flag); $c_list[] = new IMP_Search_Element_Flag($formdata['flag'], $formdata['set'] && !$this->vars->search_criteria_flag_not); } if (empty($c_list)) { $notification->push(_("No search criteria specified."), 'horde.error'); } else { /* Store the search in the session. */ $q_ob = $imp_search->createQuery($c_list, array('id' => IMP_Search::BASIC_SEARCH, 'mboxes' => array($this->indices->mailbox), 'type' => IMP_Search::CREATE_QUERY)); /* Redirect to the mailbox screen. */ IMP_Mailbox::get($q_ob)->url('mailbox')->redirect(); } } $flist = $imp_flags->getList(array('imap' => true, 'mailbox' => $this->indices->mailbox)); $flag_set = array(); foreach ($flist as $val) { $flag_set[] = array('val' => $val->form_set, 'label' => $val->label); } /* Prepare the search template. */ $view = new Horde_View(array('templatePath' => IMP_TEMPLATES . '/basic/search')); $view->addHelper('FormTag'); $view->addHelper('Tag'); $view->action = self::url(); $view->advsearch = Horde::link($this->indices->mailbox->url(IMP_Basic_Search::url())); $view->mbox = $this->indices->mailbox->form_to; $view->search_title = sprintf(_("Search %s"), $this->indices->mailbox->display_html); $view->flist = $flag_set; $this->title = _("Search"); $this->output = $view->render('search-basic'); }
/** * URL Parameters: * - sa: (string) List of selected addresses. * - search: (string) Search term (defaults to '' which lists everyone). * - searched: (boolean) Indicates we have already searched at least * once. * - source: (string) The addressbook source to use. * - to_only: (boolean) Are we limiting to only the 'To:' field? */ protected function _init() { global $injector, $page_output, $prefs, $registry; /* Sanity checking. */ if (!$registry->hasMethod('contacts/search')) { $e = new IMP_Exception('Addressbook not available on this system.'); $e->logged = true; throw $e; } /* Get the lists of address books. */ $contacts = $injector->getInstance('IMP_Contacts'); $source_list = $contacts->source_list; /* If we self-submitted, use that source. Otherwise, choose a good * source. */ if (!isset($this->vars->source) || !isset($source_list[$this->vars->source])) { reset($source_list); $this->vars->source = key($source_list); } if ($this->vars->searched || $prefs->getValue('display_contact')) { $a_list = iterator_to_array($contacts->searchEmail($this->vars->get('search', ''), array('sources' => array($this->vars->source)))); } else { $a_list = array(); } /* If self-submitted, preserve the currently selected users encoded by * javascript to pass as value|text. */ $selected_addresses = array(); foreach (explode('|', $this->vars->sa) as $addr) { if (strlen(trim($addr))) { $selected_addresses[] = $addr; } } /* Prepare the contacts view. */ $view = new Horde_View(array('templatePath' => IMP_TEMPLATES . '/contacts')); $view->addHelper('FormTag'); $view->addHelper('Tag'); $view->a_list = $a_list; $view->action = self::url(); $view->sa = $selected_addresses; $view->search = $this->vars->search; $view->to_only = intval($this->vars->to_only); if (count($source_list) > 1) { $s_list = array(); foreach ($source_list as $key => $select) { $s_list[] = array('label' => $select, 'selected' => $key == $this->vars->source, 'val' => $key); } $view->source_list = $s_list; } else { $view->source_list = key($source_list); } /* Display the form. */ $page_output->addScriptFile('hordecore.js', 'horde'); $page_output->addScriptFile('contacts.js'); $page_output->addInlineJsVars(array('ImpContacts.text' => array('closed' => _("The message being composed has been closed."), 'select' => _("You must select an address first.")))); $page_output->topbar = $page_output->sidebar = false; $this->header = _("Address Book"); $this->output = $view->render('contacts'); }
/** */ public function display(Horde_Core_Prefs_Ui $ui) { global $page_output, $registry; $name = $registry->get('name'); $page_output->addInlineScript(array('if (!Object.isUndefined(navigator.registerProtocolHandler))' . '$("mailto_handler").show().down("A").observe("click", function() {' . 'navigator.registerProtocolHandler("mailto","' . IMP_Basic_Compose::url(array('full' => true))->setRaw(true)->add(array('actionID' => 'mailto_link', 'to' => '')) . '=%s","' . $name . '");' . '})'), true); $view = new Horde_View(array('templatePath' => IMP_TEMPLATES . '/prefs')); $view->addHelper('Horde_Core_View_Helper_Image'); $view->name = $name; return $view->render('mailto'); }
/** */ protected function _init() { global $browser, $injector, $page_output, $registry; $page_output->addScriptFile('base.js'); $page_output->addScriptFile('passphrase.js'); $page_output->addScriptFile('viewport.js'); $page_output->addScriptFile('external/CustomElements.js'); $page_output->addScriptFile('external/time-elements.js'); $page_output->addScriptFile('external/tinycon.js'); $page_output->addScriptFile('dragdrop2.js', 'horde'); $page_output->addScriptFile('form_ghost.js', 'horde'); $page_output->addScriptFile('jstorage.js', 'horde'); $page_output->addScriptFile('slider2.js', 'horde'); $page_output->addScriptFile('toggle_quotes.js', 'horde'); $page_output->addScriptPackage('Horde_Core_Script_Package_Dialog'); $page_output->addScriptPackage('IMP_Script_Package_Imp'); $page_output->addThemeStylesheet('mailbox.css'); $page_output->addThemeStylesheet('message_view.css'); $imp_imap = $injector->getInstance('IMP_Factory_Imap')->create(); if ($imp_imap->access(IMP_Imap::ACCESS_FLAGS)) { $page_output->addScriptFile('colorpicker.js', 'horde'); $this->view->picker_img = Horde_Themes_Image::tag('colorpicker.png', array('alt' => _("Color Picker"))); } if ($imp_imap->access(IMP_Imap::ACCESS_REMOTE)) { $page_output->addScriptFile('external/base64.js'); } $this->_addMailboxVars(); $this->view->show_innocent = !empty($imp_imap->config->innocent_params); $this->view->show_search = $imp_imap->access(IMP_Imap::ACCESS_SEARCH); $this->view->show_spam = !empty($imp_imap->config->spam_params); $impSubinfo = new Horde_View(array('templatePath' => IMP_TEMPLATES . '/dynamic')); $impSubinfo->addHelper('Text'); $impSubinfo->quota = (bool) $imp_imap->config->quota; $topbar = $injector->getInstance('Horde_View_Topbar'); $topbar->search = $this->view->show_search; $topbar->searchMenu = true; $topbar->subinfo = $impSubinfo->render('mailbox_subinfo'); $page_output->topbar = true; $blank = new Horde_Url(); $impSidebar = new Horde_View(array('templatePath' => array($registry->get('templates', 'horde') . '/sidebar', IMP_TEMPLATES . '/dynamic'))); $impSidebar->addHelper('Text'); $impSidebar->containers = array(array('id' => 'imp-specialmboxes')); if ($imp_imap->isImap()) { $impSidebar->containers[] = array('rows' => array(array('id' => 'folderopts_link', 'cssClass' => 'folderoptsImg', 'link' => $blank->link() . _("Folder Actions") . '</a>'), array('id' => 'dropbase', 'style' => 'display:none', 'cssClass' => 'folderImg', 'link' => $blank->link() . _("Move to Base Level") . '</a>'))); $impSidebar->containers[] = array('id' => 'imp-normalmboxes'); } $sidebar = $injector->getInstance('Horde_View_Sidebar'); $sidebar->newLink = $blank->link(array('id' => 'composelink', 'class' => 'icon')); $sidebar->newText = _("New Message"); $sidebar->content = $impSidebar->render('sidebar'); $this->view->sidebar = $sidebar->render(); $this->view->max_fsize = intval($browser->allowFileUploads()); $page_output->noDnsPrefetch(); $this->_pages[] = 'mailbox'; }
function printdir($dir) { $view = new Horde_View(array('templatePath' => LUXOR_TEMPLATES)); $view->addHelper('Text'); $dirlist = Luxor::dirExpand($dir); if (is_a($dirlist, 'PEAR_Error')) { $GLOBALS['notification']->push($dirlist, 'horde.error'); return; } $view->files = $dirlist; return $view->render('directory.html.php') . Luxor::dirDesc($GLOBALS['files'], $dir); }
/** */ public function display(Horde_Core_Prefs_Ui $ui) { global $conf, $injector, $page_output, $prefs; $page_output->addScriptFile('editor.js'); $page_output->addScriptFile('prefs/signaturehtml.js'); $page_output->addScriptPackage('IMP_Script_Package_Editor'); $page_output->addInlineJsVars(array('ImpHtmlSignaturePrefs.sigs' => array(-1 => $prefs->getValue('signature_html')) + $injector->getInstance('IMP_Identity')->getAll('signature_html'))); $view = new Horde_View(array('templatePath' => IMP_TEMPLATES . '/prefs')); $view->addHelper('Text'); $view->img_limit = $conf['compose']['htmlsig_img_size']; $view->signature = $prefs->getValue('signature_html'); return $view->render('signaturehtml'); }
/** */ public function display(Horde_Core_Prefs_Ui $ui) { global $injector, $page_output, $prefs, $registry; try { $state = $injector->getInstance('Horde_ActiveSyncState'); } catch (Horde_Exception $e) { return _("ActiveSync not activated."); } $devices = $state->listDevices($registry->getAuth()); $view = new Horde_View(array('templatePath' => array(HORDE_TEMPLATES . '/prefs', HORDE_TEMPLATES . '/activesync'))); $view->addHelper('Tag'); $view->isAdmin = false; $selfurl = $ui->selfUrl(); $view->reset = $selfurl->copy()->add('reset', 1); $devs = array(); $js = array(); $collections = array(); foreach ($devices as $device) { $dev = $state->loadDeviceInfo($device['device_id'], $registry->getAuth()); try { $dev = $GLOBALS['injector']->getInstance('Horde_Core_Hooks')->callHook('activesync_device_modify', 'horde', array($dev)); } catch (Horde_Exception_HookNotSet $e) { } $js[$dev->id . ':' . $registry->getAuth()] = array('id' => $dev->id, 'user' => $dev->user); $syncCache = new Horde_ActiveSync_SyncCache($state, $dev->id, $dev->user, $injector->getInstance('Horde_Log_Logger')); $dev->hbinterval = $syncCache->hbinterval ? $syncCache->hbinterval : ($syncCache->wait ? $syncCache->wait * 60 : _("Unavailable")); $devs[] = $dev; $collection = array(); foreach ($syncCache->getCollections() as $id => $c) { $collection[] = array(_("Collection id") => $id, _("Class") => $c['class'], _("Server Id") => $c['serverid'], _("Last synckey") => $c['lastsynckey']); } $collections[] = $collection; } $view->collections = $collections; // Identities if (!$prefs->isLocked('activesync_identity')) { $ident = $GLOBALS['injector']->getInstance('Horde_Core_Factory_Identity')->create($registry->getAuth()); $view->identities = $ident->getAll('id'); $view->identities['horde'] = _("Use Horde Default"); $view->default = $prefs->getValue('activesync_identity'); if (is_null($view->default)) { $view->default = $prefs->getValue('default_identity'); } } $page_output->addScriptFile('activesyncprefs.js', 'horde'); $page_output->addInlineJsVars(array('HordeActiveSyncPrefs.devices' => $js)); $view->devices = $devs; return $view->render('activesync'); }
/** * URL Parameters: * - search: (string) Search term (defaults to ''). * - source: (string) The addressbook source to use. * - to_only: (boolean) Are we limiting to only the 'To:' field? */ protected function _init() { global $injector, $page_output, $registry; /* Sanity checking. */ if (!$registry->hasMethod('contacts/search')) { $e = new IMP_Exception('Addressbook not available on this system.'); $e->logged = true; throw $e; } /* Get the lists of address books. */ $contacts = $injector->getInstance('IMP_Contacts'); $source_list = $contacts->source_list; /* Choose the correct source. */ if (!isset($this->vars->source) || !isset($source_list[$this->vars->source])) { reset($source_list); $this->vars->source = key($source_list); } /* Prepare the contacts view. */ $view = new Horde_View(array('templatePath' => IMP_TEMPLATES . '/contacts')); $view->addHelper('FormTag'); $view->addHelper('Tag'); $view->search = $this->vars->search; $view->to_only = intval($this->vars->to_only); if (count($source_list) > 1) { $s_list = array(); foreach ($source_list as $key => $select) { $s_list[] = array('label' => $select, 'selected' => $key == $this->vars->source, 'val' => $key); } $view->source_list = $s_list; } else { $view->source_list = key($source_list); } /* Pre-populate address list if search text is provided. */ if (strlen($this->vars->search)) { $initial = array_map('strval', iterator_to_array($contacts->searchEmail($this->vars->search, array('sources' => array($this->vars->source))))); } else { $initial = null; } /* Display the form. */ $page_output->addScriptFile('hordecore.js', 'horde'); $page_output->addScriptFile('form_ghost.js', 'horde'); $page_output->addScriptFile('contacts.js'); $page_output->addInlineJsVars(array_filter(array('ImpContacts.initial' => $initial, 'ImpContacts.text' => array('rcpt' => array('to' => _("To"), 'cc' => _("Cc"), 'bcc' => _("Bcc")), 'closed' => _("The message being composed has been closed."), 'no_contacts_selected' => _("No addresses were selected."), 'searching' => _("Searching..."), 'select' => _("You must select an address first."))))); $c_css = new Horde_Themes_Element('contacts.css'); $page_output->addStylesheet($c_css->fs, $c_css->uri); $page_output->topbar = $page_output->sidebar = false; $this->header = _("Address Book"); $this->output = $view->render('contacts'); }
/** */ public function display(Horde_Core_Prefs_Ui $ui) { global $injector, $page_output; $page_output->addScriptFile('prefs/folder.js'); $page_output->addInlineJsVars(array('ImpFolderPrefs.mboxes.drafts' => _("Enter the name for your new drafts mailbox."))); $view = new Horde_View(array('templatePath' => IMP_TEMPLATES . '/prefs')); $view->addHelper('Horde_Core_View_Helper_Label'); $iterator = new IMP_Ftree_IteratorFilter($injector->getInstance('IMP_Ftree')); $iterator->add(array($iterator::NONIMAP, $iterator::REMOTE)); $iterator->mboxes = array('INBOX'); $view->flist = new IMP_Ftree_Select(array('basename' => true, 'iterator' => $iterator, 'new_mbox' => true, 'selected' => IMP_Mailbox::getPref(IMP_Mailbox::MBOX_DRAFTS))); $view->nombox = IMP_Mailbox::formTo(self::PREF_NO_MBOX); $view->special_use = $this->_getSpecialUse(Horde_Imap_Client::SPECIALUSE_DRAFTS); return $view->render('drafts'); }
/** */ public function display(Horde_Core_Prefs_Ui $ui) { global $prefs; $view = new Horde_View(array('templatePath' => IMP_TEMPLATES . '/prefs')); $view->addHelper('FormTag'); $view->addHelper('Tag'); $view->addHelper('Text'); $newmail_audio = $view->newmail_audio = $prefs->getValue('newmail_audio'); $sounds = array(); foreach (Horde_Themes::soundList() as $key => $val) { $sounds[] = array('c' => $newmail_audio == $key, 'l' => $key, 's' => $val->uri, 'v' => $key); } $view->sounds = $sounds; return $view->render('newmailaudio'); }
/** */ public function display(Horde_Core_Prefs_Ui $ui) { global $page_output, $prefs, $registry; $page_output->addScriptFile('syncmlprefs.js', 'horde'); $devices = Horde_SyncMl_Backend::factory('Horde')->getUserAnchors($registry->getAuth()); $view = new Horde_View(array('templatePath' => HORDE_TEMPLATES . '/prefs')); $view->addHelper('Text'); $partners = array(); $format = $prefs->getValue('date_format') . ' %H:%M'; foreach ($devices as $device) { $partners[] = array('anchor' => $device['syncml_clientanchor'], 'db' => $device['syncml_db'], 'deviceid' => $device['syncml_syncpartner'], 'rawdb' => $device['syncml_db'], 'device' => $device['syncml_syncpartner'], 'time' => strftime($format, $device['syncml_serveranchor'])); } $view->devices = $partners; return $view->render('syncml'); }
/** */ public function display(Horde_Core_Prefs_Ui $ui) { global $browser, $injector, $page_output, $prefs; $page_output->addScriptPackage('IMP_Script_Package_Imp'); $p_css = new Horde_Themes_Element('prefs.css'); $page_output->addStylesheet($p_css->fs, $p_css->uri); $view = new Horde_View(array('templatePath' => IMP_TEMPLATES . '/prefs')); $view->addHelper('Horde_Core_View_Helper_Help'); if (!Horde::isConnectionSecure()) { $view->notsecure = true; return $view->render('smimeprivatekey'); } $smime_url = IMP_Basic_Smime::url(); $view->has_key = $prefs->getValue('smime_public_key') && $prefs->getValue('smime_private_key'); $view->has_sign_key = $prefs->getValue('smime_public_sign_key') && $prefs->getValue('smime_private_sign_key'); if ($browser->allowFileUploads()) { $view->import = true; $page_output->addInlineScript(array('$("import_smime_personal").observe("click", function(e) { ' . Horde::popupJs($smime_url, array('params' => array('actionID' => 'import_personal_certs', 'reload' => base64_encode($ui->selfUrl()->setRaw(true))), 'height' => 450, 'width' => 750, 'urlencode' => true)) . '; e.stop(); })'), true); } if (!$view->has_key) { return $view->render('smimeprivatekey'); } $smime = $injector->getInstance('IMP_Smime'); foreach (array('' => false, '_sign' => true) as $suffix => $secondary) { if ($secondary && !$view->has_sign_key) { continue; } $cert = $smime->parseCert($smime->getPersonalPublicKey($secondary)); if (!empty($cert['validity']['notafter'])) { $expired = new Horde_Date($cert['validity']['notafter']); if ($expired->before(time())) { $view->{'expiredate' . $suffix} = $expired->strftime($prefs->getValue('date_format')); $view->{'expiretime' . $suffix} = $expired->strftime($prefs->getValue('time_format')); } } $view->{'viewpublic' . $suffix} = $smime_url->copy()->add('actionID', 'view_personal_public' . $suffix . '_key')->link(array('title' => $secondary ? _("View Secondary Personal Public Certificate") : _("View Personal Public Certificate"), 'target' => 'view_key')) . _("View") . '</a>'; $view->{'infopublic' . $suffix} = $smime_url->copy()->add('actionID', 'info_personal_public' . $suffix . '_key')->link(array('title' => _("Information on Personal Public Certificate"), 'target' => 'info_key')) . _("Details") . '</a>'; if ($smime->getPassphrase($secondary)) { $view->{'passphrase' . $suffix} = $ui->selfUrl(array('special' => true, 'token' => true))->add('unset_smime' . $suffix . '_passphrase', 1)->link(array('title' => _("Unload Passphrase"))) . _("Unload Passphrase") . '</a>'; } else { $imple = $injector->getInstance('Horde_Core_Factory_Imple')->create('IMP_Ajax_Imple_PassphraseDialog', array('params' => array('reload' => $ui->selfUrl()->setRaw(true), 'secondary' => intval($secondary)), 'type' => 'smimePersonal')); $view->{'passphrase' . $suffix} = Horde::link('#', _("Enter Passphrase"), null, null, null, null, null, array('id' => $imple->getDomId())) . _("Enter Passphrase"); } $view->{'viewprivate' . $suffix} = $smime_url->copy()->add('actionID', 'view_personal_private' . $suffix . '_key')->link(array('title' => _("View Secondary Personal Private Key"), 'target' => 'view_key')) . _("View") . '</a>'; $page_output->addInlineScript(array('$("delete_smime_personal' . $suffix . '").observe("click", function(e) { if (!window.confirm(' . json_encode(_("Are you sure you want to delete your keypair? (This is NOT recommended!)")) . ')) { e.stop(); } })'), true); } return $view->render('smimeprivatekey'); }
/** * */ public function run() { extract($this->_params, EXTR_REFS); try { $channels = $GLOBALS['injector']->getInstance('Jonah_Driver')->getChannels(); } catch (Exception $e) { $notification->push(sprintf(_("An error occurred fetching channels: %s"), $e->getMessage()), 'horde.error'); $channels = false; } if ($channels) { $channels = Jonah::checkPermissions('channels', Horde_Perms::SHOW, $channels); /* Build channel specific fields. */ foreach ($channels as $key => $channel) { /* Edit channel link. */ $url = Horde::url('channels/edit.php')->add('channel_id', $channel['channel_id']); $channels[$key]['edit_link'] = $url->link(array('title' => _("Edit channel"))) . Horde::img('edit.png') . '</a>'; /* Delete channel link. */ $url = Horde::url('channels/delete.php')->add('channel_id', $channel['channel_id']); $channels[$key]['delete_link'] = $url->link(array('title' => _("Delete channel"))) . Horde::img('delete.png') . '</a>'; /* View stories link. */ $channels[$key]['stories_url'] = Horde::url('stories/index.php')->add('channel_id', $channel['channel_id']); /* Channel type specific links. */ $channels[$key]['addstory_link'] = ''; $channels[$key]['refresh_link'] = ''; switch ($channel['channel_type']) { case Jonah::INTERNAL_CHANNEL: /* Add story link. */ $url = Horde::url('stories/edit.php')->add('channel_id', $channel['channel_id']); $channels[$key]['addstory_link'] = $url->link(array('title' => _("Add story"))) . Horde::img('new.png') . '</a>'; break; } $channels[$key]['channel_type'] = Jonah::getChannelTypeLabel($channel['channel_type']); $channels[$key]['channel_updated'] = $channel['channel_updated'] ? strftime($prefs->getValue('date_format'), (int) $channel['channel_updated']) : '-'; } } $view = new Horde_View(array('templatePath' => JONAH_TEMPLATES . '/view')); $view->addHelper('Tag'); $view->channels = $channels; $view->search_img = Horde::img('search.png'); global $page_output; $page_output->addScriptFile('tables.js', 'horde'); $page_output->addScriptFile('quickfinder.js', 'horde'); $page_output->header(array('title' => _("Feeds"))); $notification->notify(array('listeners' => 'status')); echo $view->render('channellist'); $page_output->footer(); }
/** */ public function display(Horde_Core_Prefs_Ui $ui) { global $injector, $page_output, $prefs; if ($prefs->isLocked(IMP_Mailbox::MBOX_TEMPLATES)) { return ''; } $page_output->addScriptFile('prefs/folder.js'); $page_output->addInlineJsVars(array('ImpFolderPrefs.mboxes.templates' => _("Enter the name for your new compose templates mailbox."))); $view = new Horde_View(array('templatePath' => IMP_TEMPLATES . '/prefs')); $view->addHelper('Horde_Core_View_Helper_Label'); $iterator = new IMP_Ftree_IteratorFilter($injector->getInstance('IMP_Ftree')); $iterator->add(array($iterator::NONIMAP, $iterator::REMOTE)); $iterator->mboxes = array('INBOX'); $view->mbox_flist = new IMP_Ftree_Select(array('iterator' => $iterator, 'new_mbox' => true, 'selected' => IMP_Mailbox::getPref(IMP_Mailbox::MBOX_TEMPLATES))); $view->mbox_nomailbox = IMP_Mailbox::formTo(self::PREF_NO_MBOX); return $view->render('composetemplates'); }
/** */ public function display(Horde_Core_Prefs_Ui $ui) { global $injector, $prefs; $view = new Horde_View(array('templatePath' => IMP_TEMPLATES . '/prefs')); $view->addHelper('FormTag'); $view->addHelper('Horde_Core_View_Helper_Label'); $view->addHelper('Tag'); $iterator = new IMP_Ftree_IteratorFilter($injector->getInstance('IMP_Ftree')); $iterator->add($iterator::REMOTE); if (!($initial_page = $prefs->getValue('initial_page'))) { $initial_page = 'INBOX'; } $view->folder_page = IMP_Mailbox::formTo(IMP::INITIAL_FOLDERS); $view->folder_sel = $initial_page == IMP::INITIAL_FOLDERS; $view->flist = new IMP_Ftree_Select(array('inc_vfolder' => true, 'iterator' => $iterator, 'selected' => $initial_page)); return $view->render('initialpage'); }
/** * Return the HTML representing this view. * * @return string The HTML. * */ public function html() { global $conf, $prefs, $registry; $vars = Horde_Variables::getDefaultVariables(); if (!empty($this->_params['page'])) { $vars->add('page', $this->_params['page']); } if (!empty($this->_params['pager_url'])) { $this->_pagerurl = $this->_params['pager_url']; $override = true; } else { $override = false; $this->_pagerurl = Ansel::getUrlFor('view', array('owner' => $this->_owner, 'special' => $this->_special, 'groupby' => $this->_view->groupby, 'view' => 'List')); } $p_params = array('num' => $this->_view->numGalleries, 'url' => $this->_pagerurl, 'perpage' => $this->_view->gPerPage); if ($override) { $p_params['url_callback'] = null; } $this->_pager = new Horde_Core_Ui_Pager('page', $vars, $p_params); $preserve = array('sort_dir' => $this->_view->sortDir); if (!empty($this->_view->sortBy)) { $preserve['sort'] = $this->_view->sortBy; } $this->_pager->preserve($preserve); if ($this->_view->numGalleries) { $min = $this->_page * $this->_view->gPerPage; $max = $min + $this->_view->gPerPage; if ($max > $this->_view->numGalleries) { $max = $this->_view->numGalleries - $min; } $this->_view->start = $min + 1; $this->_view->end = min($this->_view->numGalleries, $min + $this->_view->gPerPage); if ($this->_owner) { $this->_view->refresh_link = Ansel::getUrlFor('view', array('groupby' => $this->_view->groupby, 'owner' => $this->_owner, 'page' => $this->_page, 'view' => 'List')); } else { $this->_view->refresh_link = Ansel::getUrlFor('view', array('view' => 'List', 'groupby' => $this->_view->groupby, 'page' => $this->_page)); } // Get top-level / default gallery style. if (empty($this->_params['style'])) { $style = Ansel::getStyleDefinition($prefs->getValue('default_gallerystyle')); } else { $style = Ansel::getStyleDefinition($this->_params['style']); } // Final touches. if (empty($this->_params['api'])) { $this->_view->breadcrumbs = Ansel::getBreadcrumbs(); $this->_view->groupbyUrl = strval(Ansel::getUrlFor('group', array('actionID' => 'groupby', 'groupby' => 'owner'))); } $this->_view->pager = $this->_pager->render(); $this->_view->style = $style; $this->_view->tilesperrow = $prefs->getValue('tilesperrow'); $this->_view->cellwidth = round(100 / $this->_view->tilesperrow); $this->_view->params = $this->_params; $GLOBALS['page_output']->addScriptFile('views/common.js'); return $this->_view->render('list'); } return ' '; }
/** */ public function display(Horde_Core_Prefs_Ui $ui) { global $browser, $conf, $injector, $page_output, $prefs; $page_output->addScriptPackage('IMP_Script_Package_Imp'); $p_css = new Horde_Themes_Element('prefs.css'); $page_output->addStylesheet($p_css->fs, $p_css->uri); $view = new Horde_View(array('templatePath' => IMP_TEMPLATES . '/prefs')); $view->addHelper('Horde_Core_View_Helper_Help'); if (!Horde::isConnectionSecure()) { $view->notsecure = true; } else { $pgp_url = IMP_Basic_Pgp::url(); $view->has_key = $prefs->getValue('pgp_public_key') && $prefs->getValue('pgp_private_key'); if ($view->has_key) { $view->viewpublic = Horde::link($pgp_url->copy()->add('actionID', 'view_personal_public_key'), _("View Personal Public Key"), null, 'view_key'); $view->infopublic = Horde::link($pgp_url->copy()->add('actionID', 'info_personal_public_key'), _("Information on Personal Public Key"), null, 'info_key'); $view->sendkey = Horde::link($ui->selfUrl(array('special' => true, 'token' => true))->add('send_pgp_key', 1), _("Send Key to Public Keyserver")); if ($injector->getInstance('IMP_Pgp')->getPassphrase('personal')) { $view->passphrase = Horde::link($ui->selfUrl(array('special' => true, 'token' => true))->add('unset_pgp_passphrase', 1), _("Unload Passphrase")) . _("Unload Passphrase"); } else { $imple = $injector->getInstance('Horde_Core_Factory_Imple')->create('IMP_Ajax_Imple_PassphraseDialog', array('params' => array('reload' => $ui->selfUrl()->setRaw(true)), 'type' => 'pgpPersonal')); $view->passphrase = Horde::link('#', _("Enter Passphrase"), null, null, null, null, null, array('id' => $imple->getDomId())) . _("Enter Passphrase"); } $view->viewprivate = Horde::link($pgp_url->copy()->add('actionID', 'view_personal_private_key'), _("View Personal Private Key"), null, 'view_key'); $view->infoprivate = Horde::link($pgp_url->copy()->add('actionID', 'info_personal_private_key'), _("Information on Personal Private Key"), null, 'info_key'); $page_output->addInlineScript(array('$("delete_pgp_privkey").observe("click", function(e) { if (!window.confirm(' . json_encode(_("Are you sure you want to delete your keypair? (This is NOT recommended!)")) . ')) { e.stop(); } })'), true); } else { $page_output->addScriptFile('prefs/pgp.js'); Horde_Core_Ui_JsCalendar::init(); $page_output->addInlineJsVars(array('ImpPgp.months' => Horde_Core_Ui_JsCalendar::months())); $imp_identity = $injector->getInstance('IMP_Identity'); $view->fullname = $imp_identity->getFullname(); $view->fromaddr = $imp_identity->getFromAddress()->bare_address; if (!empty($conf['pgp']['keylength'])) { $view->create_pgp_keypair = true; $page_output->addInlineScript(array('$("create_pgp_key").observe("click", function(e) { if (!window.confirm(' . json_encode(_("Key generation may take a long time to complete. Continue with key generation?")) . ')) { e.stop(); } })'), true); } if ($browser->allowFileUploads()) { $view->import_pgp_private = true; $page_output->addInlineScript(array('$("import_pgp_personal").observe("click", function(e) { ' . Horde::popupJs($pgp_url, array('params' => array('actionID' => 'import_personal_key', 'reload' => base64_encode($ui->selfUrl()->setRaw(true))), 'height' => 300, 'width' => 750, 'urlencode' => true)) . '; e.stop(); })'), true); } } } return $view->render('pgpprivatekey'); }
/** * Renders this view. */ public function display() { $view = new Horde_View(array('templatePath' => TURBA_TEMPLATES . '/search/duplicate')); new Horde_View_Helper_Text($view); $hasDuplicate = $this->_type && $this->_duplicate && isset($this->_duplicates[$this->_type]) && isset($this->_duplicates[$this->_type][$this->_duplicate]); if ($hasDuplicate) { $vars = new Horde_Variables(); $view->type = $GLOBALS['attributes'][$this->_type]['label']; $view->value = $this->_duplicate; echo $view->render('header'); $view->contactUrl = Horde::url('contact.php'); $view->mergeUrl = Horde::url('merge.php'); $view->first = true; $duplicate = $this->_duplicates[$this->_type][$this->_duplicate]; while ($contact = $duplicate->next()) { $contact->lastModification(); } $duplicate->sort(array(array('field' => '__modified', 'ascending' => false))); $view->mergeTarget = $duplicate->reset()->getValue('__key'); while ($contact = $duplicate->next()) { $view->source = $contact->getSource(); $view->id = $contact->getValue('__key'); $history = $contact->getHistory(); if (isset($history['modified'])) { $view->changed = $history['modified']; } elseif (isset($history['created'])) { $view->changed = $history['created']; } else { unset($view->changed); } echo $view->render('contact_header'); $contactView = new Turba_Form_Contact($vars, $contact, false); $contactView->renderInactive($contactView->getRenderer(), $vars); echo $view->render('contact_footer'); $view->first = false; } echo $view->render('footer'); } $view->duplicates = $this->_duplicates; $view->hasDuplicate = (bool) $hasDuplicate; $view->attributes = $GLOBALS['attributes']; $view->link = Horde::url('search.php')->add(array('source' => $this->_driver->getName(), 'search_mode' => 'duplicate')); echo $view->render('list'); }
/** */ public function display(Horde_Core_Prefs_Ui $ui) { global $injector, $page_output; $page_output->addScriptFile('folderprefs.js'); $identity = $injector->getInstance('IMP_Identity'); $js = array(); foreach ($identity->getAllSentmail(false) as $key => $val) { $js[$key] = $val->form_to; } $page_output->addInlineJsVars(array('ImpFolderPrefs.mboxes' => array('sent_mail' => _("Create a new sent-mail mailbox")), 'ImpFolderPrefs.sentmail' => $js)); $view = new Horde_View(array('templatePath' => IMP_TEMPLATES . '/prefs')); $view->addHelper('Horde_Core_View_Helper_Label'); $view->default = IMP_Mailbox::formTo(self::PREF_DEFAULT); $iterator = new IMP_Ftree_IteratorFilter($injector->getInstance('IMP_Ftree')); $iterator->add($iterator::NONIMAP); $iterator->mboxes = array('INBOX'); $view->flist = new IMP_Ftree_Select(array('basename' => true, 'iterator' => $iterator, 'new_mbox' => true)); $view->special_use = $this->_getSpecialUse(Horde_Imap_Client::SPECIALUSE_SENT); return $view->render('sentmail'); }
/** */ public function display(Horde_Core_Prefs_Ui $ui) { global $injector, $page_output, $prefs; $page_output->addScriptFile('hordecore.js', 'horde'); $page_output->addScriptFile('prefs/searches.js'); $p_css = new Horde_Themes_Element('prefs.css'); $page_output->addStylesheet($p_css->fs, $p_css->uri); $imp_search = $injector->getInstance('IMP_Search'); $fout = $vout = array(); $view = new Horde_View(array('templatePath' => IMP_TEMPLATES . '/prefs')); $view->addHelper('FormTag'); $view->addHelper('Tag'); $view->addHelper('Text'); $vfolder_locked = $prefs->isLocked('vfolder'); $iterator = IMP_Search_IteratorFilter::create(IMP_Search_IteratorFilter::DISABLED | IMP_Search_IteratorFilter::VFOLDER); foreach ($iterator as $val) { if (!$val->prefDisplay) { continue; } $editable = !$vfolder_locked && $imp_search->isVFolder($val, true); $m_url = $val->enabled ? $val->mbox_ob->url('mailbox')->link() : null; $vout[] = array('description' => Horde_String::truncate($val->querytext, 200), 'edit' => $editable ? $imp_search->editUrl($val) : null, 'enabled' => $val->enabled, 'enabled_locked' => $vfolder_locked, 'key' => $val->id, 'label' => $val->label, 'm_url' => $m_url); } $view->vfolders = $vout; $filter_locked = $prefs->isLocked('filter'); $iterator = IMP_Search_IteratorFilter::create(IMP_Search_IteratorFilter::DISABLED | IMP_Search_IteratorFilter::FILTER); foreach ($iterator as $val) { if (!$val->prefDisplay) { continue; } $editable = !$filter_locked && $imp_search->isFilter($val, true); $fout[] = array('description' => Horde_String::truncate($val->querytext, 200), 'edit' => $editable ? $imp_search->editUrl($val) : null, 'enabled' => $val->enabled, 'enabled_locked' => $filter_locked, 'key' => $val->id, 'label' => $val->label); } $view->filters = $fout; if (empty($fout) && empty($vout)) { $view->nosearches = true; } else { $GLOBALS['page_output']->addInlineJsVars(array('ImpSearchesPrefs.confirm_delete_filter' => _("Are you sure you want to delete this filter?"), 'ImpSearchesPrefs.confirm_delete_vfolder' => _("Are you sure you want to delete this virtual folder?"))); } return $view->render('searches'); }