Owen Leonard
5fe1ad8ac6
This patch updates the OPAC and staff interface to use Bootstrap 5. Bootstrap CSS assets are now pulled from node_modules and compiled into staff-global.css and opac.css at build time. This update lays the foundations of some other chnages, especially the addition of a dark mode in the future. Hundreds of templates have been updated, mostly with updates to the grid markup. Most of the responsive behavior is still the same with the exception of improved flexibility of headers and footers in both the OPAC and staff interface. The other most common change is to add a new "namespace" to data attributes used by Bootstrap, e.g. "data-bs-target" or "data-bs-toggle". Modal markup has also been updated everywhere. Other common changes: dropdown button markup, alert markup (we now use Bootstrap's "alert alert-warning" and "alert alert-info" instead of our old "dialog alert" and "dialog info"). Bootstrap 5 now uses CSS variables which we can override in our own '_variables.scss' (in both the OPAC and staff) to accomplish a lot of the style overrides which we previously put in staff-global.scss. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
372 lines
17 KiB
Text
372 lines
17 KiB
Text
[% USE raw %]
|
|
[% USE Branches %]
|
|
[% PROCESS 'i18n.inc' %]
|
|
[% SET footerjs = 1 %]
|
|
[% INCLUDE 'doc-head-open.inc' %]
|
|
<title>[% FILTER collapse %]
|
|
[% IF ( do_it ) %]
|
|
[% t("Results") | html %] ›
|
|
[% END %]
|
|
[% t("Holds statistics") | html %] ›
|
|
[% t("Reports") | html %] ›
|
|
[% t("Koha") | html %]
|
|
[% END %]</title>
|
|
[% INCLUDE 'doc-head-close.inc' %]
|
|
<style>
|
|
.sql {display:none;}
|
|
</style>
|
|
</head>
|
|
|
|
[% BLOCK reservestatus %]
|
|
[% IF field == 'reservestatus' %]
|
|
[% SWITCH value %]
|
|
[% CASE 'C'%]<span>Cancelled</span>
|
|
[% CASE 'F'%]<span>Filled</span>
|
|
[% CASE 'P'%]<span>Placed</span>
|
|
[% CASE 'W'%]<span>Waiting</span>
|
|
[% END %]
|
|
[% ELSE %]
|
|
[% value | html %]
|
|
[% END %]
|
|
[% END %]
|
|
|
|
<body id="rep_reserve_stats" class="rep">
|
|
[% WRAPPER 'header.inc' %]
|
|
[% INCLUDE 'cat-search.inc' %]
|
|
[% END %]
|
|
|
|
[% WRAPPER 'sub-header.inc' %]
|
|
[% WRAPPER breadcrumbs %]
|
|
[% WRAPPER breadcrumb_item %]
|
|
<a href="/cgi-bin/koha/reports/reports-home.pl">Reports</a>
|
|
[% END %]
|
|
[% IF ( do_it ) %]
|
|
[% WRAPPER breadcrumb_item %]
|
|
<a href="/cgi-bin/koha/reports/reserves_stats.pl">Holds statistics</a>
|
|
[% END %]
|
|
[% WRAPPER breadcrumb_item bc_active= 1 %]
|
|
<span>Results</span>
|
|
[% END %]
|
|
[% ELSE %]
|
|
[% WRAPPER breadcrumb_item bc_active= 1 %]
|
|
<span>Holds statistics</span>
|
|
[% END %]
|
|
[% END %]
|
|
[% END #/ WRAPPER breadcrumbs %]
|
|
[% END #/ WRAPPER sub-header.inc %]
|
|
|
|
<div class="main container-fluid">
|
|
<div class="row">
|
|
<div class="col-md-10 order-md-2 order-sm-1">
|
|
<main>
|
|
[% INCLUDE 'messages.inc' %]
|
|
|
|
|
|
<h1>Holds statistics</h1>
|
|
[% IF ( do_it ) %]
|
|
[% IF ( mainloop ) %]
|
|
[% IF ( loopfilter ) %]
|
|
<p>Filtered on:</p>
|
|
<ul>
|
|
[% FOREACH loopfilte IN loopfilter %]
|
|
[% IF ( loopfilte.err ) %]<li class="error">Error:
|
|
[% ELSIF ( loopfilte.sql ) %]<li class="sql">
|
|
[% ELSE %]<li>
|
|
[% END %]
|
|
[% loopfilte.crit | html %] [% loopfilte.filter | html %]
|
|
</li>
|
|
[% END %]
|
|
</ul>
|
|
[% END %]
|
|
|
|
[% FOREACH mainloo IN mainloop %]
|
|
|
|
<table>
|
|
<tr>
|
|
<th>[% mainloo.line | html %] / [% mainloo.column | html %]</th>
|
|
[% FOREACH loopco IN mainloo.loopcol %]
|
|
<th>[% PROCESS reservestatus field=mainloo.column value=loopco.coltitle_display %]</th>
|
|
[% END %]
|
|
<th>TOTAL</th>
|
|
</tr>
|
|
[% FOREACH loopro IN mainloo.looprow %]
|
|
<tr>
|
|
<td>[% PROCESS reservestatus field=mainloo.line value=loopro.rowtitle_display %]</td>
|
|
[% FOREACH loopcel IN loopro.loopcell %]
|
|
<td align="center">
|
|
[% IF ( loopcel.url_complement ) %]<a href="reserves_stats.pl?output=[% loopcel.output | uri %]&[% loopcel.url_complement | uri %]">[% loopcel.value | html %]</a>[% ELSE %][% loopcel.value | html %][% END %]
|
|
</td>
|
|
[% END %]
|
|
<td align="center">[% loopro.totalrow | html %]</td>
|
|
</tr>
|
|
[% END %]
|
|
<tr>
|
|
<th>TOTAL</th>
|
|
[% FOREACH loopfoote IN mainloo.loopfooter %]
|
|
<th>[% loopfoote.totalcol | html %]</th>
|
|
[% END %]
|
|
<th>[% mainloo.total | html %]</th>
|
|
</tr>
|
|
</table>
|
|
[% END %]
|
|
[% END %]
|
|
[% ELSE %]
|
|
|
|
<form method="get" action="/cgi-bin/koha/reports/reserves_stats.pl">
|
|
<fieldset class="rows">
|
|
<legend>Holds statistics</legend><table>
|
|
<thead>
|
|
<tr>
|
|
<th>Title</th>
|
|
<th>Row</th>
|
|
<th>Column</th>
|
|
<th>Filter</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr >
|
|
<td>Hold status </td>
|
|
<td><input type="radio" name="Line" value="reservestatus" /></td>
|
|
<td><input type="radio" name="Column" value="reservestatus" checked="checked" /></td>
|
|
<td>
|
|
<input type="checkbox" name="filter_reservestatus_or_C" value="C" /> Cancelled
|
|
<input type="checkbox" name="filter_reservestatus_or_F" value="F" /> Filled
|
|
<input type="checkbox" name="filter_reservestatus_or_P" value="P" /> Placed
|
|
<input type="checkbox" name="filter_reservestatus_or_W" value="W" /> Waiting
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Hold date</td>
|
|
<td><input type="radio" name="Line" value="reservedate" /></td>
|
|
<td><input type="radio" name="Column" value="reservedate" /></td>
|
|
<td>
|
|
<label for="filter_reservedate_begin">From</label>
|
|
<input type="text" size="10" id="filter_reservedate_begin" data-date_to="filter_reservedate_end" name="filter_reservedate_begin" class="flatpickr" />
|
|
|
|
<label for="filter_reservedate_end">To</label>
|
|
<input size="10" id="filter_reservedate_end" name="filter_reservedate_end" value="" type="text" class="flatpickr" />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Notification date</td>
|
|
<td><input type="radio" name="Line" value="notificationdate" /></td>
|
|
<td><input type="radio" name="Column" value="notificationdate" /></td>
|
|
<td>
|
|
<label for="filter_notificationdate_begin">From</label>
|
|
<input type="text" size="10" id="filter_notificationdate_begin" name="filter_notificationdate_begin" data-date_to="filter_notificationdate_end" class="flatpickr" />
|
|
|
|
<label for="filter_notificationdate_end">To</label>
|
|
<input size="10" id="filter_notificationdate_end" name="filter_notificationdate_end" value="" type="text" class="flatpickr" />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Reminder date</td>
|
|
<td><input type="radio" name="Line" value="reminderdate" /></td>
|
|
<td><input type="radio" name="Column" value="reminderdate" /></td>
|
|
<td>
|
|
<label for="filter_reminderdate_begin">From</label>
|
|
<input type="text" size="10" id="filter_reminderdate_begin" name="Filter" data-date_to="filter_reminderdate_end" class="flatpickr" />
|
|
|
|
<label for="filter_reminderdate_end">To</label>
|
|
<input size="10" id="filter_reminderdate_end" name="filter_reminderdate_end" value="" type="text" class="flatpickr" />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Waiting date</td>
|
|
<td><input type="radio" name="Line" value="waitingdate" /></td>
|
|
<td><input type="radio" name="Column" value="waitingdate" /></td>
|
|
<td>
|
|
<label for="filter_waitingdate_begin">From</label>
|
|
<input type="text" size="10" id="filter_waitingdate_begin" name="filter_waitingdate_begin" data-date_to="filter_waitingdate_end" class="flatpickr" />
|
|
|
|
<label for="filter_waitingdate_end">To</label>
|
|
<input size="10" id="filter_waitingdate_end" name="filter_waitingdate_end" value="" type="text" class="flatpickr" />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Cancellation date</td>
|
|
<td><input type="radio" name="Line" value="cancellationdate" /></td>
|
|
<td><input type="radio" name="Column" value="cancellationdate" /></td>
|
|
<td>
|
|
<label for="filter_cancellationdate_begin">From</label>
|
|
<input type="text" size="10" id="filter_cancellationdate_begin" name="filter_cancellationdate_begin" data-date_to="filter_cancellationdate_end" class="flatpickr" />
|
|
|
|
<label for="filter_cancellationdate_end">To</label>
|
|
<input size="10" id="filter_cancellationdate_end" name="filter_cancellationdate_end" value="" type="text" class="flatpickr" />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Patron category</td>
|
|
<td><input type="radio" name="Line" value="borrowers.categorycode" /></td>
|
|
<td><input type="radio" name="Column" value="borrowers.categorycode" /></td>
|
|
<td><select name="filter_categorycode" id="borcat">
|
|
<option value=""> </option>
|
|
[% FOREACH categoryloo IN categoryloop %]
|
|
<option value="[% categoryloo.categorycode | html %]">[% categoryloo.description | html %]</option>
|
|
[% END %]
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Item type</td>
|
|
<td><input type="radio" name="Line" value="items.itype" /></td>
|
|
<td><input type="radio" name="Column" value="items.itype" /></td>
|
|
<td><select name="filter_items.itype" id="itype">
|
|
<option value=""> </option>
|
|
[% FOREACH itemtype IN itemtypes %]
|
|
<option value="[% itemtype.itemtype | html %]">[% itemtype.translated_description | html %]</option>
|
|
[% END %]
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Pickup library</td>
|
|
<td><input type="radio" name="Line" value="reserves.branchcode" checked="checked" /></td>
|
|
<td><input type="radio" name="Column" value="reserves.branchcode" /></td>
|
|
<td><select name="filter_reserves.branchcode" id="resbranchcode">
|
|
<option value=""> </option>
|
|
[% PROCESS options_for_libraries libraries => Branches.all() %]
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Holding library</td>
|
|
<td><input type="radio" name="Line" value="items.holdingbranch" /></td>
|
|
<td><input type="radio" name="Column" value="items.holdingbranch" /></td>
|
|
<td><select name="filter_items.holdingbranch" id="holdingbranch">
|
|
<option value=""> </option>
|
|
[% PROCESS options_for_libraries libraries => Branches.all() %]
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Home library</td>
|
|
<td><input type="radio" name="Line" value="items.homebranch" /></td>
|
|
<td><input type="radio" name="Column" value="items.homebranch" /></td>
|
|
<td><select name="filter_items.homebranch" id="homebranch">
|
|
<option value=""> </option>
|
|
[% PROCESS options_for_libraries libraries => Branches.all() %]
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Collection</td>
|
|
<td><input type="radio" name="Line" value="items.ccode" /></td>
|
|
<td><input type="radio" name="Column" value="items.ccode" /></td>
|
|
<td><select name="filter_items.ccode" id="ccode">
|
|
<option value=""> </option>
|
|
[% FOREACH ccodeloo IN ccodeloop %]
|
|
[% IF ( ccodeloo.selected ) %] <option value="[% ccodeloo.code | html %]" selected="selected">[% ccodeloo.description | html %]</option>[% ELSE %]<option value="[% ccodeloo.code | html %]">[% ccodeloo.description | html %]</option>[% END %]
|
|
[% END %]
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Shelving location</td>
|
|
<td><input type="radio" name="Line" value="items.location" /></td>
|
|
<td><input type="radio" name="Column" value="items.location" /></td>
|
|
<td><select name="filter_items.location" id="location">
|
|
<option value=""> </option>
|
|
[% FOREACH locationloo IN locationloop %]
|
|
[% IF ( locationloo.selected ) %]<option value="[% locationloo.code | html %]" selected="selected">[% locationloo.description | html %]</option>[% ELSE %]<option value="[% locationloo.code | html %]">[% locationloo.description | html %]</option>[% END %]
|
|
[% END %]
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Item call number</td>
|
|
<td></td>
|
|
<td></td>
|
|
<td>From <input type="text" name="filter_items.itemcallnumber_begin" size="10" /> (inclusive) to <input type="text" name="filter_items.itemcallnumber_endex" size="10" /> (exclusive) </td>
|
|
</tr>
|
|
[% IF ( hassort1 ) %]
|
|
<tr><td>Patron sort 1</td>
|
|
<td><input type="radio" name="Line" value="borrowers.sort1" /></td>
|
|
<td><input type="radio" name="Column" value="borrowers.sort1" /></td>
|
|
<td><select name="filter_borrowers.sort1" id="sort1">
|
|
<option value=""> </option>
|
|
[% FOREACH Bsort IN Bsort1 %]
|
|
[% IF ( Bsort.selected ) %]<option value="[% Bsort.authorised_value | html %]" selected="selected">[% Bsort.lib | html %]</option>[% ELSE %]<option value="[% Bsort.authorised_value | html %]" >[% Bsort.lib | html %]</option>[% END %]
|
|
[% END %]
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
[% END %]
|
|
[% IF ( hassort2 ) %]
|
|
<tr><td>Patron sort 2</td>
|
|
<td><input type="radio" name="Line" value="borrowers.sort2" /></td>
|
|
<td><input type="radio" name="Column" value="borrowers.sort2" /></td>
|
|
<td><select name="filter_borrowers.sort2" id="sort2">
|
|
<option value=""> </option>
|
|
[% FOREACH Bsort IN Bsort2 %]
|
|
[% IF ( Bsort.selected ) %]<option value="[% Bsort.authorised_value | html %]" selected="selected">[% Bsort.lib | html %]</option>[% ELSE %]<option value="[% Bsort.authorised_value | html %]" >[% Bsort.lib | html %]</option>[% END %]
|
|
[% END %]
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
[% END %]
|
|
</tbody>
|
|
</table><br /></fieldset>
|
|
|
|
<fieldset class="rows"><legend>Cell value </legend><ol><li><label for="cellvalue1">Count holds:</label> <input type="radio" name="Cellvalue" value="1" id="cellvalue1" checked="checked" /> </li>
|
|
<li><label for="cellvalue2">Count unique borrowers:</label> <input type="radio" name="Cellvalue" value="2" id="cellvalue2" /> </li><li><label for="cellvalue3">Count unique items:</label> <input type="radio" name="Cellvalue" id="cellvalue3" value="3" /> </li><li><label for="cellvalue4">Count unique bibliographic records:</label> <input type="radio" name="Cellvalue" id="cellvalue4" value="4" /> </li></ol></fieldset>
|
|
|
|
<fieldset class="rows">
|
|
<legend>Output</legend>
|
|
<ol>
|
|
<li>
|
|
<label for="outputscreen">To screen into the browser: </label><input type="radio" checked="checked" name="output" id="outputscreen" value="screen" />
|
|
</li>
|
|
<li>
|
|
<label for="outputfile">To a file:</label> <input type="radio" name="output" value="file" id="outputfile" />
|
|
<label class="inline" for="basename">Named: </label><input type="text" name="basename" id="basename" value="Export" />
|
|
<label class="inline" for="MIME">Into an application:</label>
|
|
<select name="MIME" id="MIME">
|
|
[% FOREACH value IN CGIextChoice %]
|
|
<option value="[% value | html %]">[% value | html %]</option>
|
|
[% END %]
|
|
</select>
|
|
<select name="sep" id="sep">
|
|
[% FOREACH value IN CGIsepChoice.values.sort() %]
|
|
[% IF ( value == CGIsepChoice.default ) %]
|
|
<option value="[% value | html %]" selected="selected">[% value | html %]</option>
|
|
[% ELSE %]
|
|
<option value="[% value | html %]">[% value | html %]</option>
|
|
[% END %]
|
|
[% END %]
|
|
</select>
|
|
</li>
|
|
</ol>
|
|
</fieldset>
|
|
|
|
<fieldset class="action">
|
|
<input type="submit" class="btn btn-primary" value="Submit" />
|
|
<input type="hidden" name="report_name" value="[% report_name | html %]" />
|
|
<input type="hidden" name="do_it" value="1" />
|
|
</fieldset>
|
|
</form>
|
|
[% END %]
|
|
|
|
</main>
|
|
</div> <!-- /.col-md-10.order-md-2 -->
|
|
|
|
<div class="col-md-2 order-sm-2 order-md-1">
|
|
<aside>
|
|
[% INCLUDE 'reports-menu.inc' %]
|
|
</aside>
|
|
</div> <!-- /.col-md-2.order-md-1 -->
|
|
</div> <!-- /.row -->
|
|
|
|
[% MACRO jsinclude BLOCK %]
|
|
[% INCLUDE 'calendar.inc' %]
|
|
|
|
<script>
|
|
$(document).ready(function () {
|
|
// Undo the selection that Branches.all made, since there may be no item with homebranch or holdingbranch
|
|
$('#holdingbranch option').prop('selected', false);
|
|
$('#homebranch option').prop('selected', false);
|
|
});
|
|
</script>
|
|
[% END %]
|
|
|
|
[% INCLUDE 'intranet-bottom.inc' %]
|