+[% USE Branches %]
+[% USE ItemTypes %]
[% INCLUDE 'doc-head-open.inc' %]
-<title>Koha › Reports › Items with no checkouts</title>
+<title>Items with no checkouts › Reports › Koha</title>
[% INCLUDE 'doc-head-close.inc' %]
-<style type="text/css">
- .sql {display: none;}
+<style>
+ .sql {display: none;}
</style>
</head>
-<body>
-[% INCLUDE 'header.inc' %]
-[% INCLUDE 'cat-search.inc' %]
-<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/reports/reports-home.pl">Reports</a> › Items with no checkouts</div>
+<body id="rep_catalogue_out" class="rep">
+[% WRAPPER 'header.inc' %]
+ [% INCLUDE 'cat-search.inc' %]
+[% END %]
+
+[% WRAPPER 'sub-header.inc' %]
+<nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
+ <ol>
+ <li>
+ <a href="/cgi-bin/koha/mainpage.pl">Home</a>
+ </li>
+ <li>
+ <a href="/cgi-bin/koha/reports/reports-home.pl">Reports</a>
+ </li>
+ <li>
+ <a href="#" aria-current="page">
+ Items with no checkouts
+ </a>
+ </li>
+ </ol>
+</nav>
+[% END %]
-<div id="doc3" class="yui-t2">
- <div id="bd">
- <div id="yui-main">
- <div class="yui-b">
+<div class="main container-fluid">
+ <div class="row">
+ <div class="col-sm-10 col-sm-push-2">
+ <main>
+ [% IF ( do_it ) %]
+ <h1>Items with no checkouts</h1>
+ [% FOREACH mainloo IN mainloop %]
+ [% IF ( mainloo.loopfilter ) %]
+ <p>Filtered on:</p>
+ <ul>
+ [% FOREACH loopfilte IN mainloo.loopfilter %]
+ [% IF ( loopfilte.err ) %]
+ <p class="error">Error: [% loopfilte.filter | html %]</p>
+ [% ELSIF ( loopfilte.sql ) %]
+ <span class="sql">
+ [% loopfilte.crit | html %] = [% loopfilte.filter | html %]
+ </span>
+ [% ELSE %]
+ [% SWITCH loopfilte.crit %]
+ [% CASE 'homelibrary' %]<li>Home library: [% Branches.GetName( loopfilte.filter ) | html %]</li>
+ [% CASE 'itemtype' %]<li>Item type: [% ItemTypes.GetDescription( loopfilte.filter ) | html %]</li>
+ [% CASE 'limit' %]<li>Limit: [% loopfilte.filter | html %]</li>
+ [% CASE 'by' %]
+ <li>By:
+ [% group_by = loopfilte.filter %]
+ [% IF ( group_by == "homebranch") %]
+ Home library
+ [% ELSIF ( group_by == "itype" ) %]
+ Item type
+ [% ELSE %]
+ None
+ [% END %]
+ </li>
+ [% CASE %]<li>[% loopfilte.crit | html %]: [% loopfilte.filter | html %]</li>
+ [% END %]
+ [% END %]
+ [% END %]
+ </ul>
+ [% END %]
-[% IF ( do_it ) %]
- <h1>Items with no checkouts</h1>
- [% FOREACH mainloo IN mainloop %]
- [% IF ( mainloo.loopfilter ) %]
- <p>Filtered on</p>
- [% FOREACH loopfilte IN mainloo.loopfilter %]
- [% IF ( loopfilte.err ) %]<p class="error">Error:
- [% ELSE %]<p>
- [% END %]
- [% IF ( loopfilte.sql ) %]<span class="sql">[% END %]
- [% loopfilte.crit %] = [% loopfilte.filter %]
- [% IF ( loopfilte.sql ) %]</span>[% END %]
- </p>
- [% END %]
- [% END %]
-
- [% IF ( mainloo.looptables ) %]
- <h3><a name="summary" id="summary"></a>Summary</h3>
- <table id="summary_table">
- <tr><th>Group</th><th>Call Number Range</th><th>Number of Items Displayed</th><th>Total Items in Group</th>
- </tr>
- [% FOREACH looptable IN mainloo.looptables %]
- <tr><td><a href="#table[% looptable.coltitle %]">[% looptable.coltitle %]</a></td>
- <td>[% IF ( looptable.looptable_count ) %]
- [% looptable.looptable_first %] to [% looptable.looptable_last %]
- [% END %]
- </td>
- <td>[% looptable.looptable_count %]</td>
- <td>[% looptable.coltitle_count %]</td>
- </tr>
- [% END %]
- <tr><th>TOTAL</th><th></th><th>[% mainloo.total_looptable_count %]</th><th>[% mainloo.total_coltitle_count %]</th>
- </tr>
- </table>
+ [% IF ( mainloo.looptables ) %]
+ <div class="page-section">
+ <h3><a name="summary" id="summary"></a>Summary</h3>
+ <table id="summary_table">
+ <tr>
+ <th>Group</th>
+ <th>Call number range</th>
+ <th>Number of items displayed</th>
+ <th>Total items in group</th>
+ </tr>
+ [% FOREACH looptable IN mainloo.looptables %]
+ <tr>
+ <td>
+ [% IF ( group_by=="itype" ) %]
+ <a href="#table[% looptable.coltitle | uri %]">[% ItemTypes.GetDescription( looptable.coltitle ) | html %]</a>
+ [% ELSIF ( group_by=="homebranch" ) %]
+ <a href="#table[% looptable.coltitle | uri %]">[% Branches.GetName( looptable.coltitle ) | html %]</a>
+ [% ELSE %]
+ <a href="#table[% looptable.coltitle | uri %]">Ungrouped</a>
+ [% END %]
+ </td>
+ <td>
+ [% IF ( looptable.looptable_count ) %]
+ [% looptable.looptable_first | html %] to [% looptable.looptable_last | html %]
+ [% END %]
+ </td>
+ <td>[% looptable.looptable_count | html %]</td>
+ <td>[% looptable.coltitle_count | html %]</td>
+ </tr>
+ [% END %]
+ <tr>
+ <th>TOTAL</th>
+ <th></th>
+ <th>[% mainloo.total_looptable_count | html %]</th>
+ <th>[% mainloo.total_coltitle_count | html %]</th>
+ </tr>
+ </table>
+ </div>
+ [% END %]
- [% END %]
- [% FOREACH looptable IN mainloo.looptables %]
- <h3><a id="table[% looptable.coltitle %]"></a>
- [% looptable.coltitle %]
- </h3>
- <table>
- <tr>
- <th>#</th>
- <th>Call Number</th>
- <th>Barcode</th>
- <th>Item Details</th>
- </tr>
- [% IF ( looptable.looprow ) %]
- [% FOREACH loopro IN looptable.looprow %]
- <tr[% UNLESS ( loop.odd ) %] class="highlight"[% END %]>
- <td>[% loop.count %]</td>
- <td>[% DEFAULT loopro.itemcallnumber="No Call Number" %]</td>
- <td>[% DEFAULT loopro.barcode="No Barcode" %]</td>
- <td><p><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% loopro.biblionumber %]">[% DEFAULT loopro.title="NO TITLE" %]</a></p>
- [% DEFAULT loopro.author="" %]
- [% IF ( loopro.branch ) %]at [% loopro.branch %][% END %]
- </td>
- </tr>
- [% END %]
- [% ELSE %]
- <tr><td colspan="4">No items for [% looptable.coltitle %]</td>
- </tr>
- [% END %]
- </table>
- [% END %]
- [% END %]
-[% ELSE %]
- <h1>Items with no checkouts</h1>
- <form method="post" action="/cgi-bin/koha/reports/catalogue_out.pl">
-
- <fieldset class="rows">
- <ol>
- <li><label for="branch">Library: </label>
- <select name="Filter" id="branch">
- <option value="">Any Library</option>
- [% FOREACH branchloo IN branchloop %]
- <option value="[% branchloo.value %]">[% branchloo.branchname %]</option>
- [% END %]
- </select></li>
- <li>
- <label for="documenttype">Item Type: </label><select name="Filter" id="documenttype">
- <option value="">Any Item Type</option>
- [% FOREACH itemtypeloo IN itemtypeloop %]
- <option value="[% itemtypeloo.value %]">[% itemtypeloo.description %]</option>
- [% END %]
- </select>
- </li>
- </ol>
- </fieldset>
-
- <fieldset class="rows">
- <legend>Limits</legend>
- <ol>
- <li><label for="numberlimit">Limit to: </label> <select name="Limit" id="numberlimit">
- <option value ="" selected="selected">None</option>
- <option value ="5"> 5</option>
- <option value ="10">10</option>
- <option value ="15">15</option>
- <option value ="20">20</option>
- <option value ="25">25</option>
- <option value ="40">40</option>
- <option value ="50">50</option>
- <option value ="100">100</option>
- <option value ="250">250</option>
- <option value ="500">500</option>
- <option value ="700">750</option>
- <option value ="1000">1000</option>
- </select></li>
- <li><label for="criteria">By: </label><select name="Criteria" id="criteria">
- <option value ="" selected="selected">None</option>
- <option value ="homebranch">Library</option>
- <option value ="itype">Itemtype</option>
- </select></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" disabled="disabled" /><!-- FIXME: Not implemented -->
- <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 CGIextChoic IN CGIextChoice %]
- <option value="[% CGIextChoic.type %]">[% CGIextChoic.type %]</option>
- [% END %]
- </select>
- [% CGIsepChoice %]
- </li>
-</ol>
- </fieldset>
+ [% FOREACH looptable IN mainloo.looptables %]
+ <div class="page-section">
+ <h3>
+ [% IF ( group_by=="itype" ) %]
+ <a id="table[% looptable.coltitle | html %]" >[% ItemTypes.GetDescription( looptable.coltitle ) | html %]</a>
+ [% ELSIF ( group_by=="homebranch" ) %]
+ <a id="table[% looptable.coltitle | html %]" >[% Branches.GetName( looptable.coltitle ) | html %]</a>
+ [% ELSE %]
+ Ungrouped
+ [% END %]
+ </h3>
+ <table>
+ <tr>
+ <th>#</th>
+ <th>Call number</th>
+ <th>Barcode</th>
+ <th>Item details</th>
+ </tr>
+ [% IF ( looptable.looprow ) %]
+ [% FOREACH loopro IN looptable.looprow %]
+ <tr>
+ <td>[% loop.count | html %]</td>
+ <td>[% IF ( loopro.itemcallnumber ) %][% loopro.itemcallnumber | html %][% ELSE %]No call number[% END %]</td>
+ <td>[% IF ( loopro.barcode ) %][% loopro.barcode | html %][% ELSE %]No barcode[% END %]</td>
+ <td>
+ <p><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% loopro.biblionumber | uri %]">[% IF ( loopro.title ) %][% loopro.title | html %][% ELSE %]NO TITLE[% END %]</a> [% IF ( loopro.author ) %] by [% loopro.author | html %][% END %]</p>
+ [% IF ( loopro.branch ) %]at [% Branches.GetName( loopro.branch ) | html %][% END %]
+ </td>
+ </tr>
+ [% END %]
+ [% ELSE %]
+ <tr>
+ <td colspan="4">No items for [% looptable.coltitle | html %]</td>
+ </tr>
+ [% END %]
+ </table>
+ </div>
+ [% END %]
+ [% END %]
+ [% ELSE %]
- <fieldset class="action">
- <input type="submit" value="Submit" />
- <input type="hidden" name="report_name" value="[% report_name %]" />
- <input type="hidden" name="do_it" value="1" />
- </fieldset>
- </form>
-[% END %]
+ <h1>Items with no checkouts</h1>
+
+ <form method="post" action="/cgi-bin/koha/reports/catalogue_out.pl">
+ <fieldset class="rows">
+ <ol>
+ <li>
+ <label for="branch">Library: </label>
+ <select name="Filter" id="branch">
+ <option value="">Any library</option>
+ [% PROCESS options_for_libraries libraries => Branches.all() %]
+ </select>
+ </li>
+ <li>
+ <label for="documenttype">Item type: </label>
+ <select name="Filter" id="documenttype">
+ <option value="">Any item type</option>
+ [% FOREACH itemtype IN itemtypes %]
+ <option value="[% itemtype.itemtype | html %]">[% itemtype.translated_description | html %]</option>
+ [% END %]
+ </select>
+ </li>
+ </ol>
+ </fieldset>
+
+ <fieldset class="rows">
+ <legend>Limits</legend>
+ <ol>
+ <li>
+ <label for="numberlimit">Limit to: </label>
+ <select name="Limit" id="numberlimit">
+ <option value ="10">10</option>
+ <option value ="20">20</option>
+ <option value ="50">50</option>
+ <option value ="100">100</option>
+ <option value ="200">200</option>
+ <option value ="300">300</option>
+ <option value ="400">400</option>
+ <option value ="500">500</option>
+ <option value ="1000">1000</option>
+ </select>
+ </li>
+ <li>
+ <label for="criteria">By: </label>
+ <select name="Criteria" id="criteria">
+ <option value ="" selected="selected">None</option>
+ <option value ="homebranch">Library</option>
+ <option value ="itype">Item type</option>
+ </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" />
+ <input type="hidden" name="output" value="screen" />
+ </fieldset>
+ </form>
+ [% END %]
+
+ </main>
+ </div> <!-- /.col-sm-10.col-sm-push-2 -->
+ <div class="col-sm-2 col-sm-pull-10">
+ <aside>
+ [% INCLUDE 'reports-menu.inc' %]
+ </aside>
+ </div> <!-- /.col-sm-2.col-sm-pull-10 -->
+</div> <!-- /.row -->
-</div>
-</div>
-<div class="yui-b">
-[% INCLUDE 'reports-menu.inc' %]
-</div>
-</div>
[% INCLUDE 'intranet-bottom.inc' %]