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

(-)a/catalogue/itemsearch.pl (-2 / +2 lines)
Lines 54-60 if (defined $format and $format eq 'json') { Link Here
54
    my @c = $cgi->param('c');
54
    my @c = $cgi->param('c');
55
    foreach my $i (0 .. ($cgi->param('iColumns') - 1)) {
55
    foreach my $i (0 .. ($cgi->param('iColumns') - 1)) {
56
        my $sSearch = $cgi->param("sSearch_$i");
56
        my $sSearch = $cgi->param("sSearch_$i");
57
        if ($sSearch) {
57
        if (defined $sSearch and $sSearch ne '') {
58
            my @words = split /\s+/, $sSearch;
58
            my @words = split /\s+/, $sSearch;
59
            foreach my $word (@words) {
59
            foreach my $word (@words) {
60
                push @f, $columns[$i];
60
                push @f, $columns[$i];
Lines 98-104 if (scalar keys %params > 0) { Link Here
98
        filters => [],
98
        filters => [],
99
    };
99
    };
100
100
101
    foreach my $p (qw(homebranch location itype ccode issues datelastborrowed)) {
101
    foreach my $p (qw(homebranch location itype ccode issues datelastborrowed notforloan)) {
102
        if (my @q = $cgi->param($p)) {
102
        if (my @q = $cgi->param($p)) {
103
            if ($q[0] ne '') {
103
            if ($q[0] ne '') {
104
                my $f = {
104
                my $f = {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt (-3 / +9 lines)
Lines 22-28 Link Here
22
        [% empty_option || "All" %]
22
        [% empty_option || "All" %]
23
      </option>
23
      </option>
24
      [% FOREACH option IN options %]
24
      [% FOREACH option IN options %]
25
        [% IF values.grep(option.value).size %]
25
        [% IF values != '' && values.grep(option.value).size %]
26
          <option value="[% option.value %]" selected="selected">[% option.label %]</option>
26
          <option value="[% option.value %]" selected="selected">[% option.label %]</option>
27
        [% ELSE %]
27
        [% ELSE %]
28
          <option value="[% option.value %]">[% option.label %]</option>
28
          <option value="[% option.value %]">[% option.label %]</option>
Lines 210-215 Link Here
210
      $('#results').dataTable($.extend(true, {}, dataTablesDefaults, {
210
      $('#results').dataTable($.extend(true, {}, dataTablesDefaults, {
211
        'bDestroy': true,
211
        'bDestroy': true,
212
        'bServerSide': true,
212
        'bServerSide': true,
213
        'bProcessing': true,
213
        'sAjaxSource': '/cgi-bin/koha/catalogue/itemsearch.pl',
214
        'sAjaxSource': '/cgi-bin/koha/catalogue/itemsearch.pl',
214
        'fnServerParams': function(aoData) {
215
        'fnServerParams': function(aoData) {
215
          aoData.push( { 'name': 'format', 'value': 'json' } );
216
          aoData.push( { 'name': 'format', 'value': 'json' } );
Lines 217-223 Link Here
217
            aoData.push(params[i]);
218
            aoData.push(params[i]);
218
          }
219
          }
219
        },
220
        },
220
        'sDom': '<"top pager"ilp>t<"bottom pager"ip>',
221
        'sDom': '<"top pager"ilp>t<"bottom pager"ip>r',
221
        'aoColumns': [
222
        'aoColumns': [
222
          { 'sName': 'title' },
223
          { 'sName': 'title' },
223
          { 'sName': 'publicationyear' },
224
          { 'sName': 'publicationyear' },
Lines 345-350 Link Here
345
              options = ccodes
346
              options = ccodes
346
              empty_option = "All collection codes"
347
              empty_option = "All collection codes"
347
            %]
348
            %]
349
            [% INCLUDE form_field_select
350
              name="notforloan"
351
              label="Status"
352
              options = notforloans
353
              empty_option = "All statuses"
354
            %]
348
          </fieldset>
355
          </fieldset>
349
          <fieldset>
356
          <fieldset>
350
            [% INCLUDE form_field_select_text_block %]
357
            [% INCLUDE form_field_select_text_block %]
351
- 

Return to bug 11425