Fix for Bug 4250, cart missing print button
authorOwen Leonard <oleonard@myacpl.org>
Wed, 24 Feb 2010 16:38:36 +0000 (11:38 -0500)
committerGalen Charlton <gmcharlt@gmail.com>
Fri, 16 Apr 2010 04:00:51 +0000 (00:00 -0400)
- Print button was hidden by CSS for some reason (git blame me)
- Print formatting was off because of column mismatch
- Table style modified in print view for clarity
- Redirect from print view corrected by adding missing bib_list
  and verbose parameters

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
koha-tmpl/opac-tmpl/prog/en/css/opac.css
koha-tmpl/opac-tmpl/prog/en/css/print.css
koha-tmpl/opac-tmpl/prog/en/modules/opac-basket.tmpl
opac/opac-basket.pl

index b590473..bd072fb 100644 (file)
@@ -459,7 +459,6 @@ a .term {
 
 #toolbar a.print {
        background: transparent url(../../images/print-small.png) 5px 50% no-repeat;
-       display : none;
        text-decoration : none;
        padding-left : 23px;
 }
index cdb4d4c..85df351 100644 (file)
@@ -145,13 +145,28 @@ body#basket a {
        font-weight : bold;
 }
 
-body#basket table, body#basket td, body#basket th {
+body#basket table {
+       border-top : 1px solid #EEE;
+       border-left : 1px solid #EEE;
+}
+body#basket td,
+body#basket th {
        background-color : transparent;
-       border : 0;
        padding : 2px;
 }
 
 body#basket th {
+       background-color : #EEE;
+}
+
+body#basket th,
+body#basket th[scope=col] {
+       text-align : center;
+       vertical-align : middle;
+}
+
+body#basket th[scope=row] {
+       font-size : 89%;
        text-align : right;
        vertical-align : top;
        width : 10%;
index 78bb779..4eb2909 100644 (file)
@@ -4,6 +4,15 @@
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 <link rel="shortcut icon" href="<!-- TMPL_VAR NAME="themelang" -->/includes/favicon.ico" type="image/x-icon" />
 <meta http-equiv="Content-Language" content="en-us" />
+<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/jquery.js"></script>
+    <script type="text/javascript">
+    //<![CDATA[
+    $(document).ready(function(){
+        print();
+        location.href="/cgi-bin/koha/opac-basket.pl?bib_list=<!-- TMPL_VAR NAME="bib_list" --><!-- TMPL_IF NAME="verbose" -->&verbose=1<!-- /TMPL_IF -->";
+    });
+    //]]>
+    </script>
 <style type="text/css">
     @import url(<!-- TMPL_VAR NAME="themelang" -->/css/print.css);
 </style>
        <script type="text/javascript">
        //<![CDATA[
 
-$(document).ready(function()
-    {
-        $("#itemst").tablesorter({
-                        headers: { 0: { sorter: false }}
-                });
-    }
-);
+$(document).ready(function(){
+    $("#itemst").tablesorter({
+        headers: { 0: { sorter: false }}
+    });
+});
 
 <!-- TMPL_IF NAME="TagsEnabled" -->
 var MSG_NO_TAG_SPECIFIED = _("No tag was specified.");
@@ -109,13 +116,13 @@ function tagAdded() {
        </script>
        <!-- /TMPL_IF -->
 </head>
-<!-- TMPL_IF NAME="print_basket" --><body id="basket" onload="print();history.back();"><!-- TMPL_ELSE --><body id="basket"><!-- /TMPL_IF -->
+<body id="basket">
 
 <div id="doc" class="yui-t7">
 <div class="container">
-<!-- TMPL_UNLESS NAME="print_basket" -->
 <h1>Your Cart</h1>
 
+<!-- TMPL_UNLESS NAME="print_basket" -->
 <div id="toolbar">
 <ul>
        <li><!-- TMPL_IF NAME="verbose" --><a href="opac-basket.pl" class="brief" onclick="showLess(); return false;">Brief Display</a><!-- TMPL_ELSE --><a href="opac-basket.pl" class="detail" onclick="showMore(); return false;">More Details</a><!-- /TMPL_IF --></li>
@@ -320,11 +327,11 @@ function tagAdded() {
        <input id="tagsel_button" name="tagsel_button" class="input tagsel_button" title="tagsel_button" type="submit" value="Add"  style="display:inline"/>
        <a href="#" id="tagsel_cancel" onclick="tagCanceled(); return false;" style="display:inline">Cancel</a>
      </span>
-<!-- /TMPL_UNLESS -->
 </p>
+<!-- /TMPL_UNLESS -->
     <table id="itemst">
        <thead><tr>
-           <th>&nbsp;</th>
+           <!-- TMPL_UNLESS NAME="print_basket" --><th>&nbsp;</th><!-- /TMPL_UNLESS -->
            <th>Title</th>
            <th>Author</th>
            <th>Year</th>
@@ -370,13 +377,11 @@ function tagAdded() {
     </table></form>
 <!-- /TMPL_IF -->
 
-<!-- TMPL_IF NAME="print_basket" -->
-<a href="#back" class="screen">&lt;&lt; Back to Cart</a>
-<!-- TMPL_ELSE -->
+<!-- TMPL_UNLESS NAME="print_basket" -->
 <form name="myform" action="opac-basket.pl" method="get">
     <input type="hidden" name="records" id="records" />
 </form>
-<!-- /TMPL_IF -->
+<!-- /TMPL_UNLESS -->
 
 </div>
 </div>
index 26e2e17..9562d2f 100755 (executable)
@@ -115,6 +115,7 @@ my $resultsarray = \@results;
 # my $itemsarray=\@items;
 
 $template->param(
+    bib_list => $bib_list,
     BIBLIO_RESULTS => $resultsarray,
 );