Adding checks for dateformat preference so that tablesorter script can be passed...
authorOwen Leonard <oleonard@myacpl.org>
Mon, 12 May 2008 12:58:00 +0000 (07:58 -0500)
committerJoshua Ferraro <jmf@liblime.com>
Mon, 12 May 2008 15:06:32 +0000 (10:06 -0500)
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
19 files changed:
circ/circulation.pl
circ/pendingreserves.pl
circ/transferstodo.pl
circ/transferstoreceive.pl
circ/waitingreserves.pl
koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl
koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tmpl
koha-tmpl/intranet-tmpl/prog/en/modules/circ/transferstodo.tmpl
koha-tmpl/intranet-tmpl/prog/en/modules/circ/transferstoreceive.tmpl
koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tmpl
koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tmpl
koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/acceptorreject.tmpl
koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tmpl
koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tmpl
members/moremember.pl
opac/opac-topissues.pl
opac/opac-user.pl
suggestion/acceptorreject.pl
tools/koha-news.pl

index 9904e62..0b660de 100755 (executable)
@@ -702,7 +702,8 @@ $template->param( picture => 1 ) if $picture;
 
 $template->param(
     SpecifyDueDate           => C4::Context->preference("SpecifyDueDate"),
-    CircAutocompl            => C4::Context->preference("CircAutocompl") ,
+    CircAutocompl            => C4::Context->preference("CircAutocompl"),
+       dateformat            => C4::Context->preference("dateformat"),
     DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(),
 );
 output_html_with_http_headers $query, $cookie, $template->output;
index 0a6fa2f..0423052 100755 (executable)
@@ -259,6 +259,7 @@ $template->param(
     reserveloop        => \@reservedata,
     "BiblioDefaultView".C4::Context->preference("BiblioDefaultView") => 1,
     DHTMLcalendar_dateformat =>  C4::Dates->DHTMLcalendar(),
+       dateformat    => C4::Context->preference("dateformat"),
 );
 
 output_html_with_http_headers $input, $cookie, $template->output;
index 340dc34..1837e33 100755 (executable)
@@ -129,6 +129,7 @@ foreach my $br ( keys %$branches ) {
 $template->param(
     branchesloop => \@branchesloop,
     show_date    => format_date(C4::Dates->today('iso')),
+       dateformat    => C4::Context->preference("dateformat"),
 );
 
 output_html_with_http_headers $input, $cookie, $template->output;
index 0917292..f148dd5 100755 (executable)
@@ -125,6 +125,7 @@ foreach my $br ( keys %$branches ) {
 $template->param(
     branchesloop => \@branchesloop,
     show_date    => format_date(C4::Dates->today('iso')),
+       dateformat    => C4::Context->preference("dateformat"),
 );
 
 output_html_with_http_headers $input, $cookie, $template->output;
index 574edca..01b4df0 100755 (executable)
@@ -159,6 +159,7 @@ foreach my $num (@getreserves) {
 $template->param(
     reserveloop => \@reservloop,
     show_date   => format_date(C4::Dates->today('iso')),
+       dateformat   => C4::Context->preference("dateformat"),
 );
 
 output_html_with_http_headers $input, $cookie, $template->output;
index 219166b..0f3dee9 100755 (executable)
@@ -17,14 +17,15 @@ $.tablesorter.addParser({
         $(document).ready(function() {
                $('#patronlists > ul').tabs();
                $.tablesorter.defaults.widgets = ['zebra']; 
-               $("#issuest").tablesorter({
-//             sortList: [[0,0]], don't sort by default to preserve 'previous checkouts' header
+               $("#issuest").tablesorter({<!-- TMPL_IF EXPR="dateformat eq 'metric'" -->
+               dateFormat: 'uk',<!-- /TMPL_IF -->
                headers: { 1: { sorter: 'articles' },4:{sorter:false},5: { sorter: false },6:{sorter:false}}
                });
                $("#issuest").bind("sortEnd",function() {
                $("#previous").parents("tr").remove();  // 'previous checkouts' header chokes table sorter
            }); 
-               $("#holdst").tablesorter({
+               $("#holdst").tablesorter({<!-- TMPL_IF EXPR="dateformat eq 'metric'" -->
+               dateFormat: 'uk',<!-- /TMPL_IF -->
                        sortList: [[0,0]],
                        headers: { 1: { sorter: 'articles' }}
                }); 
index 74cba1c..7fd76b2 100644 (file)
@@ -20,7 +20,8 @@ $.tablesorter.addParser({
         $(document).ready(function() {
                $("th a").hide();
                $.tablesorter.defaults.widgets = ['zebra'];
-               $("#holdst").tablesorter({
+               $("#holdst").tablesorter({<!-- TMPL_IF EXPR="dateformat eq 'metric'" -->
+               dateFormat: 'uk',<!-- /TMPL_IF -->
                        sortList: [[3,0]],
                        headers: { 0:{sorter:false},1:{sorter:false},3: { sorter: 'articles' },7:{sorter:false}}
                }); 
index 3b25d5a..64333b1 100644 (file)
@@ -11,11 +11,14 @@ $.tablesorter.addParser({
     type: 'text' 
 });
         $(document).ready(function() {
+        <!-- TMPL_LOOP NAME="branchesloop" -->
                $.tablesorter.defaults.widgets = ['zebra']; 
-               $("#transferst").tablesorter({
+               $("#transferst<!-- TMPL_VAR NAME="branchcode" -->").tablesorter({<!-- TMPL_IF EXPR="dateformat eq 'metric'" -->
+               dateFormat: 'uk',<!-- /TMPL_IF -->
                        sortList: [[1,0]],
                        headers: { 1: { sorter: 'articles' },4:{sorter:false}}
                }); 
+       <!-- /TMPL_LOOP -->
         });
 //]]>
 </script>
@@ -39,7 +42,7 @@ $.tablesorter.addParser({
         <!-- TMPL_LOOP NAME="branchesloop" -->
             <!-- TMPL_IF NAME="branchcode" -->
                        <h4>Holds waiting for: <!-- TMPL_VAR NAME="branchname" --></h4>
-            <table id="transferst">
+            <table id="transferst<!-- TMPL_VAR NAME="branchcode" -->" style="width:100%;">
             <thead><tr>
                 <th>Date of hold</th>
                 <th>Title</th>
@@ -56,7 +59,7 @@ $.tablesorter.addParser({
 <a href="/cgi-bin/koha/catalogue/ISBDdetail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->"><!-- TMPL_VAR NAME="title" --></a>
 <!-- TMPL_ELSE -->
 <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->"><!-- TMPL_VAR NAME="title" -->  <!-- TMPL_VAR NAME="subtitle" --></a><!-- /TMPL_IF -->&nbsp; (<b><!-- TMPL_VAR NAME="itemtype" --> </b>) <br />Barcode : <!-- TMPL_VAR NAME="barcode" --></td>
-                    <td><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=<!--TMPL_VAR Name="borrowernum"-->"><!-- TMPL_VAR NAME="borrowername" --> &nbsp; <!-- TMPL_VAR NAME="borrowerfirstname" --></a><br />
+                    <td><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=<!--TMPL_VAR Name="borrowernum"-->"><!-- TMPL_VAR NAME="borrowername" -->, <!-- TMPL_VAR NAME="borrowerfirstname" --></a><br />
                             <!-- TMPL_VAR NAME="borrowerphone" --><br />
                             <!-- TMPL_IF NAME="borrowermail" -->
                                 <a href="mailto:<!-- TMPL_VAR NAME="email" -->?subject=Reservation: <!-- TMPL_VAR NAME="title" -->">
index 063e365..0a19f99 100644 (file)
@@ -11,11 +11,14 @@ $.tablesorter.addParser({
     type: 'text' 
 });
         $(document).ready(function() {
+            <!-- TMPL_LOOP NAME="branchesloop" -->
                $.tablesorter.defaults.widgets = ['zebra']; 
-               $("#transferst").tablesorter({
+               $("#transferst<!-- TMPL_VAR NAME="branchcode" -->").tablesorter({<!-- TMPL_IF EXPR="dateformat eq 'metric'" -->
+               dateFormat: 'uk',<!-- /TMPL_IF -->
                        sortList: [[1,0]],
                        headers: { 1: { sorter: 'articles' },4:{sorter:false}}
                }); 
+               <!-- /TMPL_LOOP -->
         });
 //]]>
 </script>
@@ -39,7 +42,7 @@ $.tablesorter.addParser({
             <div id="resultlist">
             <!-- TMPL_LOOP NAME="branchesloop" -->
                 <!-- TMPL_IF NAME="branchcode" -->
-                <table style="width: 100%" id="transferst">
+                <table style="width: 100%" id="transferst<!-- TMPL_VAR NAME="branchcode" -->">
                                <caption>Coming from <!-- TMPL_VAR NAME="branchname" --></caption>
                 <thead><tr>
                     <th>Date of transfer</th>
index 2b91306..ee7194c 100644 (file)
@@ -13,7 +13,8 @@ $.tablesorter.addParser({
         $(document).ready(function() {
                $("th a").hide();
                $.tablesorter.defaults.widgets = ['zebra'];
-               $("#holdst").tablesorter({
+               $("#holdst").tablesorter({<!-- TMPL_IF EXPR="dateformat eq 'metric'" -->
+               dateFormat: 'uk',<!-- /TMPL_IF -->
                        sortList: [[3,0]],
                        headers: { 1:{sorter:'articles'},3: { sorter: 'articles' },4:{sorter:false}}
                }); 
index c3baf79..e51cafd 100644 (file)
@@ -14,11 +14,13 @@ $.tablesorter.addParser({
 });
 $(document).ready(function() {
        $('#finesholdsissues > ul').tabs();
-       $("#issuest").tablesorter({
+       $("#issuest").tablesorter({<!-- TMPL_IF EXPR="dateformat eq 'metric'" -->
+               dateFormat: 'uk',<!-- /TMPL_IF -->
                sortList: [[1,0]],
                headers: { 1: { sorter: 'articles' },4:{sorter:false},5: { sorter: false },6:{sorter:false},7:{sorter:false}}
        }); 
-       $("#holdst").tablesorter({
+       $("#holdst").tablesorter({<!-- TMPL_IF EXPR="dateformat eq 'metric'" -->
+               dateFormat: 'uk',<!-- /TMPL_IF -->
                sortList: [[0,0]],
                headers: { 1: { sorter: 'articles' },6: { sorter: false }}
        }); 
index f749034..df9ab5f 100644 (file)
@@ -25,7 +25,8 @@
                    }
                });
                $.tablesorter.defaults.widgets = ['zebra'];
-               $("#acceptedt").tablesorter({
+               $("#acceptedt").tablesorter({<!-- TMPL_IF EXPR="dateformat eq 'metric'" -->
+               dateFormat: 'uk',<!-- /TMPL_IF -->
                        headers: { 0: { sorter: 'articles' },3:{sorter: false},4:{sorter: false},5:{sorter: false},6:{sorter: false},7:{sorter: false}}
                });
                $("#acceptedt").bind("sortStart",function() {
@@ -33,7 +34,8 @@
                }).bind("sortEnd",function() {
                        $("#sorting").hide();
                });
-               $("#pendingt").tablesorter({
+               $("#pendingt").tablesorter({<!-- TMPL_IF EXPR="dateformat eq 'metric'" -->
+               dateFormat: 'uk',<!-- /TMPL_IF -->
            headers: { 0: { sorter: 'articles' },3:{sorter: false},4:{sorter: false},5:{sorter: false},6:{sorter: false},7:{sorter: false}}
                });
                $("#pendingt").bind("sortStart",function() {
@@ -41,7 +43,8 @@
                }).bind("sortEnd",function() {
                        $("#sorting").hide();
                });
-               $("#rejectedt").tablesorter({
+               $("#rejectedt").tablesorter({<!-- TMPL_IF EXPR="dateformat eq 'metric'" -->
+               dateFormat: 'uk',<!-- /TMPL_IF -->
            headers: { 0: { sorter: 'articles' },3:{sorter: false},4:{sorter: false},5:{sorter: false},6:{sorter: false},7:{sorter: false}}
                });
                $("#rejectedt").bind("sortStart",function() {
index 7560f5c..3d9af53 100755 (executable)
@@ -5,7 +5,8 @@
 <script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/jquery.tablesorter.pack.js"></script>
 <script type="text/javascript">//<![CDATA[
 $(document).ready(function() {
-       $("#newst").tablesorter({
+       $("#newst").tablesorter({<!-- TMPL_IF EXPR="dateformat eq 'metric'" -->
+               dateFormat: 'uk',<!-- /TMPL_IF -->
                sortList: [[2,0]],
                headers: { 0: {sorter:false},6: { sorter: false },7: { sorter: false }}
        }); 
index 114b768..506f948 100644 (file)
@@ -15,13 +15,15 @@ $.tablesorter.addParser({
 });
             $(function() {
             $('#opac-user-views > ul').tabs();
-                       $("#holdst").tablesorter({
+                       $("#holdst").tablesorter({<!-- TMPL_IF EXPR="dateformat eq 'metric'" -->
+               dateFormat: 'uk',<!-- /TMPL_IF -->
                                widgets : ['zebra'],
                                sortList: [[0,0]],
                        headers: { 0: { sorter: 'articles' },4: { sorter: false }
                                }
                        }); 
-                       $("#checkoutst").tablesorter({
+                       $("#checkoutst").tablesorter({<!-- TMPL_IF EXPR="dateformat eq 'metric'" -->
+               dateFormat: 'uk',<!-- /TMPL_IF -->
                                widgets : ['zebra'],
                                <!-- TMPL_IF NAME="AmazonContent" -->
                                sortList: [[3,0]],
index f2dea4f..723bb74 100755 (executable)
@@ -357,6 +357,7 @@ $template->param(
     StaffMember                => ($category_type eq 'S'),
        is_child        => ($category_type eq 'C'),
        #                reserveloop     => \@reservedata,
+       dateformat    => C4::Context->preference("dateformat"),
 );
 
 output_html_with_http_headers $input, $cookie, $template->output;
index f47c138..3371d1d 100755 (executable)
@@ -120,6 +120,7 @@ foreach my $thisitemtype (keys %$itemtypes) {
 
 $template->param(
                  itemtypeloop =>\@itemtypeloop,
+                 dateformat    => C4::Context->preference("dateformat"),
                 );
 output_html_with_http_headers $input, $cookie, $template->output;
 
index 1e1bb93..f9aeb0c 100755 (executable)
@@ -225,6 +225,7 @@ $template->param(
        patronupdate => $patronupdate,
        OpacRenewalAllowed => C4::Context->preference("OpacRenewalAllowed"),
        userview => 1,
+       dateformat    => C4::Context->preference("dateformat"),
 );
 
 output_html_with_http_headers $query, $cookie, $template->output;
index c1c7dd5..3fed003 100755 (executable)
@@ -174,6 +174,7 @@ push @allsuggestions,{"suggestiontype"=>"rejected",
 $template->param(
     suggestions       => \@allsuggestions,
     "op_$op"                => 1,
+    dateformat    => C4::Context->preference("dateformat"),
 );
 
 output_html_with_http_headers $input, $cookie, $template->output;
index 5da0926..3730c10 100755 (executable)
@@ -117,5 +117,6 @@ else {
 }
 $template->param(
                                DHTMLcalendar_dateformat =>  C4::Dates->DHTMLcalendar(),
+                               dateformat    => C4::Context->preference("dateformat"),
                );
 output_html_with_http_headers $cgi, $cookie, $template->output;