1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha › Reports › Guided reports › Dictionary</title>
3 [% INCLUDE 'doc-head-close.inc' %]
4 [% INCLUDE 'calendar.inc' %]
5 <style type="text/css">fieldset.rows table { clear: none; margin: 0;}</style>
6 <script type="text/javascript">
7 var MSG_CONFIRM_DELETE = _("Are you sure you want to delete this dictionary definition? This cannot be undone.");
9 $(document).ready(function() {
10 $("#delete").on("click",function(){
11 return confirmDelete(MSG_CONFIRM_DELETE);
14 $("#date_range").change(function(){
15 $("input#from").parents('li').show();
17 $("#all_dates").change(function(){
18 $("input#from").parents('li').hide();
20 $("#all_dates").click().change();
24 <body id="rep_dictionary" class="rep">
25 [% INCLUDE 'header.inc' %]
26 [% INCLUDE 'circ-search.inc' %]
28 [%- BLOCK area_name -%]
30 [%- CASE 'CIRC' -%]Circulation
31 [%- CASE 'CAT' -%]Catalog
32 [%- CASE 'PAT' -%]Patrons
33 [%- CASE 'ACQ' -%]Acquisitions
34 [%- CASE 'ACC' -%]Accounts
38 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/reports/reports-home.pl">Reports</a> › <a href="/cgi-bin/koha/reports/guided_reports.pl">Guided reports wizard</a>
39 [% IF ( new_dictionary ) %] › <a href="/cgi-bin/koha/reports/dictionary.pl">Dictionary</a> › <strong>Name the new definition</strong>
40 [% ELSIF ( step_2 ) %] › <a href="/cgi-bin/koha/reports/dictionary.pl">Dictionary</a> › <strong>Step 2: Choose the area </strong>
41 [% ELSIF ( step_3 ) %] › <a href="/cgi-bin/koha/reports/dictionary.pl">Dictionary</a> › <strong>Step 3: Choose a column </strong>
42 [% ELSIF ( step_4 ) %] › <a href="/cgi-bin/koha/reports/dictionary.pl">Dictionary</a> › <strong>Step 4: Specify a value </strong>
43 [% ELSIF ( step_5 ) %] › <a href="/cgi-bin/koha/reports/dictionary.pl">Dictionary</a> › <strong>Step 5: Confirm definition</strong>
44 [% ELSE %] › <strong> Dictionary </strong>[% END %]</div>
46 <div id="doc3" class="yui-t2">
51 [% IF ( start_dictionary ) %]
54 <li><a id="newdictionary" class="btn btn-default btn-sm" href="/cgi-bin/koha/reports/dictionary.pl?phase=Add%20New%20Definition"><i class="fa fa-plus"></i> New definition</a></li>
59 [% IF ( start_dictionary ) %]
60 <p>Use the dictionary to define custom criteria for reporting.</p>
62 [% IF ( definitions ) %]
63 <h2>Current terms</h2>
64 <form action="/cgi-bin/koha/reports/dictionary.pl" method="post">
65 <input type="hidden" name="phase" value="View Dictionary" />
69 <option value="">All</option>
70 [% FOREACH area IN areas %]
71 [%- IF ( area.selected ) -%]
72 <option value="[% area.id %]" selected="selected">[%- PROCESS area_name area=area.id -%]</option>
74 <option value="[% area.id %]">[%- PROCESS area_name area=area.id -%]</option>
78 <input name="submit" value="Go" type="submit" />
90 [% FOREACH definition IN definitions %]
92 <td>[% definition.name | html %]</td>
93 <td>[% definition.description | html %]</td>
94 <td>[% definition.areaname %]</td>
95 <td>[% definition.saved_sql %]</td>
96 <td class="actions"><form method="post" action="/cgi-bin/koha/reports/dictionary.pl">
97 <input type="hidden" name="id" value="[% definition.id %]" />
98 <input type="hidden" name="phase" value="Delete Definition" />
99 <button type="submit" name="submit" class="btn btn-default btn-xs" id="delete"><i class="fa fa-trash"></i> Delete</button>
105 <div class="dialog message">There are no saved definitions. <a id="newdictionary" href="/cgi-bin/koha/reports/dictionary.pl?phase=Add%20New%20Definition">Add a definition to the dictionary.</a></div>
109 [% IF ( new_dictionary ) %]
110 <h3>Add new definition</h3>
111 <form action="/cgi-bin/koha/reports/dictionary.pl" method="post">
112 <fieldset class="rows"><legend>Step 1 of 5: Name the new definition</legend><ol>
114 <label for="definition_name">Definition name:</label>
115 <input type="text" id="definition_name" name="definition_name" />
118 <label for="definition_description">Definition description:</label>
119 <textarea name="definition_description" id="definition_description" rows="3" cols="20"></textarea>
123 <fieldset class="action"><input type="hidden" name="phase" value="New Term step 2" />
124 <input name="submit" value="Next" type="submit" /></fieldset>
128 [%- IF ( step_2 ) -%]
129 <h3>Add new definition</h3>
130 <form action="/cgi-bin/koha/reports/dictionary.pl" method="post">
131 <fieldset class="rows">
132 <legend>Step 2 of 5: Choose the area</legend>
135 <input type="hidden" name="phase" value="New Term step 3" />
136 <input type="hidden" name="definition_name" value="[% definition_name | html %]" />
137 <input type="hidden" name="definition_description" value="[% definition_description | html %]" />
138 <label for="area">Select table:</label><select name="area" id="area">
139 [%- FOREACH area IN areas -%]
140 <option value="[%- area.id -%]">[%- PROCESS area_name area=area.id -%]</option>
146 <fieldset class="action"><input name="submit" value="Next" type="submit" /></fieldset>
151 <h3>Add new definition</h3>
152 <form action="/cgi-bin/koha/reports/dictionary.pl" method="post">
153 <fieldset class="rows">
154 <legend>Step 3 of 5: Choose a column</legend>
155 <input type="hidden" name="area" value="[% area %]" />
156 <input type="hidden" name="definition_name" value="[% definition_name | html %]" />
157 <input type="hidden" name="definition_description" value="[% definition_description | html %]" />
159 <select id="availableColumns" name="columns" size="25" style="width:200px;height:300px;margin:1em;">
160 [% FOREACH column IN columns %]
161 [% IF ( column.table ) %]
162 [% IF ( loop.first ) %]
167 <optgroup label="[% column.table %]">
169 <option value="[% column.name %]">
170 [% IF ( column.description ) %][% column.description %]
180 <input type="hidden" name="phase" value="New Term step 4" />
182 <fieldset class="action"><input type="submit" name="submit" value="Next" /></fieldset>
187 <h3>Add new definition</h3>
188 <form action="/cgi-bin/koha/reports/dictionary.pl" method="post">
189 <fieldset class="rows">
190 <legend>Step 4 of 5: Specify a value</legend>
191 <input type="hidden" name="area" value="[% area %]" />
192 <input type="hidden" name="definition_name" value="[% definition_name | html %]" />
193 <input type="hidden" name="definition_description" value="[% definition_description | html %]" />
194 <input type="hidden" name="columnstring" value="[% columnstring %]" />
196 [% FOREACH column IN columns %]
197 <input type="hidden" name="criteria_column" value="[% column.name %]" />
198 <ol><li><span class="label">Column: </span> [% column.name %]</li>
199 [% IF ( column.distinct ) %]
200 <li><label for="[% column.name %]_value">Choose: </label> <select id="[% column.name %]_value" name="[% column.name %]_value">
201 [% FOREACH value IN column.values %]
202 <option value="[% value.availablevalues %]">[% value.availablevalues %]</option>
206 [% IF ( column.date ) %]
208 <label for="all_dates">All dates</label>
209 <input type="radio" id="all_dates" name="[% column.name %]_date_type_value" value="all" checked="checked" />
210 <label for="date_range">Date range</label>
211 <input type="radio" id="date_range" name="[% column.name %]_date_type_value" value="range" />
215 <input type="text" size="10" id="from" name="[% column.name %]_start_value" value="" class="datepickerfrom" />
216 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
218 <input type="text" size="10" id="to" name="[% column.name %]_end_value" value="" class="datepickerto" />
219 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
222 [% IF ( column.text ) %]
223 <li><label for="[% column.name %]_value">Search string matches: </label> <input type="text" size="13" name="[% column.name %]_value" /></li>
228 <input type="hidden" name="phase" value="New Term step 5" />
230 <fieldset class="action">
231 <input type="submit" name="submit" value="Next" />
237 <form action="/cgi-bin/koha/reports/dictionary.pl" method="post">
238 <input type="hidden" name="area" value="[% area %]" />
239 <input type="hidden" name="definition_name" value="[% definition_name | html %]" />
240 <input type="hidden" name="definition_description" value="[% definition_description | html %]" />
241 <input type="hidden" name="columnstring" value="[% columnstring %]" />
243 <h3>Add new definition</h3>
245 <fieldset class="rows">
246 <legend>Step 5 of 5: Confirm details</legend>
249 <span class="label">Name:</span>[%- definition_name | html -%]
252 <span class="label">Description:</span>[%- definition_description | html -%]
255 <span class="label">Area:</span>[%- PROCESS area_name area=area -%]
258 <span class="label">Data:</span>
264 [%- FOREACH criteria_loo IN criteria_loop -%]
266 <td>[%- criteria_loo.name -%]</td>
267 <td>[%- criteria_loo.value -%]</td>
275 <fieldset class="action"><input type="hidden" name="sql" value="[% query %]" />
276 <input type="hidden" name="phase" value="New Term step 6" />
277 <input type="submit" name="submit" value="Save" /> </fieldset>
284 [% INCLUDE 'guided-reports-view.inc' %]
287 [% INCLUDE 'intranet-bottom.inc' %]