Bug 9456: (follow-up) remove whitespaces and tab
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / basket / basket.tt
index 9989194..16a81e0 100644 (file)
@@ -3,15 +3,17 @@
     [% IF ( print_basket ) %]
 
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<link rel="shortcut icon" href="[% IF ( IntranetFavicon ) %][% IntranetFavicon %][% ELSE %][% themelang %]/includes/favicon.ico[% END %]" type="image/x-icon" />
+<link rel="shortcut icon" href="[% IF ( IntranetFavicon ) %][% IntranetFavicon %][% ELSE %][% interface %]/[% theme %]/img/favicon.ico[% END %]" type="image/x-icon" />
 <meta http-equiv="Content-Language" content="en-us" />
 <style type="text/css">
     @import url([% themelang %]/css/print.css);
 </style>
     [% ELSE %][% INCLUDE 'doc-head-close.inc' %]
        <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
-       <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
-       <script type="text/javascript">
+<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
+<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.dataTables.min.js"></script>
+[% INCLUDE 'datatables-strings.inc' %]
+<script type="text/javascript" src="[% themelang %]/js/datatables.js"></script><script type="text/javascript">
        //<![CDATA[
 
 function placeHold () {
@@ -40,9 +42,8 @@ function placeHold () {
     window.close();
 }
 
-
-
        $(document).ready(function(){
+                $("#items-popover").popover();
                $("#CheckAll").click(function(){
                var checked = [];
                $("#bookbag_form").checkCheckboxes("*", true).each(
@@ -64,29 +65,18 @@ function placeHold () {
         $(".holdsep").text("| ");
         $(".hold").text(_("Place Hold"));
         $("#downloadcartc").empty();
-        yuiToolbar();
-        $("#itemst").tablesorter({
-            headers: { 0: { sorter: false }}
-        });
-       });
 
-function yuiToolbar() {
-    var downloadmenu = [
-    { text: _("iso2709"), url: "/cgi-bin/koha/basket/downloadcart.pl?format=iso2709&bib_list=[% bib_list %]" },
-    { text: _("RIS"), url: "/cgi-bin/koha/basket/downloadcart.pl?format=ris&bib_list=[% bib_list %]" },
-    { text: _("BibTex"), url: "/cgi-bin/koha/basket/downloadcart.pl?format=bibtex&bib_list=[% bib_list %]" },
-[% FOREACH csv_profile IN csv_profiles %]
-    { text: _("CSV - [% csv_profile.profile %]"), url: "/cgi-bin/koha/basket/downloadcart.pl?format=[% csv_profile.export_format_id %]&bib_list=[% bib_list %]" },
-[% END %]
-    ];
-    new YAHOO.widget.Button({
-        type: "menu",
-        label: _("Download"),
-        name: "downloadmenubutton",
-        menu: downloadmenu,
-        container: "downloadcartc"
-    });
-}
+        $("#itemst").dataTable($.extend(true, {}, dataTablesDefaults, {
+            "sDom": 't',
+            "aoColumnDefs": [
+                { "aTargets": [ 0 ], "bSortable": false, "bSearchable": false },
+                { "aTargets": [ 3 ], "sType": 'callnumbers' },
+            ],
+            "aaSorting": [[ 1, "asc" ]],
+            "bPaginate": false
+        }));
+
+       });
        //]]>
        </script>
        [% END %]
@@ -98,37 +88,23 @@ function yuiToolbar() {
 [% UNLESS ( print_basket ) %]
 <h1>Your cart</h1>
 
-<div id="toolbar">
-<ul class="toolbar">
-       <li>
-           <span id="addchild" class="yui-button yui-link-button"><span class="first-child">
-        [% IF ( verbose ) %]<a href="basket.pl" class="brief" onclick="showLess(); return false;">Brief display</a>[% ELSE %]<a href="basket.pl" class="detail" onclick="showMore(); return false;">More details</a>[% END %]
-           </span></span>
-       </li>
-       <li>
-           <span id="receive" class="yui-button yui-link-button"><span class="first-child">
-               <a class="send" href="basket.pl" onclick="sendBasket(); return false;">Send</a>
-           </span></span>
-       </li>
-    <li id="downloadcartc">
-        <a href="#" id="downloadcart">Download</a>
-    </li>
-       <li>
-           <span id="printmenuc" class="yui-button yui-link-button"><span class="first-child">
-               <a class="print" href="basket.pl" onclick="printBasket(); return false;">Print</a>
-           </span></span>
-       </li>
-       <li>
-           <span id="delete" class="yui-button yui-link-button"><span class="first-child">
-        <a class="empty" href="basket.pl" onclick="delBasket('popup'); return false;">Empty and close</a>
-           </span></span>
-       </li>
-       <li>
-           <span id="hide" class="yui-button yui-link-button"><span class="first-child">
-        <a class="hide close" href="basket.pl">Hide window</a>
-           </span></span>
-       </li>
-</ul>
+<div id="toolbar" class="btn-toolbar">
+    [% IF ( verbose ) %]<a href="basket.pl" class="btn btn-small" onclick="showLess(); return false;"><i class="icon-zoom-out"></i> Brief display</a>[% ELSE %]<a href="basket.pl" class="btn btn-small" onclick="showMore(); return false;"><i class="icon-zoom-in"></i> More details</a>[% END %]
+    <a class="btn btn-small" href="basket.pl" onclick="sendBasket(); return false;"><i class="icon-envelope"></i> Send</a>
+    <div class="btn-group">
+        <a class="btn btn-small dropdown-toggle" data-toggle="dropdown" href="#" id="downloadcart"><i class="icon-download-alt"></i> Download <span class="caret"></span> </a>
+        <ul class="dropdown-menu">
+            <li><a href="/cgi-bin/koha/basket/downloadcart.pl?format=iso2709&amp;bib_list=[% bib_list %]">iso2709</a></li>
+            <li><a href="/cgi-bin/koha/basket/downloadcart.pl?format=ris&amp;bib_list=[% bib_list %]">RIS</a></li>
+            <li><a href="/cgi-bin/koha/basket/downloadcart.pl?format=bibtex&amp;bib_list=[% bib_list %]">BibTex</a></li>
+        [% FOREACH csv_profile IN csv_profiles %]
+            <li><a href="/cgi-bin/koha/basket/downloadcart.pl?format=[% csv_profile.export_format_id %]&amp;bib_list=[% bib_list %]">CSV - [% csv_profile.profile %]</a></li>
+        [% END %]
+        </ul>
+    </div>
+    <a class="btn btn-small" href="basket.pl" onclick="printBasket(); return false;"><i class="icon-print"></i> Print</a>
+    <a class="btn btn-small" href="basket.pl" onclick="delBasket('popup'); return false;"><i class="icon-trash"></i> Empty and close</a>
+    <a class="btn btn-small close" href="basket.pl"><i class="icon-remove-sign"></i> Hide window</a>
 </div>
         [% END %]
 
@@ -313,23 +289,19 @@ function yuiToolbar() {
      | <a href="#" onclick="placeHold(); return false;">Place hold</a>
 [% END %]
 
-
 [% END %]
+
 </p>
     <table id="itemst">
        <thead><tr>
            [% UNLESS ( print_basket ) %]<th>&nbsp;</th>[% END %]
            <th>Title</th>
         <th>Item type</th>
-           <th>Location</th>
+        <th><a id="items-popover" href="#" data-trigger="hover" data-toggle="popover" data-placement="top" title="Item sorting" data-content="Items are sorted by the highest or lowest callnumber in a group of items respectively.">Items</a></th>
         </tr></thead>
 
         [% FOREACH BIBLIO_RESULT IN BIBLIO_RESULTS %]
-            [% IF ( BIBLIO_RESULT.even ) %]
-                <tr class="highlight">
-            [% ELSE %]
                 <tr>
-            [% END %]
             [% UNLESS ( print_basket ) %]<td>
                         <input type="checkbox" value="[% BIBLIO_RESULT.biblionumber %]" name="bib[% BIBLIO_RESULT.biblionumber %]" id="bib[% BIBLIO_RESULT.biblionumber %]" onclick="selRecord(value,checked);" />
 
@@ -351,14 +323,15 @@ function yuiToolbar() {
 
                                                </td>
             <td>[% BIBLIO_RESULT.description %]</td>
-                <td>[% IF ( BIBLIO_RESULT.ITEM_RESULTS ) %][% FOREACH ITEM_RESULT IN BIBLIO_RESULT.ITEM_RESULTS %]
-                    <p>
-                        [% ITEM_RESULT.branchname %] [% ITEM_RESULT.location_description %]
-                        [% IF ( ITEM_RESULT.itemcallnumber ) %]
-                            ([% ITEM_RESULT.itemcallnumber %])
-                        [% END %]
-                    </p>
-                    [% END %][% ELSE %]This record has no items.[% END %]</td>
+            <td>
+                [% IF ( BIBLIO_RESULT.ITEM_RESULTS ) %]
+                    [% FOREACH ITEM_RESULT IN BIBLIO_RESULT.ITEM_RESULTS %]
+                        <div><span class="nowrap"><strong><span class="callnumber">[% ITEM_RESULT.itemcallnumber %]</span></strong> [% ITEM_RESULT.branchname %] <span class="shelvingloc inline">[% ITEM_RESULT.location_description %]</span></span></div>
+                    [% END %]
+                [% ELSE %]
+                    This record has no items.
+                [% END %]
+            </td>
             </tr>
         [% END %]
     </table></form>