Copyright 2001-2003 Robert E. Coyle
Copyright 2003-2016 Horde LLC (http://www.horde.org/)
See the enclosed file COPYING for license information (LGPL). If you
did not receive this file, see http://www.horde.org/licenses/lgpl21.
/** * Creates tabs to navigate the user manager area. * * @return Horde_Core_Ui_Tabs */ public static function getUserMgrTabs(Variables $vars) { $url = Horde::url('users/index.php'); $tabs = new Horde_Core_Ui_Tabs('section', $vars); foreach (Vilma::getUserMgrTypes() as $section => $desc) { $tabs->addTab($desc['plural'], $url, $section); } return $tabs; }
break; } $help = new Horde_Help(Horde_Help::SOURCE_FILE, $fname, $views); $page_output->sidebar = $page_output->topbar = false; $page_output->header(array('body_class' => 'help help_' . urlencode($show), 'title' => _("Help"))); switch ($show) { case 'menu': $version = Horde_String::ucfirst($module) . ' ' . $registry->getVersion($module); require HORDE_TEMPLATES . '/help/menu.inc'; break; case 'sidebar': /* Generate Tabs */ if (!isset($vars->side_show)) { $vars->side_show = 'index'; } $tabs = new Horde_Core_Ui_Tabs('side_show', $vars); $tabs->addTab(_("Help _Topics"), $sidebar_url, 'index'); $tabs->addTab(_("Sea_rch"), $sidebar_url, 'search'); /* Set up the tree. */ $tree = $injector->getInstance('Horde_Core_Factory_Tree')->create('horde_help', 'Javascript'); $tree->setOption(array('target' => 'help_main')); $contents = ''; switch ($vars->get('side_show', 'index')) { case 'index': $topics = $help->topics(); $added_nodes = array(); $node_params_master = array('icon' => '', 'target' => 'help_main'); foreach ($topics as $id => $title) { if (!$title) { continue; }
public static function getAdminTabs() { $tabname = Horde_Util::getFormData('view'); $tabs = new Horde_Core_Ui_Tabs('view', Horde_Variables::getDefaultVariables()); $tabs->addTab(_("Telephone Numbers"), Horde::url('admin/numbers.php'), array('view' => 'numbers', id => 'tabnumbers')); $tabs->addTab(_("Accounts"), Horde::url('admin/accounts.php'), array('view' => 'accounts', id => 'tabaccounts')); if ($view === null) { $view = 'numbers'; } echo $tabs->render($view); }
<?php /** * Copyright 2007 Obala d.o.o. (http://www.obala.si/) * * See the enclosed file COPYING for license information (LGPL). If you * did not receive this file, see http://www.horde.org/licenses/lgpl21. * * @author Duck <*****@*****.**> */ $folks_authentication = 'none'; require_once __DIR__ . '/../lib/base.php'; $auth = $injector->getInstance('Horde_Core_Factory_Auth')->create(); $vars = Horde_Variables::getDefaultVariables(); $tabs = new Horde_Core_Ui_Tabs('what', $vars); $tabs->addTab(_("Login"), Horde::url('login.php'), 'login'); if ($conf['signup']['allow'] === true && $auth->hasCapability('add')) { $tabs->addTab(_("Don't have an account? Sign up."), Horde::url('account/signup.php'), 'signup'); } if ($auth->hasCapability('resetpassword')) { $tabs->addTab(_("Forgot your password?"), Horde::url('account/resetpassword.php'), 'resetpassword'); } $tabs->addTab(_("Forgot your username?"), Horde::url('account/username.php'), 'username');
/** * Constructor. * * @param array $config Configuration key-value pairs. */ public function __construct($config = array()) { global $conf, $injector, $registry, $session; $config['templatePath'] = KRONOLITH_TEMPLATES . '/attendees'; parent::__construct($config); $this->addHelper('Text'); $this->formInput = Horde_Util::formInput(); $this->view = Horde_Util::getFormData('view', 'Day'); $this->date = $config['start']->dateString(); $this->end = $config['end']->dateString(); $this->freeBusy = $config['fbView']->render($config['start']); $auth = $injector->getInstance('Horde_Core_Factory_Auth')->create(); if ($auth->hasCapability('list') && ($conf['auth']['list_users'] == 'list' || $conf['auth']['list_users'] == 'both')) { $this->userList = $auth->listNames(); } $this->resourcesEnabled = !empty($conf['resources']['enabled']); if ($registry->hasMethod('contacts/search')) { $this->addressbookLink = Horde::url('#')->link(array('class' => 'widget', 'onclick' => 'window.open(\'' . Horde::url('contacts.php') . '\', \'contacts\', \'toolbar=no,location=no,status=no,scrollbars=yes,resizable=yes,width=550,height=270,left=100,top=100\'); return false;')) . Horde::img('addressbook_browse.png') . '<br />' . _("Address Book") . '</a>'; } $vars = Horde_Variables::getDefaultVariables(); $tabs = new Horde_Core_Ui_Tabs(null, $vars); $tabs->addTab(_("Day"), new Horde_Url('javascript:switchView(\'Day\')'), 'Day'); $tabs->addTab(_("Work Week"), new Horde_Url('javascript:switchView(\'Workweek\')'), 'Workweek'); $tabs->addTab(_("Week"), new Horde_Url('javascript:switchView(\'Week\')'), 'Week'); $tabs->addTab(_("Month"), new Horde_Url('javascript:switchView(\'Month\')'), 'Month'); $this->tabs = $tabs->render($this->view); $attendees = $session->get('kronolith', 'attendees'); if ($attendees) { $roles = array(Kronolith::PART_REQUIRED, Kronolith::PART_OPTIONAL, Kronolith::PART_NONE); $responses = array(Kronolith::RESPONSE_ACCEPTED, Kronolith::RESPONSE_DECLINED, Kronolith::RESPONSE_TENTATIVE, Kronolith::RESPONSE_NONE); $this->attendees = array(); foreach ($attendees as $attendee) { $viewAttendee = array('id' => $attendee->id, 'name' => strval($attendee), 'deleteLink' => Horde::url('#')->link(array('title' => sprintf(_("Remove %s"), $attendee->displayName), 'onclick' => "performAction('remove', decodeURIComponent('" . rawurlencode($attendee->id) . "')); return false;")) . Horde::img('delete.png') . '</a>'); if ($attendee->user) { unset($this->userList[$attendee->user]); } else { $viewAttendee['editLink'] = Horde::url('#')->link(array('title' => sprintf(_("Edit %s"), $attendee->displayName), 'onclick' => "performAction('edit', decodeURIComponent('" . rawurlencode($attendee->id) . "')); return false;")) . Horde::img('edit.png') . '</a>'; } foreach ($roles as $role) { $viewAttendee['roles'][$role] = array('selected' => $attendee->role == $role, 'label' => Kronolith::partToString($role)); } foreach ($responses as $response) { $viewAttendee['responses'][$response] = array('selected' => $attendee->response == $response, 'label' => Kronolith::responseToString($response)); } $this->attendees[] = $viewAttendee; } } $this->resources = $session->get('kronolith', 'resources', Horde_Session::TYPE_ARRAY); foreach ($this->resources as $id => &$resource) { $resource['id'] = $id; $resource['deleteLink'] = Horde::url('#')->link(array('title' => sprintf(_("Remove %s"), $resource['name']), 'onclick' => "performAction('removeResource', decodeURIComponent('" . $id . "')); return false;")) . Horde::img('delete.png') . '</a>'; foreach ($roles as $role) { $resource['roles'][$role] = array('selected' => $resource['attendance'] == $role, 'label' => Kronolith::partToString($role)); } foreach ($responses as $response) { $resource['responses'][$response] = array('selected' => $resource['response'] == $response, 'label' => Kronolith::responseToString($response)); } } /* Get list of resources for select list, and remove those we already * added. */ if ($this->resourcesEnabled) { $this->allResources = array_diff_key(Kronolith::getDriver('Resource')->listResources(Horde_Perms::READ, array(), 'name'), $this->resources); } }
/** * Returns the tabs for navigating between ticket actions. */ public static function getTicketTabs(&$vars, $id) { $tabs = new Horde_Core_Ui_Tabs(null, $vars); $queue = Whups_Ticket::makeTicket($id)->get('queue'); $tabs->addTab(_("_History"), self::urlFor('ticket', $id), 'history'); $tabs->addTab(_("_Attachments"), self::urlFor('ticket_action', array('attachments', $id)), 'attachments'); if (self::hasPermission($queue, 'queue', 'update')) { $tabs->addTab(_("_Update"), self::urlFor('ticket_action', array('update', $id)), 'update'); } else { $tabs->addTab(_("_Comment"), self::urlFor('ticket_action', array('comment', $id)), 'comment'); } $tabs->addTab(_("_Watch"), self::urlFor('ticket_action', array('watch', $id)), 'watch'); if (self::hasPermission($queue, 'queue', Horde_Perms::DELETE)) { $tabs->addTab(_("S_et Queue"), self::urlFor('ticket_action', array('queue', $id)), 'queue'); } if (self::hasPermission($queue, 'queue', 'update')) { $tabs->addTab(_("Set _Type"), self::urlFor('ticket_action', array('type', $id)), 'type'); } if (self::hasPermission($queue, 'queue', Horde_Perms::DELETE)) { $tabs->addTab(_("_Delete"), self::urlFor('ticket_action', array('delete', $id)), 'delete'); } return $tabs; }
public static function tabs() { /* Build search mode tabs. */ $sUrl = Horde::selfUrl(); $tabs = new Horde_Core_Ui_Tabs('search_mode', Horde_Variables::getDefaultVariables()); $tabs->addTab(_("Summary"), $sUrl, 'summary'); $tabs->addTab(_("By Date"), $sUrl, 'date'); $tabs->addTab(_("By Employee"), $sUrl, 'employee'); $tabs->addTab(_("By Client"), $sUrl, 'client'); $tabs->addTab(_("By Job Type"), $sUrl, 'jobtype'); $tabs->addTab(_("By Cost Object"), $sUrl, 'costobject'); if ($mode = Horde_Util::getFormData('search_mode')) { $GLOBALS['session']->set('hermes', 'search_mode', $mode); } elseif (!$GLOBALS['session']->exists('hermes', 'search_mode')) { $GLOBALS['session']->set('hermes', 'search_mode', 'summary'); } return $tabs->render($GLOBALS['session']->get('hermes', 'search_mode')); }
<?php /** * Process an single photo (to be called by ajax) * * Copyright 2008-2014 Horde LLC (http://www.horde.org/) * * See the enclosed file COPYING for license information (GPL). If you * did not receive this file, see http://www.horde.org/licenses/gpl. * * @author Duck <*****@*****.**> */ require_once __DIR__ . '/../../lib/Application.php'; Horde_Registry::appInit('ansel'); $faces = $GLOBALS['injector']->getInstance('Ansel_Faces'); /* Show tabs */ $vars = Horde_Variables::getDefaultVariables(); $tabs = new Horde_Core_Ui_Tabs(null, $vars); $tabs->addTab(_("All faces"), Horde::url('faces/search/all.php')); $tabs->addTab(_("From my galleries"), Horde::url('faces/search/owner.php')); $tabs->addTab(_("Named faces"), Horde::url('faces/search/named.php')); $tabs->addTab(_("Search by name"), Horde::url('faces/search/name.php')); if ($conf['faces']['search']) { $tabs->addTab(_("Search by photo"), Horde::url('faces/search/image.php')); }
/** * Generate the link used for various file views. * * @param string $where The current file path. * @param string $rev The current revision. * * @return array An array of file view links. */ public static function getFileViews($where, $rev) { global $injector, $VC; $tabs = new Horde_Core_Ui_Tabs(null, $injector->getInstance('Horde_Variables')); $tabs->addTab(_("_View"), Chora::url('co', $where, array('r' => $rev)), 'co'); $tabs->addTab(_("_Annotate"), Chora::url('annotate', $where, array('rev' => $rev)), 'annotate'); if ($VC->hasFeature('snapshots')) { $snapdir = dirname($VC->getFile($where)->getPath()); $tabs->addTab(_("_Snapshot"), Chora::url('browsedir', $snapdir == '.' ? '' : $snapdir . '/', array('onb' => $rev))); } $tabs->addTab(_("_Download"), Chora::url('co', $where, array('r' => $rev, 'p' => 1))); return $tabs; }
case 'Contact': $view = new Turba_View_Contact($contact); if (!$vars->get('url')) { $vars->set('url', $contact->url(null, true)); } break; case 'EditContact': $view = new Turba_View_EditContact($contact); break; case 'DeleteContact': $view = new Turba_View_DeleteContact($contact); break; } // Get tabs. $url = $contact->url(); $tabs = new Horde_Core_Ui_Tabs('view', $vars); $tabs->addTab(_("_View"), $url, array('tabname' => 'Contact', 'id' => 'tabContact', 'class' => 'horde-icon', 'onclick' => 'return TurbaTabs.showTab(\'Contact\');')); if ($contact->hasPermission(Horde_Perms::EDIT)) { $tabs->addTab(_("_Edit"), $url, array('tabname' => 'EditContact', 'id' => 'tabEditContact', 'class' => 'horde-icon', 'onclick' => 'return TurbaTabs.showTab(\'EditContact\');')); } if ($contact->hasPermission(Horde_Perms::DELETE)) { $tabs->addTab(_("De_lete"), $url, array('tabname' => 'DeleteContact', 'id' => 'tabDeleteContact', 'class' => 'horde-icon', 'onclick' => 'return TurbaTabs.showTab(\'DeleteContact\');')); } $owner = explode(';', $prefs->getValue('own_contact')); if (count($owner) == 2 && $owner[0] == $source && $owner[1] == $contact->getValue('__key')) { $own_icon = ' ' . Horde_Themes_Image::tag('user.png', array('alt' => _("Your own contact"), 'attr' => array('title' => _("Your own contact")))); $own_link = ''; } else { $own_icon = ''; $own_link = '<span class="smallheader rightFloat">' . $url->copy()->add('action', 'mark_own')->link() . _("Mark this as your own contact") . '</a></span>'; }
if (!empty($conf['resources']['enabled'])) { $allResources = Kronolith::getDriver('Resource')->listResources(Horde_Perms::READ, array(), 'name'); foreach (array_keys($resources) as $id) { unset($allResources[$id]); } } else { $allResources = array(); } // Get the current Free/Busy view; default to the 'day' view if none specified. $view = Horde_Util::getFormData('view', 'Day'); // Pre-format our delete image/link. $delimg = Horde::img('delete.png', _("Remove Attendee")); $ident = $injector->getInstance('Horde_Core_Factory_Identity')->create(); $identities = $ident->getAll('id'); $vars = Horde_Variables::getDefaultVariables(); $tabs = new Horde_Core_Ui_Tabs(null, $vars); $tabs->addTab(_("Day"), new Horde_Url('javascript:switchView(\'Day\')'), 'Day'); $tabs->addTab(_("Work Week"), new Horde_Url('javascript:switchView(\'Workweek\')'), 'Workweek'); $tabs->addTab(_("Week"), new Horde_Url('javascript:switchView(\'Week\')'), 'Week'); $tabs->addTab(_("Month"), new Horde_Url('javascript:switchView(\'Month\')'), 'Month'); $attendee_view =& Kronolith_FreeBusy_View::singleton($view); // Add the creator as a required attendee in the Free/Busy display $cal = @unserialize($prefs->getValue('fb_cals')); if (!is_array($cal)) { $cal = null; } // If the free/busy calendars preference is empty, default to the user's // default_share preference, and if that's empty, to their username. if (!$cal) { $cal = 'internal_' . $prefs->getValue('default_share'); if (!$cal) {
/** * Tab operations for this query. * * @params Horde_Variables */ public function getTabs(Horde_Variables $vars) { // Create a few variables that are reused. $queryurl = Horde::url('query/index.php'); $edit = $this->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT); $delete = $this->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::DELETE); $tabs = new Horde_Core_Ui_Tabs('action', $vars); $tabs->addTab(_("Ne_w Query"), $queryurl, 'new'); if (!$this->id || $edit) { $tabs->addTab(_("_Edit Query"), $queryurl, 'edit'); } if ($this->id && $edit && empty($GLOBALS['conf']['share']['no_sharing'])) { $GLOBALS['page_output']->addScriptFile('popup.js', 'horde'); $permsurl = Horde::url($GLOBALS['registry']->get('webroot', 'horde') . '/services/shares/edit.php')->add(array('app' => 'whups', 'cid' => $this->id)); $tabs->addTab(_("Edit _Permissions"), $permsurl, array('tabname' => 'perms', 'onclick' => 'popup(\'' . $permsurl . '\'); return false;', 'target' => '_blank')); } $tabs->addTab(_("E_xecute Query"), Horde::url('query/run.php'), 'run'); $tabs->addTab(_("_Load Query"), $queryurl, 'load'); if (!$this->id && $GLOBALS['registry']->getAuth() || $this->id && $edit) { $tabs->addTab(_("Sa_ve Query"), $queryurl, 'save'); } if ($this->id && $delete) { $tabs->addTab(_("_Delete Query"), $queryurl, 'delete'); } return $tabs; }
/** * Renders the view. * * @param Horde_PageOutput $output The output object. * * @return string The HTML needed to render the view. */ public function render($output) { global $injector, $prefs; $output->addScriptFile('tooltips.js', 'horde'); $output->addScriptFile('scriptaculous/effects.js', 'horde'); $output->addScriptFile('quickfinder.js', 'horde'); $output->header(array('title' => $this->_title)); $tabs = new Horde_Core_Ui_Tabs('tab_name', $this->_vars); if (!$GLOBALS['prefs']->isLocked('show_completed')) { $listurl = Horde::url('list.php'); $tabs->addTab(_("_All tasks"), $listurl->add('show_completed', Nag::VIEW_ALL), Nag::VIEW_ALL); $tabs->addTab(_("Incom_plete tasks"), $listurl->add('show_completed', Nag::VIEW_INCOMPLETE), Nag::VIEW_INCOMPLETE); $tabs->addTab(_("_Future tasks"), $listurl->add('show_completed', Nag::VIEW_FUTURE), Nag::VIEW_FUTURE); $tabs->addTab(_("_Completed tasks"), $listurl->add('show_completed', Nag::VIEW_COMPLETE), Nag::VIEW_COMPLETE); } foreach (Nag::listTasklists() as $list) { if ($list->get('issmart')) { $tabs->addTab($list->get('name'), $listurl->add(array('actionID' => 'smart', 'list' => $list->getName())), array('img' => 'search.png', 'tabname' => $list->getName())); } } // Set up the view $view = $GLOBALS['injector']->createInstance('Horde_View'); $view->addHelper(new Nag_View_Helper_List($view)); $view->tasks = $this->_tasks; $view->tabs = $tabs->render($this->_vars->get('tab_name', $prefs->getValue('show_completed'))); $view->browser = empty($this->_smartShare) && $this->_showTagBrowser ? $this->_getRelatedTags() . $this->_getTagTrail() : ''; $view->title = $this->_title; $view->sortby = $prefs->getValue('sortby'); $view->sortdir = $prefs->getValue('sortdir'); $view->sortdirclass = $view->sortdir ? 'sortup' : 'sortdown'; $view->dateFormat = $prefs->getValue('date_format'); $view->columns = @unserialize($prefs->getValue('tasklist_columns')); $view->smartShare = $this->_smartShare; $view->haveSearch = $this->_haveSearch; $view->tab_name = $this->_vars->get('tab_name', $prefs->getValue('show_completed')); if (empty($view->columns)) { $view->columns = array(); } $view->dynamic_sort = true; $view->baseurl = Horde::url('list.php'); if ($this->_vars->actionID == 'search_tasks') { $view->baseurl->add(array('actionID' => 'search_tasks', 'search_pattern' => $search_pattern, 'search_name' => $search_name ? 'on' : 'off', 'search_desc' => $search_desc ? 'on' : 'off')); } $view->tasks->reset(); Horde::startBuffer(); Nag::status(); echo $view->render('list'); $output->footer(); return Horde::endBuffer(); }
$columns = isset($sources[$source]) ? $sources[$source] : array(); $results->sort(Turba::getPreferredSortOrder()); $view = new Turba_View_List($results, null, $columns); $view->setType('search'); } else { $notification->push(_("Failed to search the address book"), 'horde.error'); } } catch (Turba_Exception $e) { $notification->push($e, 'horde.error'); } } } } /* Build search mode tabs. */ $sUrl = Horde::url('search.php'); $tabs = new Horde_Core_Ui_Tabs('search_mode', $vars); $tabs->addTab(_("Basic Search"), $sUrl, 'basic'); $tabs->addTab(_("Advanced Search"), $sUrl, 'advanced'); if (count($editableAddressBooks)) { $tabs->addTab(_("Duplicate Search"), $sUrl, 'duplicate'); } /* The form header. */ $headerView = new Horde_View(array('templatePath' => TURBA_TEMPLATES . '/search')); if (count($addressBooks) == 1) { $headerView->uniqueSource = key($addressBooks); } /* The search forms. */ $searchView = new Horde_View(array('templatePath' => TURBA_TEMPLATES . '/search')); new Horde_View_Helper_Text($searchView); $searchView->addressBooks = $addressBooks; $searchView->attributes = $GLOBALS['attributes'];
<?php /** * Copyright Obala d.o.o. (www.obala.si) * * See the enclosed file COPYING for license information (GPL). If you * did not receive this file, see http://www.horde.org/licenses/gpl. * * @author Duck <*****@*****.**> * @package Folks */ if (!$registry->isAuthenticated()) { throw new Horde_Exception_AuthenticationFailure(); } $vars = Horde_Variables::getDefaultVariables(); $tabs = new Horde_Core_Ui_Tabs('what', $vars); $tabs->addTab(_("Edit my profile"), Horde::url('edit/edit.php'), 'edit'); $tabs->addTab(_("Privacy"), Horde::url('edit/privacy.php'), 'privacy'); $tabs->addTab(_("Blacklist"), Horde::url('edit/friends/blacklist.php'), 'blacklist'); $tabs->addTab(_("Friends"), Horde::url('edit/friends/index.php'), 'friends'); $tabs->addTab(_("Groups"), Horde::url('edit/friends/groups.php'), 'groups'); $tabs->addTab(_("Activity"), Horde::url('edit/activity.php'), 'activity'); $tabs->addTab(_("Password"), Horde::url('edit/password.php'), 'password'); if ($conf['comments']['allow'] != 'never' && $registry->hasMethod('forums/doComments')) { $tabs->addTab(_("Comments"), Horde::url('edit/comments.php'), 'comments'); } if ($conf['facebook']['enabled']) { $tabs->addTab(_("Facebook"), Horde::url('edit/facebook.php'), 'facebook'); } $page_output->addScriptFile('tables.js', 'horde');
Horde_Registry::appInit('sesha'); $topbar = $injector->getInstance('Horde_View_Topbar'); $topbar->search = true; $topbar->searchAction = new Horde_Url('list.php'); $topbar->searchLabel = _("Stock ID"); $topbar->searchIcon = Horde_Themes::img('search-topbar.png'); $perms = $GLOBALS['injector']->getInstance('Horde_Perms'); $sesha_driver = $GLOBALS['injector']->getInstance('Sesha_Factory_Driver')->create(); $vars = Horde_Variables::getDefaultVariables(); $category_id = $vars->get('category_id'); $property_id = $vars->get('property_id'); $actionID = $vars->get('actionID'); // Admin actions. $baseUrl = $registry->get('webroot', 'sesha'); $adminurl = Horde::url('admin.php', true); $tabs = new Horde_Core_Ui_Tabs('actionID', $vars); $tabs->addTab(_("Manage Categories"), $adminurl, 'list_categories'); $tabs->addTab(_("Manage Properties"), $adminurl, 'list_properties'); if (!Sesha::isAdmin(Horde_Perms::DELETE)) { $notification->push(_("You are no administrator"), 'horde.warning'); header('Location: ' . Horde::url('list.php', true)); exit; } /* Run through the action handlers. */ switch ($actionID) { case 'add_category': $url = Horde::url('admin.php')->add('actionID', 'list_categories'); $title = _("Add a category"); $vars->set('actionID', $actionID); $renderer = new Horde_Form_Renderer(); $form = new Sesha_Form_Category($vars);
/** * @param string $tabname * @param Kronolith_Event $event */ public static function eventTabs($tabname, $event) { if (!$event->initialized) { return; } $GLOBALS['page_output']->addScriptFile('views.js'); $tabs = new Horde_Core_Ui_Tabs('event', Horde_Variables::getDefaultVariables()); $date = self::currentDate(); $tabs->preserve('datetime', $date->dateString()); $tabs->addTab(htmlspecialchars($event->getTitle()), $event->getViewUrl(), array('tabname' => 'Event', 'id' => 'tabEvent', 'onclick' => 'return ShowTab(\'Event\');')); /* We check for read permissions, because we can always save a copy if * we can read the event. */ if ((!$event->private || $event->creator == $GLOBALS['registry']->getAuth()) && $event->hasPermission(Horde_Perms::READ) && self::getDefaultCalendar(Horde_Perms::EDIT)) { $tabs->addTab($event->hasPermission(Horde_Perms::EDIT) ? _("_Edit") : _("Save As New"), $event->getEditUrl(), array('tabname' => 'EditEvent', 'id' => 'tabEditEvent', 'onclick' => 'return ShowTab(\'EditEvent\');')); } if ($event->hasPermission(Horde_Perms::DELETE)) { $tabs->addTab(_("De_lete"), $event->getDeleteUrl(array('confirm' => 1)), array('tabname' => 'DeleteEvent', 'id' => 'tabDeleteEvent', 'onclick' => 'return ShowTab(\'DeleteEvent\');')); } $tabs->addTab(_("Export"), $event->getExportUrl(), array('tabname' => 'ExportEvent', 'id' => 'tabExportEvent')); echo $tabs->render($tabname); }
* * @author Chuck Hagenbuch <*****@*****.**> */ require_once __DIR__ . '/../lib/Application.php'; Horde_Registry::appInit('whups', array('permission' => array('whups:admin', Horde_Perms::EDIT))); Whups::addTopbarSearch(); // Set up the page config vars. $showExtraForm = null; // Setup vars with all relevant info. $vars = Horde_Variables::getDefaultVariables(); if (!$vars->exists('action')) { $vars->set('action', 'queue'); } // Admin actions. $adminurl = Horde::selfUrl(false, false); $tabs = new Horde_Core_Ui_Tabs('action', $vars); $tabs->addTab(_("_Edit Queues"), $adminurl, 'queue'); $tabs->addTab(_("Edit _Types"), $adminurl, 'type'); $tabs->addTab(_("Queue/Type Matri_x"), $adminurl, 'mtmatrix'); $tabs->addTab(_("Sen_d Reminders"), $adminurl, 'reminders'); $renderer = new Horde_Form_Renderer(); // start the page function _open($isopened = false) { global $notification, $vars; static $opened; if ($isopened) { return $opened; } if (is_null($opened)) { global $registry, $prefs, $browser, $conf, $notification, $title, $tabs;
break; case 'load': $showExtraForm = 'Whups_Form_Query_ChooseNameForLoad'; $showEditQuery = false; break; } } if ($vars->get('criteria') != '' && in_array($vars->get('criteria'), array('props', 'user', 'group', 'date', 'text', 'attribs'))) { $session->set('whups', 'query_form', $vars->get('criteria')); } // Query actions. $queryTabs = $whups_query->getTabs($vars); // Criterion form types. $queryurl = Horde::url('query/index.php'); $vars->set('action', $session->get('whups', 'query_form')); $criteriaTabs = new Horde_Core_Ui_Tabs('criteria', $vars); $criteriaTabs->preserve('path', $vars->get('path')); $criteriaTabs->addTab(_("_Property Criteria"), $queryurl, 'props'); $criteriaTabs->addTab(_("_User Criteria"), $queryurl, 'user'); $criteriaTabs->addTab(_("_Group Criteria"), $queryurl, 'group'); $criteriaTabs->addTab(_("_Date Criteria"), $queryurl, 'date'); $criteriaTabs->addTab(_("_Text Criteria"), $queryurl, 'text'); $criteriaTabs->addTab(_("Attri_bute Criteria"), $queryurl, 'attribs'); $qops = array('' => _("Choose Action:"), 'deleteNode' => _("Delete"), 'edit' => _("Edit"), 'hoist' => _("Hoist Children"), 'and' => _("Insert And"), 'or' => _("Insert Or"), 'not' => _("Insert Not")); // Start the page. if ($whups_query->id) { $page_output->addLinkTag($whups_query->feedLink()); } Whups::addFeedLink(); $page_output->header(array('title' => _("Query Builder"))); $notification->notify(array('listeners' => 'status'));