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

(-)a/catalogue/itemsearch.pl (-2 / +2 lines)
Lines 63-69 if (defined $format and $format eq 'json') { Link Here
63
                push @f, $columns[$i];
63
                push @f, $columns[$i];
64
                push @c, 'and';
64
                push @c, 'and';
65
65
66
                if ( grep { $_ eq $columns[$i] } qw( ccode homebranch holdingbranch location itype notforloan itemlost ) ) {
66
                if ( grep { $_ eq $columns[$i] } qw( ccode homebranch holdingbranch location itype notforloan itemlost onloan ) ) {
67
                    push @q, "$word";
67
                    push @q, "$word";
68
                    push @op, '=';
68
                    push @op, '=';
69
                } else {
69
                } else {
Lines 114-120 if (scalar keys %params > 0) { Link Here
114
        filters => [],
114
        filters => [],
115
    };
115
    };
116
116
117
    foreach my $p (qw(homebranch holdingbranch location itype ccode issues datelastborrowed notforloan itemlost withdrawn)) {
117
    foreach my $p (qw(homebranch holdingbranch location itype ccode issues datelastborrowed notforloan itemlost withdrawn onloan)) {
118
        if (my @q = $cgi->multi_param($p)) {
118
        if (my @q = $cgi->multi_param($p)) {
119
            if ($q[0] ne '') {
119
            if ($q[0] ne '') {
120
                my $f = {
120
                my $f = {
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue/itemsearch_item.csv.inc (+5 lines)
Lines 1-6 Link Here
1
[%- USE raw -%]
1
[%- USE raw -%]
2
[%- USE Branches -%]
2
[%- USE Branches -%]
3
[%- USE Koha -%]
3
[%- USE Koha -%]
4
[%- USE KohaDates -%]
4
[%- USE ItemTypes -%]
5
[%- USE ItemTypes -%]
5
[%- USE AuthorisedValues -%]
6
[%- USE AuthorisedValues -%]
6
[%- SET biblio = item.biblio -%]
7
[%- SET biblio = item.biblio -%]
Lines 35-37 Link Here
35
"[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.withdrawn', authorised_value => item.withdrawn ) || "" | replace('"', '""') | $raw %]"
36
"[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.withdrawn', authorised_value => item.withdrawn ) || "" | replace('"', '""') | $raw %]"
36
[%- delimiter | $raw -%]
37
[%- delimiter | $raw -%]
37
"[% (item.issues || 0) | $raw %]"
38
"[% (item.issues || 0) | $raw %]"
39
[%- delimiter | $raw -%]
40
"[% IF item.onloan %]Checked out[% ELSIF item.withdrawn || item.damaged || item.notforloan || item.itemlost %]Not available[% ELSE %]Available[% END %]"
41
[%- delimiter | $raw -%]
42
"[% IF item.checkout %][% item.checkout.date_due | $KohaDates | $raw %][% ELSE %][% END %]"
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue/itemsearch_item.json.inc (+3 lines)
Lines 1-5 Link Here
1
[%- USE Branches -%]
1
[%- USE Branches -%]
2
[%- USE Koha -%]
2
[%- USE Koha -%]
3
[%- USE KohaDates -%]
3
[%- USE To -%]
4
[%- USE To -%]
4
[%- USE ItemTypes -%]
5
[%- USE ItemTypes -%]
5
[%- USE AuthorisedValues -%]
6
[%- USE AuthorisedValues -%]
Lines 28-33 Link Here
28
  "[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.itemlost', authorised_value => item.itemlost ) || "" | html %]",
29
  "[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.itemlost', authorised_value => item.itemlost ) || "" | html %]",
29
  "[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.withdrawn', authorised_value => item.withdrawn ) || "" | html %]",
30
  "[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.withdrawn', authorised_value => item.withdrawn ) || "" | html %]",
30
  "[% (item.issues || 0) | html %]",
31
  "[% (item.issues || 0) | html %]",
32
  "[% IF item.onloan %]Checked out[% ELSIF item.withdrawn || item.damaged || item.notforloan || item.itemlost %]Not available[% ELSE %]Available[% END %]",
33
  "[% IF item.checkout %][% item.checkout.date_due | $KohaDates | html %][% ELSE %]Not checked out[% END %]",
31
  "[% FILTER escape_quotes ~%]
34
  "[% FILTER escape_quotes ~%]
32
    <div class="btn-group dropup"><button type="button" class="btn btn-xs btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <i class="fa fa-pencil"></i> Edit <span class="caret"></span> </button> <ul class="dropdown-menu pull-right"> <li><a href="/cgi-bin/koha/cataloguing/additem.pl?op=edititem&biblionumber=[% item.biblionumber | uri %]&itemnumber=[% item.itemnumber | uri %]">Edit item</a></li> <li><a href="/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=[% item.biblionumber | html %]">Edit record</a></li> </ul> </div>
35
    <div class="btn-group dropup"><button type="button" class="btn btn-xs btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <i class="fa fa-pencil"></i> Edit <span class="caret"></span> </button> <ul class="dropdown-menu pull-right"> <li><a href="/cgi-bin/koha/cataloguing/additem.pl?op=edititem&biblionumber=[% item.biblionumber | uri %]&itemnumber=[% item.itemnumber | uri %]">Edit item</a></li> <li><a href="/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=[% item.biblionumber | html %]">Edit record</a></li> </ul> </div>
33
  [%~ END %]"
36
  [%~ END %]"
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt (-1 / +20 lines)
Lines 30-35 Link Here
30
    [%- CASE 'itemlost' %]<span>Lost</span>
30
    [%- CASE 'itemlost' %]<span>Lost</span>
31
    [%- CASE 'withdrawn' %]<span>Withdrawn</span>
31
    [%- CASE 'withdrawn' %]<span>Withdrawn</span>
32
    [%- CASE 'new_status' %]<span>Is new</span>
32
    [%- CASE 'new_status' %]<span>Is new</span>
33
    [%- CASE 'onloan' %]<span>Checked out</span>
33
  [%- END -%]
34
  [%- END -%]
34
[%- END -%]
35
[%- END -%]
35
36
Lines 138-143 Link Here
138
    [% loc.label = loc.lib %]
139
    [% loc.label = loc.lib %]
139
[% END %]
140
[% END %]
140
141
142
[% onloan = [
143
    {
144
        value = '0',
145
        label = 'Available',
146
    },
147
    {
148
        value = '1',
149
        label = 'Checked out',
150
    }
151
] %]
152
141
[%# Page starts here %]
153
[%# Page starts here %]
142
154
143
[% SET footerjs = 1 %]
155
[% SET footerjs = 1 %]
Lines 160-165 Link Here
160
172
161
    <div id="item-search-block">
173
    <div id="item-search-block">
162
      <h1>Item search</h1>
174
      <h1>Item search</h1>
175
163
      <p><a href="/cgi-bin/koha/catalogue/search.pl">Go to advanced search</a></p>
176
      <p><a href="/cgi-bin/koha/catalogue/search.pl">Go to advanced search</a></p>
164
      <form action="/cgi-bin/koha/catalogue/itemsearch.pl" method="get" id="itemsearchform">
177
      <form action="/cgi-bin/koha/catalogue/itemsearch.pl" method="get" id="itemsearchform">
165
          <div id="toolbar" class="btn-toolbar">
178
          <div id="toolbar" class="btn-toolbar">
Lines 190-195 Link Here
190
            [% IF withdrawns.size %]
203
            [% IF withdrawns.size %]
191
                [% INCLUDE form_field_select name="withdrawn" options = withdrawns empty_option = "All statuses" %]
204
                [% INCLUDE form_field_select name="withdrawn" options = withdrawns empty_option = "All statuses" %]
192
            [% END %]
205
            [% END %]
206
            [% INCLUDE form_field_select name="onloan" options = onloan empty_option = "All statuses" %]
193
          </fieldset>
207
          </fieldset>
194
          <fieldset>
208
          <fieldset>
195
            [% INCLUDE form_field_select_text %]
209
            [% INCLUDE form_field_select_text %]
Lines 313-318 Link Here
313
                + '      <th id="items_itemlost">' + _("Lost status") + '</th>'
327
                + '      <th id="items_itemlost">' + _("Lost status") + '</th>'
314
                + '      <th id="items_widthdrawn">' + _("Withdrawn status") + '</th>'
328
                + '      <th id="items_widthdrawn">' + _("Withdrawn status") + '</th>'
315
                + '      <th id="items_checkouts">' + _("Checkouts") + '</th>'
329
                + '      <th id="items_checkouts">' + _("Checkouts") + '</th>'
330
                + '      <th id="items_availability">' + _("Availability") + '</th>'
331
                + '      <th id="items_duedate">' + _("Due date") + '</th>'
316
                + '      <th id=""></th>'
332
                + '      <th id=""></th>'
317
                + '    </tr>'
333
                + '    </tr>'
318
            var table = ''
334
            var table = ''
Lines 469-474 Link Here
469
                    { 'sName': 'itemlost' },
485
                    { 'sName': 'itemlost' },
470
                    { 'sName': 'withdrawn' },
486
                    { 'sName': 'withdrawn' },
471
                    { 'sName': 'issues' },
487
                    { 'sName': 'issues' },
488
                    { 'sName': 'availability' },
489
                    { 'sName': 'duedate' },
472
                    { 'sName': 'actions', 'bSortable': false }
490
                    { 'sName': 'actions', 'bSortable': false }
473
                ],
491
                ],
474
                "sPaginationType": "full_numbers"
492
                "sPaginationType": "full_numbers"
Lines 515-520 Link Here
515
                        null,
533
                        null,
516
                    [% END %]
534
                    [% END %]
517
                    { 'type': 'text' },
535
                    { 'type': 'text' },
536
                    { 'type': 'text' },
537
                    { 'type': 'text' },
518
                    null
538
                    null
519
                ]
539
                ]
520
            });
540
            });
521
- 

Return to bug 17748