1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha › Serials › Number patterns</title>
3 [% INCLUDE 'doc-head-close.inc' %]
4 [% INCLUDE 'calendar.inc' %]
5 <script type="text/javascript">
7 [% IF (new or modify) %]
8 function testPattern() {
9 var frequencyid = $("#frequency").val();
10 var firstacquidate = $("#firstacquidate").val();
13 if(frequencyid == undefined || frequencyid == "") {
14 error_msg += _("- Frequency is not defined") + "\n";
17 if(firstacquidate == undefined || firstacquidate == "") {
18 error_msg += _("- First publication date is not defined") + "\n";
23 alert(_("Cannot test prediction pattern for the following reason(s):") + "\n\n"
29 'custompattern': true,
32 'firstacquidate', 'subtype', 'sublength', 'frequency', 'numberingmethod',
33 'lastvalue1', 'lastvalue2', 'lastvalue3', 'add1', 'add2', 'add3',
34 'every1', 'every2', 'every3', 'innerloop1', 'innerloop2', 'innerloop3',
35 'setto1', 'setto2', 'setto3', 'numbering1', 'numbering2', 'numbering3',
36 'whenmorethan1', 'whenmorethan2', 'whenmorethan3', 'locale'
38 for(i in ajaxParams) {
39 var param = ajaxParams[i];
40 var value = $("#"+param).val();
42 ajaxData[param] = value;
46 url: "/cgi-bin/koha/serials/showpredictionpattern.pl",
50 success: function(data) {
51 $("#predictionpattern").html(data);
57 function show_blocking_subs() {
58 $("#blocking_subs").show();
65 [% INCLUDE 'header.inc' %]
66 [% INCLUDE 'serials-search.inc' %]
68 <div id="breadcrumbs">
69 <a href="/cgi-bin/koha/mainpage.pl">Home</a> ›
70 <a href="/cgi-bin/koha/serials/serials-home.pl">Serials</a> ›
71 <a href="/cgi-bin/koha/serials/subscription-numberpatterns.pl">Numbering patterns</a>
74 <div id="doc3" class="yui-t2">
79 [% IF (new or modify) %]
82 <h1>New number pattern</h1>
83 [% IF (error_existing_numberpattern) %]
85 <p>A pattern with this name already exists.</p>
89 <h1>Modify pattern: [% label %]</h1>
90 [% IF (error_existing_numberpattern) %]
92 <p>Another pattern with this name already exists.</p>
98 <form action="/cgi-bin/koha/serials/subscription-numberpatterns.pl" method="post">
100 <input type="hidden" name="op" value="savenew" />
102 <input type="hidden" name="op" value="savemod" />
103 <input type="hidden" name="id" value="[% id %]" />
105 <fieldset class="rows">
108 <label for="label">Name:</label>
109 <input type="text" id="label" name="label" value="[% label %]" />
112 <label for="description">Description:</label>
113 <input type="text" id="description" name="description" value="[% description %]" />
116 <label for="numberingmethod">Numbering formula:</label>
117 <input type="text" id="numberingmethod" name="numberingmethod" value="[% numberingmethod %]" />
120 <label for="displayorder">Display order:</label>
121 <input type="text" id="displayorder" name="displayorder" value="[% displayorder %]" />
136 <td><input type="text" id="label1" name="label1" value="[% label1 %]" /></td>
137 <td><input type="text" id="label2" name="label2" value="[% label2 %]" /></td>
138 <td><input type="text" id="label3" name="label3" value="[% label3 %]" /></td>
142 <td><input type="text" id="add1" name="add1" value="[% add1 %]" /></td>
143 <td><input type="text" id="add2" name="add2" value="[% add2 %]" /></td>
144 <td><input type="text" id="add3" name="add3" value="[% add3 %]" /></td>
148 <td><input type="text" id="every1" name="every1" value="[% every1 %]" /></td>
149 <td><input type="text" id="every2" name="every2" value="[% every2 %]" /></td>
150 <td><input type="text" id="every3" name="every3" value="[% every3 %]" /></td>
154 <td><input type="text" id="setto1" name="setto1" value="[% setto1 %]" /></td>
155 <td><input type="text" id="setto2" name="setto2" value="[% setto2 %]" /></td>
156 <td><input type="text" id="setto3" name="setto3" value="[% setto3 %]" /></td>
159 <td>When more than</td>
160 <td><input type="text" id="whenmorethan1" name="whenmorethan1" value="[% whenmorethan1 %]" /></td>
161 <td><input type="text" id="whenmorethan2" name="whenmorethan2" value="[% whenmorethan2 %]" /></td>
162 <td><input type="text" id="whenmorethan3" name="whenmorethan3" value="[% whenmorethan3 %]" /></td>
165 [% BLOCK numbering_select %]
166 <select id="[% name %]" name="[% name %]" />
167 <option value=""></option>
168 [% IF (value == "dayname") %]
169 <option selected="selected" value="dayname">Name of day</option>
171 <option value="dayname">Name of day</option>
173 [% IF (value == "monthname") %]
174 <option selected="selected" value="monthname">Name of month</option>
176 <option value="monthname">Name of month</option>
178 [% IF (value == "season") %]
179 <option selected="selected" value="season">Name of season</option>
181 <option value="season">Name of season</option>
186 <td>[% PROCESS numbering_select name="numbering1" value=numbering1 %]</td>
187 <td>[% PROCESS numbering_select name="numbering2" value=numbering2 %]</td>
188 <td>[% PROCESS numbering_select name="numbering3" value=numbering3 %]</td>
193 <fieldset class="action">
194 <input type="submit" value="Save" />
195 <input type="reset" value="Reset" />
196 <input type="button" value="Cancel" onclick="window.location = '/cgi-bin/koha/serials/subscription-numberpatterns.pl';" />
202 <fieldset class="rows">
203 <legend>Test prediction pattern</legend>
206 <label for="frequency">Frequency:</label>
207 <select id="frequency">
208 [% FOREACH frequency IN frequencies_loop %]
209 <option value="[% frequency.id %]">[% frequency.description %]</option>
214 <label for="firstacquidate">First issue publication date</label>
215 <input type="text" id="firstacquidate" class="datepicker" size="10" />
218 <label for="sublength">Subscription length:</label>
219 <select id="subtype">
220 [% FOREACH subtype IN subtypes_loop %]
221 <option value="[% subtype.value %]">[% subtype.value %]</option>
224 <input type="text" id="sublength" size="3" />
227 <label for="locale">Locale:</label>
228 <select id="locale" name="locale">
229 <option value=""></option>
230 [% FOREACH locale IN locales %]
231 <option value="[% locale.language %]">[% locale.description %]</option>
234 <span class="hint">If empty, English is used</span>
249 <td><input type="text" id="lastvalue1" name="lastvalue1" value="[% lastvalue1 %]" /></td>
250 <td><input type="text" id="lastvalue2" name="lastvalue2" value="[% lastvalue2 %]" /></td>
251 <td><input type="text" id="lastvalue3" name="lastvalue3" value="[% lastvalue3 %]" /></td>
254 <td>Inner counter</td>
255 <td><input type="text" id="innerloop1" name="innerloop1" value="[% innerloop1 %]" /></td>
256 <td><input type="text" id="innerloop2" name="innerloop2" value="[% innerloop2 %]" /></td>
257 <td><input type="text" id="innerloop3" name="innerloop3" value="[% innerloop3 %]" /></td>
261 <fieldset class="action">
262 <input type="button" value="Test pattern" onclick="testPattern();" />
264 <div id="predictionpattern"></div>
269 <h1>Number patterns</h1>
273 This pattern is still used by [% subscriptions.size %]
274 subscription(s). Do you still want to delete it?
276 <p><a href="#" onclick="show_blocking_subs(); return false;">Show subscriptions</a></p>
277 <ul id="blocking_subs" style="display:none">
278 [% FOREACH sub IN subscriptions %]
279 <li style="list-style-type:none">
280 <a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% sub.subscriptionid %]">[% sub.title %]</a>
285 <form action="" method="get">
286 <input type="hidden" name="op" value="del" />
287 <input type="hidden" name="confirm" value="1" />
288 <input type="hidden" name="id" value="[% id %]" />
289 <input type="submit" class="approve" value="Yes, delete" />
291 <form action="" method="get">
292 <input type="submit" class="deny" value="No, don't delete" />
296 <a href="/cgi-bin/koha/serials/subscription-numberpatterns.pl?op=new">New numbering pattern</a>
297 [% IF (numberpatterns_loop.size) %]
298 <table id="numberpatternst">
303 <th>Numbering formula</th>
304 <th>Display order</th>
309 [% FOREACH numberpattern IN numberpatterns_loop %]
311 <td>[% numberpattern.label %]</td>
312 <td>[% numberpattern.description %]</td>
313 <td>[% numberpattern.numberingmethod %]</td>
314 <td>[% numberpattern.displayorder %]</td>
316 <a href="/cgi-bin/koha/serials/subscription-numberpatterns.pl?op=modify&id=[% numberpattern.id %]">Edit</a> |
317 <a href="/cgi-bin/koha/serials/subscription-numberpatterns.pl?op=del&id=[% numberpattern.id %]">Delete</a>
324 <p>There is no existing patterns.</p>
330 [% INCLUDE 'serials-menu.inc' %]
333 [% INCLUDE 'intranet-bottom.inc' %]