-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmodule.datetimepicker-widget.php
80 lines (70 loc) · 1.63 KB
/
module.datetimepicker-widget.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<?php
//
// iTop module definition file
//
// Git commit info
if (file_exists(dirname(__FILE__).'/.git/HEAD'))
{
$sDate = date("d.m.y G:i", filemtime(dirname(__FILE__).'/.git/index'));
$sHead = trim(preg_replace('/ref:/', '', file_get_contents(dirname(__FILE__).'/.git/HEAD'), -1, $iCount));
if ($iCount === 1)
{
$sCommit = '(commit '.file_get_contents(dirname(__FILE__).'/.git/'.$sHead, false, null, 0, 7).' from '.$sDate.')';
}
elseif ($iCount === 0)
{
$sCommit = '(commit '.substr($sHead, 0, 7).' from '.$sDate.')';
}
else
{
$sCommit = '(commit info not found)';
}
}
else
{
$sCommit = '';
}
SetupWebPage::AddModule(
__FILE__, // Path to the current file, all other file names are relative to the directory containing this file
'datetimepicker-widget/',
array(
// Identification
//
'label' => "DateTimePicker Widget $sCommit",
'category' => 'business',
// Setup
//
'dependencies' => array(
),
'mandatory' => false,
'visible' => true,
// Components
//
'datamodel' => array(
'main.datetimepicker-widget.php'
),
'webservice' => array(
),
'data.struct' => array(
// add your 'structure' definition XML files here,
),
'data.sample' => array(
// add your sample data XML files here,
),
// Documentation
//
'doc.manual_setup' => '', // hyperlink to manual setup documentation, if any
'doc.more_information' => 'extensions/datetimepicker-widget/doc/readme.html', // hyperlink to more information, if any
// Default settings
//
'settings' => array(
'enabled' => true,
'default' => array(
'lang' => 'ru',
'dayOfWeekStart' => 1,
'step' => 30
)
),
)
);
?>