Bug 25798: Add copyright year to "Holds to pull" report
[koha-ffzg.git] / koha-tmpl / intranet-tmpl / prog / en / modules / circ / pendingreserves.tt
index b37fdd5..af6c811 100644 (file)
@@ -1,7 +1,8 @@
+[% USE raw %]
 [% USE Asset %]
 [% USE Koha %]
 [% USE KohaDates %]
-[% USE ColumnsSettings %]
+[% USE TablesSettings %]
 [% USE AuthorisedValues %]
 [%- USE Branches -%]
 [%- USE ItemTypes -%]
@@ -9,7 +10,6 @@
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Circulation &rsaquo; Holds to pull</title>
 [% INCLUDE 'doc-head-close.inc' %]
-[% Asset.css("css/datatables.css") %]
 </head>
 
 <body id="circ_pendingreserves" class="circ">
 
 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a> &rsaquo; Holds to pull</div>
 
-<div id="doc3" class="yui-t2">
+<div class="main container-fluid">
+    <div class="row">
+        <div class="col-sm-10 col-sm-push-2">
+            <main>
 
-   <div id="bd">
-    <div id="yui-main">
-    <div class="yui-b">
         [% FOR m IN messages %]
-            <div class="dialog [% m.type %]">
+            <div class="dialog [% m.type | html %]">
                 [% SWITCH m.code %]
                 [% CASE 'letter_enqueued' %]
                     <span>The notice has been correctly enqueued.</span>
@@ -38,7 +38,7 @@
                 [% CASE 'hold_placed_at_biblio_level' %]
                     <span>The hold has been placed on biblio level. It is not possible to determine the item to mark as lost.</span>
                 [% CASE %]
-                    [% m.code %]
+                    [% m.code | html %]
                 [% END %]
             </div>
         [% END %]
@@ -46,7 +46,7 @@
 <h2>Holds to pull placed between [% from | $KohaDates %] and [% to | $KohaDates %]</h2>
 <h3>Reported on [% todaysdate | $KohaDates %]</h3>
 <p>The following holds have not been filled. Please retrieve them and check them in.</p>
-<div class="searchresults">
+<div id="searchresults">
     [% IF ( reserveloop ) %]
     <table id="holdst">
     <thead>
@@ -54,7 +54,7 @@
         <th>Pull this many items</th>
         <th>Items available</th>
         <th>Patrons with holds</th>
-        <th>First patron</td>
+        <th>First patron</th>
         <th class="anti-the">Title</th>
         <th class="string-sort">Libraries</th>
         <th>Available call numbers</th>
         [% FOREACH reserveloo IN reserveloop %]
         <tr>
         [% IF ( reserveloo.borrowernumber ) %]
-            <td><p><b>[% reserveloo.pullcount %]</b></p></td>
-            <td>[% reserveloo.count %]</td>
-            <td>[% reserveloo.rcount %]</td>
-            <td><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% reserveloo.borrowernumber %]">[% reserveloo.firstname %] [%reserveloo.surname %]</a></td>
+            <td><p><b>[% reserveloo.pullcount | html %]</b></p></td>
+            <td>[% reserveloo.count | html %]</td>
+            <td>[% reserveloo.rcount | html %]</td>
+            <td><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% reserveloo.borrowernumber | uri %]">[% reserveloo.firstname | html %] [% reserveloo.surname | html %]</a></td>
             <td>
             <p>
                 [% INCLUDE 'biblio-default-view.inc' biblionumber = reserveloo.biblionumber %]
-                [% reserveloo.title |html %] [% FOREACH s IN reserveloo.subtitle %] [% s %][% END %]</a></p>
-                [% IF ( reserveloo.author ) %]<p> by [% reserveloo.author %]</p>[% END %]
+                    [% INCLUDE 'biblio-title.inc' biblio=reserveloo %]
+                </a></p>
+                [% IF ( reserveloo.author ) %]<p> by [% reserveloo.author | html %]</p>[% END %]
+                [% IF ( reserveloo.editionstatement ) %]<p>[% reserveloo.editionstatement | html %]</p>[% END %]
+                [% IF ( reserveloo.publicationyear ) %]<p>[% reserveloo.publicationyear | html %]</p>[% END %]
             </td>
         [% ELSE %]
             <td>"</td>
             <td>"</td>
         [% END %]
         <td>
-            [% FOREACH holdingbranch IN reserveloo.holdingbranches %]
-                [% Branches.GetName ( holdingbranch ) %]
+            [% IF ( reserveloo.holdingbranches ) %]
+               <ul>
+                    [% FOREACH holdingbranch IN reserveloo.holdingbranches %]
+                        <li>
+                            [% Branches.GetName ( holdingbranch ) | html %]
+                        </li>
+                    [% END %]
+               </ul>
+            [% END %]
+        </td>
+        <td>
+            [% IF ( reserveloo.itemcallnumber ) %]
+                <ul>
+                    [% FOREACH itemcallnumber IN reserveloo.itemcallnumber  %]
+                        <li>
+                            [% itemcallnumber | html %]
+                        </li>
+                    [% END %]
+                </ul>
+            [% END %]
+        </td>
+        <td>
+            [% IF ( reserveloo.copyno ) %]
+                <ul>
+                    [% FOREACH copyno IN reserveloo.copyno %]
+                        <li>
+                            [% copyno | html %]
+                        </li>
+                    [% END %]
+                </ul>
+            [% END %]
+        </td>
+        <td>
+            [% IF ( reserveloo.enumchron ) %]
+                <ul>
+                    [% FOREACH enumchron IN reserveloo.enumchron %]
+                        <li>
+                            [% enumchron | html %]
+                        </li>
+                    [% END %]
+                </ul>
             [% END %]
         </td>
-        <td><p>[% reserveloo.itemcallnumber %]</p></td>
-        <td><p>[% reserveloo.copyno %]</p></td>
-        <td><p>[% reserveloo.enumchron %]</p></td>
         <td>
         [% FOREACH itemType IN reserveloo.itemTypes %]
-            [% ItemTypes.GetDescription( itemType ) %]
+            [% ItemTypes.GetDescription( itemType ) | html %]
         [% END %]
         </td>
         <td>
         [% FOREACH loc IN reserveloo.locations %]
-            [% AuthorisedValues.GetByCode('LOC', loc) %]
+            [% AuthorisedValues.GetByCode('LOC', loc) | html %]
         [% END %]
         </td>
         <td>
-            <span title="[% reserveloo.reservedate %]">[% reserveloo.reservedate | $KohaDates %] in [% Branches.GetName ( reserveloo.branch ) %]</span>
+            <span title="[% reserveloo.reservedate | html %]">[% reserveloo.reservedate | $KohaDates %] in [% Branches.GetName ( reserveloo.branch ) | html %]</span>
         </td>
         <td>
             <form name="cancelReserve" action="/cgi-bin/koha/circ/pendingreserves.pl" method="post">
                 <input type="hidden" name="op" value="cancel_reserve" />
-                <input type="hidden" name="reserve_id" value="[% reserveloo.reserve_id %]" />
+                <input type="hidden" name="reserve_id" value="[% reserveloo.reserve_id | html %]" />
                 [% IF reserveloo.holdingbranch != reserveloo.homebranch %]
-                    <input type="submit" value="Cancel hold and return to : [% Branches.GetName( reserveloo.homebranch ) %]" />
+                    <input type="submit" value="Cancel hold and return to : [% Branches.GetName( reserveloo.homebranch ) | html %]" />
                 [% ELSE %]
                     <input type="submit" value="Cancel hold" />
                 [% END %]
         [% IF Koha.Preference('CanMarkHoldsToPullAsLost') != 'do_not_allow' %]
             [% IF reserveloo.itemnumber %]
                 <form name="cancelReserve" action="/cgi-bin/koha/circ/pendingreserves.pl" method="post">
-                    <input type="hidden" name="reserve_id" value="[% reserveloo.reserve_id %]" />
+                    <input type="hidden" name="reserve_id" value="[% reserveloo.reserve_id | html %]" />
                     [% IF Koha.Preference('CanMarkHoldsToPullAsLost') == 'allow' %]
                         <input type="hidden" name="op" value="mark_as_lost" />
                         <input type="submit" value="Mark item as lost" />
                 <span>Biblio level hold.</span>
             [% END %]
         [% END %]
+            </td>
         </tr>
         [% END %]
     </tbody>
         <td><input type="text" class="filter" data-column_num="6" placeholder="Call number" style="width:95%"/></td>
         <td><input type="text" class="filter" data-column_num="7" placeholder="Available copy" style="width:95%"/></td>
         <td><input type="text" class="filter" data-column_num="8" placeholder="Available enumeration" style="width:95%"/></td>
-        <td id="type-filter"></td>
+        <td id="itemtype-filter"></td>
         <td id="locationfilter"></td>
         <td></td>
         <td></td>
     [% END %]
 </div>
 
-</div>
-</div>
-<div class="yui-b">
+
+            </main>
+        </div> <!-- /.col-sm-10.col-sm-push-2 -->
+
+        <div class="col-sm-2 col-sm-pull-10">
+            <aside>
+
 <div id="filters">
 
 <form action="/cgi-bin/koha/circ/pendingreserves.pl" method="post" >
 </ol>
 
 [% IF ( HoldsToPullEndDate ) %]
-    <p><i>(Inclusive, default is [% HoldsToPullStartDate %] days ago to [% HoldsToPullEndDate %] days ahead. Set other date ranges as needed.)</i></p>
+    <p><i>(Inclusive, default is [% HoldsToPullStartDate | html %] days ago to [% HoldsToPullEndDate | html %] days ahead. Set other date ranges as needed.)</i></p>
 [% ELSE %]
-    <p><i>(Inclusive, default is [% HoldsToPullStartDate %] days ago to today. Set other date ranges as needed.)</i></p>
+    <p><i>(Inclusive, default is [% HoldsToPullStartDate | html %] days ago to today. Set other date ranges as needed.)</i></p>
 [% END %]
 
 <fieldset class="action"><input type="submit" name="run_report" value="Submit" class="submit"/></fieldset>
 </form>
 
 </div>
-</div>
-</div>
+            </aside>
+        </div> <!-- /.col-sm-2.col-sm-pull-10 -->
+     </div> <!-- /.row -->
 
 [% MACRO jsinclude BLOCK %]
     [% INCLUDE 'calendar.inc' %]
     [% INCLUDE 'datatables.inc' %]
     [% INCLUDE 'columns_settings.inc' %]
-    <script type="text/javascript">
+    <script>
         $(document).ready(function() {
-          var columns_settings = [% ColumnsSettings.GetColumns('circ', 'holds', 'holds-to-pull', 'json') %];
+          var columns_settings = [% TablesSettings.GetColumns('circ', 'holds', 'holds-to-pull', 'json') | $raw %];
           var holdst = KohaTable("holdst", {
             "aoColumnDefs": [
                 { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
           function createSelect( data ) {
               data = separateData(data);
               var r='<select style="width:99%"><option value="">' + _("None") + '</option>', i, len=data.length;
+              var regex = /(<([^>]+)>)/ig; // Remove html tags
               for ( i=0 ; i<len ; i++ ) {
-                  r += '<option value="'+data[i]+'">'+data[i]+'</option>';
+                  var cell_val = data[i].replace(regex, '');
+                  if ( cell_val.length < 1 ) continue;
+                  r += '<option value="'+cell_val+'">'+cell_val+'</option>';
               }
               return r+'</select>';
           }
                   holdst.fnFilter( filter_value, 5, true );
               });
           });
-          $("#type-filter").each( function () {
+          $("#itemtype-filter").each( function () {
               $(this).html( createSelect( holdst.fnGetColumnData(9) ) );
               $('select', this).change( function () {
                   holdst.fnFilter( $(this).val(), 9 );