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

(-)a/C4/Items.pm (-1 / +1 lines)
Lines 1468-1474 sub SearchItems { Link Here
1468
1468
1469
    if ( $params->{sortby} eq 'availability' ) {
1469
    if ( $params->{sortby} eq 'availability' ) {
1470
        my $sortorder = (uc($params->{sortorder}) eq 'ASC') ? 'ASC' : 'DESC';
1470
        my $sortorder = (uc($params->{sortorder}) eq 'ASC') ? 'ASC' : 'DESC';
1471
        $query .= qq{ ORDER BY onloan $sortorder, damaged $sortorder, withdrawn $sortorder, notforloan $sortorder, itemlost $sortorder };
1471
        $query .= qq{ ORDER BY onloan $sortorder };
1472
    } else {
1472
    } else {
1473
        my $sortby = (0 < grep {$params->{sortby} eq $_} @columns)
1473
        my $sortby = (0 < grep {$params->{sortby} eq $_} @columns)
1474
            ? $params->{sortby} : 'itemnumber';
1474
            ? $params->{sortby} : 'itemnumber';
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue/itemsearch_item.csv.inc (-2 lines)
Lines 37-42 Link Here
37
[%- delimiter | $raw -%]
37
[%- delimiter | $raw -%]
38
"[% (item.issues || 0) | $raw %]"
38
"[% (item.issues || 0) | $raw %]"
39
[%- delimiter | $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 %][% END %]"
40
"[% IF item.checkout %][% item.checkout.date_due | $KohaDates | $raw %][% END %]"
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue/itemsearch_item.json.inc (-1 lines)
Lines 29-35 Link Here
29
  "[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.itemlost', authorised_value => item.itemlost ) || "" | html %]",
29
  "[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.itemlost', authorised_value => item.itemlost ) || "" | html %]",
30
  "[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.withdrawn', authorised_value => item.withdrawn ) || "" | html %]",
30
  "[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.withdrawn', authorised_value => item.withdrawn ) || "" | html %]",
31
  "[% (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 %][% END %]",
32
  "[% IF item.checkout %][% item.checkout.date_due | $KohaDates | html %][% END %]",
34
  "[% FILTER escape_quotes ~%]
33
  "[% FILTER escape_quotes ~%]
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>
34
    <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>
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/csv_headers/catalogue/itemsearch.tt (-2 lines)
Lines 32-38 Link Here
32
[%- delimiter | $raw -%]
32
[%- delimiter | $raw -%]
33
"Checkouts"
33
"Checkouts"
34
[%- delimiter | $raw -%]
34
[%- delimiter | $raw -%]
35
"Availability"
36
[%- delimiter | $raw -%]
37
"Due date"
35
"Due date"
38
[%- END -%]
36
[%- END -%]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt (-6 lines)
Lines 210-217 Link Here
210
                <label for="onloan_indifferent">Ignore</label>
210
                <label for="onloan_indifferent">Ignore</label>
211
                <input type="radio" name="onloan" id="onloan_yes" value="IS NOT NULL" />
211
                <input type="radio" name="onloan" id="onloan_yes" value="IS NOT NULL" />
212
                <label for="onloan_yes">Checked out</label>
212
                <label for="onloan_yes">Checked out</label>
213
                <input type="radio" name="onloan" id="onloan_no" value="IS NULL" />
214
                <label for="onloan_no">Available</label>
215
            </div>
213
            </div>
216
          </fieldset>
214
          </fieldset>
217
          <fieldset>
215
          <fieldset>
Lines 336-342 Link Here
336
                + '      <th id="items_itemlost">' + _("Lost status") + '</th>'
334
                + '      <th id="items_itemlost">' + _("Lost status") + '</th>'
337
                + '      <th id="items_widthdrawn">' + _("Withdrawn status") + '</th>'
335
                + '      <th id="items_widthdrawn">' + _("Withdrawn status") + '</th>'
338
                + '      <th id="items_checkouts">' + _("Checkouts") + '</th>'
336
                + '      <th id="items_checkouts">' + _("Checkouts") + '</th>'
339
                + '      <th id="items_availability">' + _("Availability") + '</th>'
340
                + '      <th id="items_date_due">' + _("Due date") + '</th>'
337
                + '      <th id="items_date_due">' + _("Due date") + '</th>'
341
                + '      <th id=""></th>'
338
                + '      <th id=""></th>'
342
                + '    </tr>'
339
                + '    </tr>'
Lines 494-500 Link Here
494
                    { 'sName': 'itemlost' },
491
                    { 'sName': 'itemlost' },
495
                    { 'sName': 'withdrawn' },
492
                    { 'sName': 'withdrawn' },
496
                    { 'sName': 'issues' },
493
                    { 'sName': 'issues' },
497
                    { 'sName': 'availability' },
498
                    { 'sName': 'date_due' },
494
                    { 'sName': 'date_due' },
499
                    { 'sName': 'actions', 'bSortable': false }
495
                    { 'sName': 'actions', 'bSortable': false }
500
                ],
496
                ],
Lines 544-550 Link Here
544
                    [% END %]
540
                    [% END %]
545
                    { 'type': 'text' },
541
                    { 'type': 'text' },
546
                    { 'type': 'text' },
542
                    { 'type': 'text' },
547
                    { 'type': 'text' },
548
                    null
543
                    null
549
                ]
544
                ]
550
            });
545
            });
551
- 

Return to bug 17748