View | Details | Raw Unified | Return to bug 13357
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt (-24 / +46 lines)
Lines 1-9 Link Here
1
[% USE CGI %]
1
[% USE CGI %]
2
[% USE JSON.Escape %]
2
[% USE JSON.Escape %]
3
3
4
[% BLOCK form_label %]
5
  [% SWITCH label %]
6
    [% CASE 'barcode' %]<span>Barcode</span>
7
    [% CASE 'itemcallnumber' %]<span>Call number</span>
8
    [% CASE 'stocknumber' %]<span>Stock number</span>
9
    [% CASE 'title' %]<span>Title</span>
10
    [% CASE 'author' %]<span>Author</span>
11
    [% CASE 'publishercode' %]<span>Publisher</span>
12
    [% CASE 'publicationdate' %]<span>Publication date</span>
13
    [% CASE 'collectiontitle' %]<span>Collection</span>
14
    [% CASE 'isbn' %]<span>ISBN</span>
15
    [% CASE 'issn' %]<span>ISSN</span>
16
    [% CASE 'homebranch' %]<span>Home library</span>
17
    [% CASE 'All libraries' %]<span>All libraries</span>
18
    [% CASE 'location' %]<span>Shelving location</span>
19
    [% CASE 'All locations' %]<span>All locations</span>
20
    [% CASE 'itype' %]<span>Item type</span>
21
    [% CASE 'All item types' %]<span>All item types</span>
22
    [% CASE 'ccode' %]<span>Collection code</span>
23
    [% CASE 'All collection codes' %]<span>All collection codes</span>
24
    [% CASE 'notforloan' %]<span>Status</span>
25
    [% CASE 'All statuses' %]<span>All statuses</span>
26
    [% CASE 'damaged' %]<span>Damaged</span>
27
    [% CASE 'itemlost' %]<span>Lost</span>
28
  [% END %]
29
[% END %]
30
4
[% BLOCK form_field_select %]
31
[% BLOCK form_field_select %]
5
  <div class="form-field form-field-select">
32
  <div class="form-field form-field-select">
6
    <label class="form-field-label" for="[% name %]">[% label %]</label>
33
    <label class="form-field-label" for="[% name %]">[% INCLUDE form_label label=name %]</label>
7
    <select id="[% name %]_op" name="[% name %]_op">
34
    <select id="[% name %]_op" name="[% name %]_op">
8
      <option value="=">is</option>
35
      <option value="=">is</option>
9
      [% IF CGI.param(name _ '_op') == '!=' %]
36
      [% IF CGI.param(name _ '_op') == '!=' %]
Lines 19-25 Link Here
19
      [% ELSE %]
46
      [% ELSE %]
20
        <option value="">
47
        <option value="">
21
      [% END %]
48
      [% END %]
22
        [% empty_option || "All" %]
49
        [% IF (empty_option) %][% INCLUDE form_label label=empty_option %][% ELSE %]<span>All</span>[% END %]
23
      </option>
50
      </option>
24
      [% FOREACH option IN options %]
51
      [% FOREACH option IN options %]
25
        [% IF values != '' && values.grep(option.value).size %]
52
        [% IF values != '' && values.grep(option.value).size %]
Lines 34-42 Link Here
34
61
35
[% BLOCK form_field_select_option %]
62
[% BLOCK form_field_select_option %]
36
  [% IF params.f == value %]
63
  [% IF params.f == value %]
37
    <option value="[% value %]" selected="selected">[% label %]</option>
64
    <option value="[% value %]" selected="selected">[% INCLUDE form_label label=value %]</option>
38
  [% ELSE %]
65
  [% ELSE %]
39
    <option value="[% value %]">[% label %]</option>
66
    <option value="[% value %]">[% INCLUDE form_label label=value %]</option>
40
  [% END %]
67
  [% END %]
41
[% END %]
68
[% END %]
42
69
Lines 58-73 Link Here
58
      </select>
85
      </select>
59
    [% END %]
86
    [% END %]
60
    <select name="f" class="form-field-column">
87
    <select name="f" class="form-field-column">
61
      [% INCLUDE form_field_select_option value='barcode' label='Barcode' %]
88
      [% INCLUDE form_field_select_option value='barcode' %]
62
      [% INCLUDE form_field_select_option value='itemcallnumber' label='Call number' %]
89
      [% INCLUDE form_field_select_option value='itemcallnumber' %]
63
      [% INCLUDE form_field_select_option value='stocknumber' label='Stock number' %]
90
      [% INCLUDE form_field_select_option value='stocknumber' %]
64
      [% INCLUDE form_field_select_option value='title' label='Title' %]
91
      [% INCLUDE form_field_select_option value='title' %]
65
      [% INCLUDE form_field_select_option value='author' label='Author' %]
92
      [% INCLUDE form_field_select_option value='author' %]
66
      [% INCLUDE form_field_select_option value='publishercode' label='Publisher' %]
93
      [% INCLUDE form_field_select_option value='publishercode' %]
67
      [% INCLUDE form_field_select_option value='publicationdate' label='Publication date' %]
94
      [% INCLUDE form_field_select_option value='publicationdate' %]
68
      [% INCLUDE form_field_select_option value='collectiontitle' label='Collection' %]
95
      [% INCLUDE form_field_select_option value='collectiontitle' %]
69
      [% INCLUDE form_field_select_option value='isbn' label='ISBN' %]
96
      [% INCLUDE form_field_select_option value='isbn' %]
70
      [% INCLUDE form_field_select_option value='issn' label='ISSN' %]
97
      [% INCLUDE form_field_select_option value='issn' %]
71
      [% IF items_search_fields.size %]
98
      [% IF items_search_fields.size %]
72
        <optgroup label="Custom search fields">
99
        <optgroup label="Custom search fields">
73
          [% FOREACH field IN items_search_fields %]
100
          [% FOREACH field IN items_search_fields %]
Lines 117-123 Link Here
117
144
118
[% BLOCK form_field_radio_yes_no %]
145
[% BLOCK form_field_radio_yes_no %]
119
  <div class="form-field">
146
  <div class="form-field">
120
    <label class="form-field-label">[% label %]:</label>
147
    <label class="form-field-label">[% INCLUDE form_label label=name %]:</label>
121
    <input type="radio" name="[% name %]" id="[% name %]_indifferent" value="" checked="checked"/>
148
    <input type="radio" name="[% name %]" id="[% name %]_indifferent" value="" checked="checked"/>
122
    <label for="[% name %]_indifferent">Ignore</label>
149
    <label for="[% name %]_indifferent">Ignore</label>
123
    <input type="radio" name="[% name %]" id="[% name %]_yes" value="yes" />
150
    <input type="radio" name="[% name %]" id="[% name %]_yes" value="yes" />
Lines 265-271 Link Here
265
    $(document).ready(function () {
292
    $(document).ready(function () {
266
      // Add the "New field" link.
293
      // Add the "New field" link.
267
      var form_field = $('div.form-field-select-text').last()
294
      var form_field = $('div.form-field-select-text').last()
268
      var button_field_new = $('<a href="#" class="button-field-new" title="Add a new field">New field</a>');
295
      var NEW_FIELD = _("New field");
296
      var button_field_new = $('<a href="#" class="button-field-new" title="Add a new field">' + NEW_FIELD + '</a>');
269
      button_field_new.click(function() {
297
      button_field_new.click(function() {
270
        addNewField();
298
        addNewField();
271
        return false;
299
        return false;
Lines 325-337 Link Here
325
          <fieldset>
353
          <fieldset>
326
            [% INCLUDE form_field_select
354
            [% INCLUDE form_field_select
327
              name="homebranch"
355
              name="homebranch"
328
              label="Home library"
329
              options = branches
356
              options = branches
330
              empty_option = "All libraries"
357
              empty_option = "All libraries"
331
            %]
358
            %]
332
            [% INCLUDE form_field_select
359
            [% INCLUDE form_field_select
333
              name="location"
360
              name="location"
334
              label="Shelving location"
335
              options = locations
361
              options = locations
336
              empty_option = "All locations"
362
              empty_option = "All locations"
337
            %]
363
            %]
Lines 339-357 Link Here
339
          <fieldset>
365
          <fieldset>
340
            [% INCLUDE form_field_select
366
            [% INCLUDE form_field_select
341
              name="itype"
367
              name="itype"
342
              label="Item type"
343
              options = itemtypes
368
              options = itemtypes
344
              empty_option = "All item types"
369
              empty_option = "All item types"
345
            %]
370
            %]
346
            [% INCLUDE form_field_select
371
            [% INCLUDE form_field_select
347
              name="ccode"
372
              name="ccode"
348
              label="Collection code"
349
              options = ccodes
373
              options = ccodes
350
              empty_option = "All collection codes"
374
              empty_option = "All collection codes"
351
            %]
375
            %]
352
            [% INCLUDE form_field_select
376
            [% INCLUDE form_field_select
353
              name="notforloan"
377
              name="notforloan"
354
              label="Status"
355
              options = notforloans
378
              options = notforloans
356
              empty_option = "All statuses"
379
              empty_option = "All statuses"
357
            %]
380
            %]
Lines 375-382 Link Here
375
              <input type="text" id="itemcallnumber_to" name="itemcallnumber_to" value="[% value %]" />
398
              <input type="text" id="itemcallnumber_to" name="itemcallnumber_to" value="[% value %]" />
376
              <span class="hint">(inclusive)</span>
399
              <span class="hint">(inclusive)</span>
377
            </div>
400
            </div>
378
            [% INCLUDE form_field_radio_yes_no name="damaged" label="Damaged" %]
401
            [% INCLUDE form_field_radio_yes_no name="damaged" %]
379
            [% INCLUDE form_field_radio_yes_no name="itemlost" label="Lost" %]
402
            [% INCLUDE form_field_radio_yes_no name="itemlost" %]
380
            <div class="form-field">
403
            <div class="form-field">
381
              <label class="form-field-label" for="issues_op">Checkout count:</label>
404
              <label class="form-field-label" for="issues_op">Checkout count:</label>
382
              <select id="issues_op" name="issues_op">
405
              <select id="issues_op" name="issues_op">
383
- 

Return to bug 13357