本文整理汇总了PHP中Kronolith::showAjaxView方法的典型用法代码示例。如果您正苦于以下问题:PHP Kronolith::showAjaxView方法的具体用法?PHP Kronolith::showAjaxView怎么用?PHP Kronolith::showAjaxView使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Kronolith
的用法示例。
在下文中一共展示了Kronolith::showAjaxView方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
<?php
/**
* Copyright 2001-2015 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 Jan Schneider <jan@horde.org>
* @package Kronolith
*/
require_once __DIR__ . '/lib/Application.php';
$app_ob = Horde_Registry::appInit('kronolith');
if (Kronolith::showAjaxView() && !Horde_Util::getPost('import_ajax') || !$conf['menu']['import_export']) {
Horde::url('', true)->redirect();
}
/* Importable file types. */
$file_types = array('csv' => _("Comma separated values"), 'icalendar' => _("vCalendar/iCalendar"));
/* Templates for the different import steps. */
$templates = array(Horde_Data::IMPORT_CSV => array($registry->get('templates', 'horde') . '/data/csvinfo.inc'), Horde_Data::IMPORT_MAPPED => array($registry->get('templates', 'horde') . '/data/csvmap.inc'), Horde_Data::IMPORT_DATETIME => array($registry->get('templates', 'horde') . '/data/datemap.inc'));
$perms = $GLOBALS['injector']->getInstance('Horde_Core_Perms');
if ($perms->hasAppPermission('max_events') !== true && $perms->hasAppPermission('max_events') <= Kronolith::countEvents()) {
Horde::permissionDeniedError('kronolith', 'max_events', sprintf(_("You are not allowed to create more than %d events."), $perms->hasAppPermission('max_events')));
$templates[Horde_Data::IMPORT_FILE] = array(KRONOLITH_TEMPLATES . '/data/export.inc');
} else {
$templates[Horde_Data::IMPORT_FILE] = array(KRONOLITH_TEMPLATES . '/data/import.inc', KRONOLITH_TEMPLATES . '/data/export.inc');
}
/* Initial values. */
$import_step = Horde_Util::getFormData('import_step', 0) + 1;
$actionID = Horde_Util::getFormData('actionID');
$next_step = Horde_Data::IMPORT_FILE;
示例2:
<?php
/**
* Copyright 1999-2015 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 Chuck Hagenbuch <chuck@horde.org>
* @package Kronolith
*/
require_once __DIR__ . '/lib/Application.php';
Horde_Registry::appInit('kronolith');
if (Kronolith::showAjaxView()) {
Horde::url('', true)->setAnchor('day:' . Kronolith::currentDate()->dateString())->redirect();
}
$view = Kronolith::getView('Day');
$page_output->addScriptFile('tooltips.js', 'horde');
Kronolith::addCalendarLinks();
$page_output->header(array('body_class' => $prefs->getValue('show_panel') ? 'rightPanel' : null, 'title' => $view->getTime($prefs->getValue('date_format'))));
require KRONOLITH_TEMPLATES . '/javascript_defs.php';
$notification->notify(array('listeners' => 'status'));
Kronolith::tabs($view);
$view->html(KRONOLITH_TEMPLATES);
require KRONOLITH_TEMPLATES . '/calendar_titles.inc';
$page_output->footer();
示例3: topbarCreate
/**
*/
public function topbarCreate(Horde_Tree_Renderer_Base $tree, $parent = null, array $params = array())
{
switch ($params['id']) {
case 'menu':
$menus = array(array('new', _("New Event"), 'new.png', Horde::url('new.php')), array('day', _("Day"), 'dayview.png', Horde::url('day.php')), array('work', _("Work Week"), 'workweekview.png', Horde::url('workweek.php')), array('week', _("Week"), 'weekview.png', Horde::url('week.php')), array('month', _("Month"), 'monthview.png', Horde::url('month.php')), array('year', _("Year"), 'yearview.png', Horde::url('year.php')));
if (Kronolith::showAjaxView()) {
if (Kronolith::hasApiPermission('tasks')) {
$menus[] = array('tasks', _("Tasks"), 'tasks.png', $GLOBALS['registry']->get('webroot') . '#tasks');
}
$menus[] = array('agenda', _("Agenda"), 'agenda.png', $GLOBALS['registry']->get('webroot') . '#agenda');
}
// Dynamic view has no dedicated search page.
if (!Kronolith::showAjaxView()) {
$menus[] = array('search', _("Search"), 'search.png', Horde::url('search.php'));
}
foreach ($menus as $menu) {
$tree->addNode(array('id' => $parent . $menu[0], 'parent' => $parent, 'label' => $menu[1], 'expanded' => false, 'params' => array('icon' => Horde_Themes::img($menu[2]), 'url' => $menu[3])));
}
break;
}
}