1 <?xml version="1.0" encoding="UTF-8"?>
4 <!-- String selection from user input -->
5 <widget-family name="string-input" datatype="text">
6 <label>String matching from user input</label>
9 <label>Exactly match a user supplied string</label>
11 This widget filters a column based on an exact string
16 <widget name="multistring">
17 <label>Exactly match one of several user supplied strings</label>
19 This widget filters a column based on an set of strings.
23 <widget name="initial-substring">
24 <label>Match the begining of a string from user input</label>
26 This widget filters a column based on an initial substring
33 <!-- String selection from in-database data -->
34 <widget-family name="string-choose" datatype="text">
35 <label>String filter from known data</label>
37 <widget name="dropdown">
38 <label>Exactly match a string chosen from a dropdown</label>
40 This widget filters a column based on an exact string match.
44 <widget name="multiselect">
45 <label>Match multiple strings chosen from a multiselect box</label>
47 This widget filters a column based on multiple strings.
53 <!-- Specific time range selection family -->
54 <widget-family name="specific-timerange" datatype="timestamptz">
55 <label>Specific time-range widgets</label>
58 <label>User defined time range</label>
60 This widget allows the user to pick an arbitrary time range
66 <label>Choose a specific date</label>
68 This widget allows the user to pick a specific date on which
71 <filter-code type="perl">
72 $full_col = "DATE_TRUNC($full_col, 'day')";
73 $where_clause = "$full_col = CAST(? AS DATE)"
74 push @$bind_list, sprintf('%d/%02d/%02d', @$val{qw/year month day/});
79 <label>Choose a specific week of the year</label>
81 This widget allows the user to pick a specific week of the year
84 <filter-code type="perl">
85 $full_col = "EXTRACT('week' FROM $full_col)";
86 $where_clause = "$full_col = ?"
87 push @$bind_list, $val;
91 <widget name="multiweek">
92 <label>Choose a range of weeks of the year</label>
94 This widget allows the user to pick a range of weeks of the year
97 <filter-code type="perl">
99 "EXTRACT('year' FROM $full_col) = ? ".
100 "AND EXTRACT('week' FROM $full_col) ".
102 push @$bind_list, $$val{year}, $$val{start}, $$val{end};
106 <widget name="month">
107 <label>Choose a specific year and month</label>
109 This widget allows the user to pick a specific year and month
112 <filter-code type="perl">
113 $full_col = "EXTRACT('week' FROM $full_col)";
114 $where_clause = "$full_col = ?"
115 push @$bind_list, $val;
119 <widget name="multimonth">
120 <label>Choose a range of months</label>
122 This widget allows the user to pick a range of month on which to
125 <filter-code type="perl">
127 "DATE_TRUNC($full_col, 'month') ".
128 "BETWEEN CAST(? AS DATE) AND CAST(? AS DATE)";
130 sprintf('%d/%02d/01', @$val{qw/start-year start-month/}),
131 sprintf('%d/%02d/01', @$val{qw/end-year end-month/});
135 <widget name="quarter">
136 <label>Choose a specific year and quarter</label>
138 This widget allows the user to pick a specific year and
139 quarter on which to report.
143 <widget name="multiquarter">
144 <label>Choose a range of quarters</label>
146 This widget allows the user to pick a range of quarter on which
152 <label>Choose a specific year</label>
154 This widget allows the user to pick a specific year on which to
157 <filter-code type="perl">
158 $where_clause = "EXTRACT('year' FROM $full_col) = ?";
159 push @$bind_list, $val;
163 <widget name="multiyear">
164 <label>Choose a range of years</label>
166 This widget allows the user to pick a range of years on which to
169 <filter-code type="perl">
170 $where_clause = "EXTRACT('year' FROM $full_col) BETWEEN ? AND ?";
171 push @$bind_list, $$val{year}, $$val{year} + $$val{year-count};
176 <!-- Specific time range selection family -->
177 <widget-family name="relative-timerange" datatype="timestamptz">
178 <label>Relative time-range widgets</label>
181 <label>Choose a date relative to the report runtime</label>
183 This widget allows the user to pick a date relative to the
184 report runtime on which to report.
189 <label>Choose a week (sun-sat) relative to the report runtime</label>
191 This widget allows the user to pick a week (sun-sat) relative
192 to the report runtime on which to report.
196 <widget name="month">
197 <label>Choose a month relative to the report runtime</label>
199 This widget allows the user to pick a month relative to the
200 report runtime on which to report.
204 <widget name="quarter">
205 <label>Choose a quarter relative to the report runtime</label>
207 This widget allows the user to pick a quarter relative to the
208 report runtime on which to report.
213 <label>Choose a year relative to the report runtime</label>
215 This widget allows the user to pick a year relative to the
216 report runtime on which to report.
221 <!-- Library selection from in-database data - special to OpenILS -->
222 <widget-family name="lib-choose" datatype="text">
223 <label>String filter from known data</label>
225 <widget name="dropdown">
226 <label>Exactly match a Library chosen from a dropdown</label>
228 This widget filters on an exact Library Name match.
232 <widget name="multiselect">
233 <label>Match multiple Libraries chosen from a multiselect box</label>
235 This widget filters based on multiple Library names.