]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/src/reporter/templates/widgets/specific-timerange.multimonth
big ol reporter cleanup for the meeting
[Evergreen.git] / Open-ILS / src / reporter / templates / widgets / specific-timerange.multimonth
1 [%
2
3 USE date;
4 USE start = DateTime(now = 1);
5 USE end = DateTime(now = 1);
6
7 PROCESS inputs;
8
9 BLOCK editor;
10
11 WRAPPER html/table ;
12         WRAPPER html/row;
13                 INCLUDE html/cell colspan=2 align='center' content='Start time';
14         END;
15
16         WRAPPER html/row;
17                 INCLUDE html/cell content='Year';
18                 INCLUDE html/cell content='Month';
19         END;
20
21         syl = 'start-year';
22         sml = 'start-month';
23         eyl = 'end-year';
24         eml = 'end-month';
25
26         sy = (current_value.$syl ? current_value.$syl : start.year);
27         sm = (current_value.$sml ? current_value.$sml : start.month);
28         ey = (current_value.$eyl ? current_value.$eyl : end.year);
29         em = (current_value.$eml ? current_value.$eml : end.month);
30
31         WRAPPER html/row;
32                 WRAPPER html/cell;
33                         INCLUDE text name=input_prefix _ ':start-year' size=4 value=sy;
34                 END;
35                 WRAPPER html/cell;
36                         INCLUDE text name=input_prefix _ ':start-month' size=4 value=sm;
37                 END;
38         END;
39
40         WRAPPER html/row;
41                 INCLUDE html/cell colspan=2 align='center' content='End time';
42         END;
43
44         WRAPPER html/row;
45                 INCLUDE html/cell content='Year';
46                 INCLUDE html/cell content='Month';
47         END;
48
49         WRAPPER html/row;
50                 WRAPPER html/cell;
51                         INCLUDE text name=input_prefix _ ':end-year' size=4 value=ey;
52                 END;
53                 WRAPPER html/cell;
54                         INCLUDE text name=input_prefix _ ':end-month' size=4 value=em;
55                 END;
56         END;
57 END;
58 END;
59
60 BLOCK display;
61         syl = 'start-year';
62         sml = 'start-month';
63         eyl = 'end-year';
64         eml = 'end-month';
65
66         sy = (current_value.$syl ? current_value.$syl : start.year);
67         sm = (current_value.$sml ? current_value.$sml : start.month);
68         ey = (current_value.$eyl ? current_value.$eyl : end.year);
69         em = (current_value.$eml ? current_value.$eml : end.month);
70
71         sy _ '-' _ sm _ ' through ' _ ey _ '-' _ em;
72
73 END;
74
75 %]