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

(-)a/catalogue/itemsearch.pl (-3 / +4 lines)
Lines 90-97 if (defined $format and $format eq 'json') { Link Here
90
} elsif (defined $format and $format eq 'barcodes') {
90
} elsif (defined $format and $format eq 'barcodes') {
91
    # Retrieve all results
91
    # Retrieve all results
92
    $cgi->param('rows', 0);
92
    $cgi->param('rows', 0);
93
} elsif (defined$format and $format eq 'shareable') {
93
} elsif (defined $format and $format eq 'shareable') {
94
    # get the item search parameters from the url!?!?
94
    # get the item search parameters from the url and fill form
95
} elsif (defined $format) {
95
} elsif (defined $format) {
96
    die "Unsupported format $format";
96
    die "Unsupported format $format";
97
}
97
}
Lines 121-127 if ( Koha::MarcSubfieldStructures->search( { frameworkcode => '', kohafield => ' Link Here
121
    $template->param( has_new_status => 1 );
121
    $template->param( has_new_status => 1 );
122
}
122
}
123
123
124
if ( defined $format ) {
124
if ( defined $format and $format ne 'shareable') {
125
    # Parameters given, it's a search
125
    # Parameters given, it's a search
126
126
127
    my $filter = {
127
    my $filter = {
Lines 353-358 $template->param( Link Here
353
    damageds => \@damageds,
353
    damageds => \@damageds,
354
    items_search_fields => \@items_search_fields,
354
    items_search_fields => \@items_search_fields,
355
    authorised_values_json => to_json($authorised_values),
355
    authorised_values_json => to_json($authorised_values),
356
    query => $cgi,
356
);
357
);
357
358
358
output_html_with_http_headers $cgi, $cookie, $template->output;
359
output_html_with_http_headers $cgi, $cookie, $template->output;
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt (-6 / +16 lines)
Lines 37-50 Link Here
37
  <div class="form-field form-field-select">
37
  <div class="form-field form-field-select">
38
    <label class="form-field-label" for="[% name | html %]">[% INCLUDE form_label label=name %]</label>
38
    <label class="form-field-label" for="[% name | html %]">[% INCLUDE form_label label=name %]</label>
39
    <select id="[% name | html %]_op" name="[% name | html %]_op">
39
    <select id="[% name | html %]_op" name="[% name | html %]_op">
40
      <option value="=">is</option>
40
      [% IF query.param(name _ '_op') == '=' || !query.param(name _ '_op') %]
41
      <option value="!=" >is not</option>
41
        <option value="=" selected="selected">is</option>
42
        <option value="!=" >is not</option>
43
      [% ELSE %]
44
        <option value="=">is</option>
45
        <option value="!=" selected="selected">is not</option>
46
      [% END %]
42
    </select>
47
    </select>
43
    <select id="[% name | html %]" name="[% name | html %]" multiple="multiple" size="[% options.size < 4 ? options.size + 1 : 4 | html %]">
48
    <select id="[% name | html %]" name="[% name | html %]" multiple="multiple" size="[% options.size < 4 ? options.size + 1 : 4 | html %]">
44
      <option value="" selected="selected">
49
      [% IF query.param(name).size == 0 %]
45
        [% IF (empty_option) %][% INCLUDE form_label label=empty_option %][% ELSE %]<span>All</span>[% END %]
50
        <option value="" selected="selected">
46
      </option>
51
            [% IF (empty_option) %][% INCLUDE form_label label=empty_option %][% ELSE %]<span>All</span>[% END %]
52
        </option>
53
      [% END %]
47
      [% FOREACH option IN options %]
54
      [% FOREACH option IN options %]
55
        [% IF query.param(name).grep(option.value).size %]
56
            <option value="[% option.value | html %]" selected="selected">[% option.label | html %]</option>
57
        [% END %]
58
        [% query.param(option.value) %]
48
        <option value="[% option.value | html %]">[% option.label | html %]</option>
59
        <option value="[% option.value | html %]">[% option.label | html %]</option>
49
      [% END %]
60
      [% END %]
50
    </select>
61
    </select>
51
- 

Return to bug 14322