Browse Source

Bug 29015: (follow-up) Show sidebar filter form with results

This patch adds the new filter form in the sidebar when showing results.
To do so the form markup is moved into a BLOCK so that it can be reused.

This patch also adds pre-selection of submitted options on the filter
form so that it reflects the user's choices.

To test, apply the patch and rebuild the staff client CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).

- Go to Circulation -> Holds queue.
- Submit the form with one or more filters selected.
- On the results page the queue should be correctly filtered and the
  sidebar should show your search fields preselected.
- Test with the CircSidebar preference enabled and disabled. The
  circulation menu should appear correctly, with the filter form only
  displaying in the sidebar after submitting the form.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
21.11.x
Owen Leonard 3 years ago
committed by Jonathan Druart
parent
commit
4a87ff8703
  1. 5
      koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss
  2. 106
      koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt

5
koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss

@ -228,6 +228,11 @@ aside {
margin-right: 3px;
width: calc(100% - 20px);
}
&+.action {
margin-left: 0;
padding: 0;
}
}
}
}

106
koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt

@ -53,7 +53,7 @@
<main>
<div class="row">
[% IF Koha.Preference('CircSidebar') %]
[% IF ( total || Koha.Preference('CircSidebar') ) %]
<div class="col-sm-10 col-sm-push-2">
[% ELSE %]
<div class="col-md-10 col-md-offset-1 col-lg-8 col-lg-offset-2">
@ -202,58 +202,74 @@
[% END %]
[% END %]
[% UNLESS ( total ) %]
<form name="f" action="/cgi-bin/koha/circ/view_holdsqueue.pl">
<fieldset class="rows">
<ol>
<li>
<label for="branchlimit">Library: </label>
<select name="branchlimit" id="branchlimit">
<option value="">All</option>
[% PROCESS options_for_libraries libraries => Branches.all( only_from_group => 1 ) %]
</select>
</li>
<li>
<label for="itemtypeslimit">Item type: </label>
<select name="itemtypeslimit" id="itemtypeslimit">
<option value="">All</option>
[% PROCESS options_for_item_types itemtypes => ItemTypes.Get() %]
</select>
</li>
<li>
<label for="ccodeslimit">Collection code: </label>
<select name="ccodeslimit" id="ccodeslimit">
<option value="">All</option>
[% PROCESS options_for_authorised_values authorised_values => AuthorisedValues.GetAuthValueDropbox( 'CCODE' ) %]
</select>
</li>
<li>
<label for="locationsslimit">Shelving location: </label>
<select name="locationslimit" id="ccodeslimit">
<option value="">All</option>
[% PROCESS options_for_authorised_values authorised_values => AuthorisedValues.GetAuthValueDropbox( 'LOC' ) %]
</select>
</li>
</ol></fieldset>
<fieldset class="action"> <input type="submit" value="Submit" />
<input type="hidden" name="run_report" value="1" /></fieldset>
</form>
[% END %]
[% UNLESS ( total ) %]
[% PROCESS filter_form %]
[% END %]
[% IF Koha.Preference('CircSidebar') %]
</div> <!-- /.col-sm-10.col-sm-push-2 -->
<div class="col-sm-2 col-sm-pull-10">
<aside>
</div> <!-- /.col-sm-10.col-sm-push-2 -->
[% IF ( total || Koha.Preference('CircSidebar') ) %]
<div class="col-sm-2 col-sm-pull-10">
<aside>
[% IF ( total ) %]
[% PROCESS filter_form %]
[% END %]
[% IF Koha.Preference('CircSidebar') %]
[% INCLUDE 'circ-nav.inc' %]
</aside>
</div> <!-- /.col-sm-2.col-sm-pull-10 -->
</div> <!-- /.row -->
[% END %]
</aside>
</div> <!-- /.col-sm-2.col-sm-pull-10 -->
[% END %]
</div> <!-- /.row -->
</main>
</div> <!-- /.col-sm-12 -->
</div> <!-- /.row -->
[% BLOCK filter_form %]
<form name="f" action="/cgi-bin/koha/circ/view_holdsqueue.pl">
[% IF ( total ) %]
<fieldset class="brief">
[% ELSE -%]
<fieldset class="rows">
[% END %]
<ol>
<li>
<label for="branchlimit">Library: </label>
<select name="branchlimit" id="branchlimit">
<option value="">All</option>
[% PROCESS options_for_libraries libraries => Branches.all( selected => branchlimit, only_from_group => 1 ) %]
</select>
</li>
<li>
<label for="itemtypeslimit">Item type: </label>
<select name="itemtypeslimit" id="itemtypeslimit">
<option value="">All</option>
[% PROCESS options_for_item_types itemtypes => ItemTypes.Get(), selected_itemtype => itemtypeslimit %]
</select>
</li>
<li>
<label for="ccodeslimit">Collection code: </label>
<select name="ccodeslimit" id="ccodeslimit">
<option value="">All</option>
[% PROCESS options_for_authorised_values authorised_values => AuthorisedValues.GetAuthValueDropbox( 'CCODE' ), selected_av => ccodeslimit %]
</select>
</li>
<li>
<label for="locationsslimit">Shelving location: </label>
<select name="locationslimit" id="locationslimit">
<option value="">All</option>
[% PROCESS options_for_authorised_values authorised_values => AuthorisedValues.GetAuthValueDropbox( 'LOC' ), selected_av => locationslimit %]
</select>
</li>
</ol>
</fieldset>
<fieldset class="action">
<input type="submit" value="Submit" />
<input type="hidden" name="run_report" value="1" />
</fieldset>
</form>
[% END %]
[% MACRO jsinclude BLOCK %]
[% INCLUDE 'datatables.inc' %]
[% INCLUDE 'columns_settings.inc' %]

Loading…
Cancel
Save