forked from horde/kronolith
-
Notifications
You must be signed in to change notification settings - Fork 0
/
smartmobile.php
44 lines (38 loc) · 1.35 KB
/
smartmobile.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php
/**
* Kronolith smartmobile view.
*
* Copyright 2010-2017 Horde LLC (http://www.horde.org/)
*
* See the enclosed file LICENSE for license information (LGPL). If you
* did not receive this file, see http://www.horde.org/licenses/lgpl21.
*
* @author Michael J. Rubinsky <mrubinsk@horde.org>
* @category Horde
* @license http://www.horde.org/licenses/gpl GPL
* @package Kronolith
*/
require_once __DIR__ . '/lib/Application.php';
Horde_Registry::appInit('kronolith');
$title = _("My Calendar");
$view = new Horde_View(array('templatePath' => KRONOLITH_TEMPLATES . '/smartmobile'));
$view->addHelper('Horde_Core_Smartmobile_View_Helper');
$view->today = new Horde_Date($_SERVER['REQUEST_TIME']);
$view->registry = $registry;
$datejs = str_replace('_', '-', $GLOBALS['language']) . '.js';
if (!file_exists($GLOBALS['registry']->get('jsfs', 'horde') . '/date/' . $datejs)) {
$datejs = 'en-US.js';
}
$page_output->addScriptFile('date/' . $datejs, 'horde');
$page_output->addScriptFile('date/date.js', 'horde');
$page_output->addScriptFile('smartmobile.js');
require KRONOLITH_TEMPLATES . '/smartmobile/javascript_defs.php';
$page_output->header(array(
'title' => $title,
'view' => $registry::VIEW_SMARTMOBILE
));
echo $view->render('day');
echo $view->render('event');
echo $view->render('month');
echo $view->render('summary');
$page_output->footer();