Bug 8597: Improve template markup to prepare for mobile
authorFrederick Capovilla <frederick.capovilla@libeo.com>
Mon, 13 Aug 2012 00:06:30 +0000 (20:06 -0400)
committerPaul Poulain <paul.poulain@biblibre.com>
Tue, 18 Sep 2012 11:36:48 +0000 (13:36 +0200)
The templates were missing classes on a number of elements that
will need classes in order for a mobile view to function.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
koha-tmpl/opac-tmpl/prog/en/css/opac.css
koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt
koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tt
koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt
koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt

index 7a930cd..9611ff7 100644 (file)
@@ -2746,3 +2746,7 @@ ul.ui-tabs-nav li {
 .contents .r {
     display: inline;
 }
+
+.mobile_only {
+   display : none;
+}
index de97b5a..a77e468 100644 (file)
@@ -744,8 +744,8 @@ YAHOO.util.Event.onContentReady("furtherm", function () {
         [% END %]
         </tr></thead>
            <tbody>[% FOREACH ITEM_RESULT IN ITEM_RESULTS %]
-           <tr>[% IF ( item_level_itypes ) %]<td>[% UNLESS ( noItemTypeImages ) %][% IF ( ITEM_RESULT.imageurl ) %]<img src="[% ITEM_RESULT.imageurl %]" title="[% ITEM_RESULT.description %]" alt="[% ITEM_RESULT.description %]" />[% END %][% END %] [% ITEM_RESULT.description %]</td>[% END %]
-               <td>
+      <tr>[% IF ( item_level_itypes ) %]<td class="itype">[% UNLESS ( noItemTypeImages ) %][% IF ( ITEM_RESULT.imageurl ) %]<img src="[% ITEM_RESULT.imageurl %]" title="[% ITEM_RESULT.description %]" alt="[% ITEM_RESULT.description %]" />[% END %][% END %] [% ITEM_RESULT.description %]</td>[% END %]
+             <td class="location">
     [% UNLESS ( singleBranchMode ) %]
         <span class="[% ITEM_RESULT.branch_opac_info ? 'branch-info-tooltip-trigger' : '' %]">
         [% IF ( ITEM_RESULT.branchurl ) %]
@@ -758,17 +758,17 @@ YAHOO.util.Event.onContentReady("furtherm", function () {
     [% END %]
     <span class="shelvingloc">[% ITEM_RESULT.location_description %]</span>
     </td>
-               [% IF ( itemdata_ccode ) %]<td>[% ITEM_RESULT.ccode %]</td>[% END %]
-        <td>[% IF ( ITEM_RESULT.itemcallnumber ) %] [% ITEM_RESULT.itemcallnumber %][% IF ( OPACShelfBrowser ) %] (<a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% ITEM_RESULT.biblionumber %]&amp;shelfbrowse_itemnumber=[% ITEM_RESULT.itemnumber %]#shelfbrowser">Browse shelf</a>)[% END %][% END %]</td>
-               [% IF ( itemdata_enumchron ) %]<td>[% ITEM_RESULT.enumchron %]</td>[% END %]
-               [% IF ( itemdata_uri ) %]<td><a href="[% ITEM_RESULT.uri %]">[% ITEM_RESULT.uri %]</a></td>[% END %]
-               [% IF ( itemdata_copynumber ) %]<td>[% ITEM_RESULT.copynumber %]</td>[% END %]
-               <td>[% INCLUDE 'item-status.inc' item = ITEM_RESULT %]</td>
-               [% IF ( itemdata_itemnotes ) %]<td>[% ITEM_RESULT.itemnotes %]</td>[% END %]
-        <td>[% ITEM_RESULT.datedue | $KohaDates %]</td>
-        [% IF ( OPACShowBarcode ) %]<td>[% ITEM_RESULT.barcode %]</td>[% END %]
+            [% IF ( itemdata_ccode ) %]<td class="collection">[% ITEM_RESULT.ccode %]</td>[% END %]
+        <td class="call_no">[% IF ( ITEM_RESULT.itemcallnumber ) %] [% ITEM_RESULT.itemcallnumber %][% IF ( OPACShelfBrowser ) %] (<a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% ITEM_RESULT.biblionumber %]&amp;shelfbrowse_itemnumber=[% ITEM_RESULT.itemnumber %]#shelfbrowser">Browse shelf</a>)[% END %][% END %]</td>
+            [% IF ( itemdata_enumchron ) %]<td class="vol_info">[% ITEM_RESULT.enumchron %]</td>[% END %]
+          [% IF ( itemdata_uri ) %]<td class="url"><a href="[% ITEM_RESULT.uri %]">[% ITEM_RESULT.uri %]</a></td>[% END %]
+               [% IF ( itemdata_copynumber ) %]<td class="copynumber">[% ITEM_RESULT.copynumber %]</td>[% END %]
+              <td class="status">[% INCLUDE 'item-status.inc' item = ITEM_RESULT %]</td>
+             [% IF ( itemdata_itemnotes ) %]<td class="notes">[% ITEM_RESULT.itemnotes %]</td>[% END %]
+        <td class="date_due">[% ITEM_RESULT.datedue | $KohaDates %]</td>
+        [% IF ( OPACShowBarcode ) %]<td class="barcode">[% ITEM_RESULT.barcode %]</td>[% END %]
         [% IF holds_count.defined || show_priority %]
-        <td>
+        <td class="holds_count">
             [% IF holds_count.defined %] [% ITEM_RESULT.holds_count %] [% END %]
             [% IF ITEM_RESULT.priority %]
                 [% IF holds_count.defined %]
index cdd201b..a5f3602 100644 (file)
                 [% FOREACH bibitemloo IN bibitemloop %]
                   <tr>
                       [% IF ( bibitemloo.holdable ) %]
-                                         <td>
+                                    <td class="hold">
                       <input class="reserve_mode" name="reserve_mode" type="hidden" value="single"/>
                       <input class="single_bib" name="single_bib" type="hidden" value="[% bibitemloo.biblionumber %]"/>
                         <span class="confirmjs_hold" title="[% bibitemloo.biblionumber %]"></span>
                         </span>
                                        </td>
                       [% ELSE %]
-                                         [% UNLESS ( none_available ) %]<td>&nbsp;</td>[% END %]
+                                      [% UNLESS ( none_available ) %]<td class="hold">&nbsp;</td>[% END %]
                       [% END %]
-                    [% IF ( bibitemloo.holdable ) %]<td>[% ELSE %]<td colspan="5">[% END %]
+                    [% IF ( bibitemloo.holdable ) %]<td class="title">[% ELSE %]<td class="title" colspan="5">[% END %]
                       <a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% bibitemloo.biblionumber %]">[% bibitemloo.title |html %][% IF ( bibitemloo.subtitle ) %] [% FOREACH subtitl IN bibitemloo.subtitle %][% subtitl.subfield %][% END %][% END %]</a>
                       [% IF ( bibitemloo.author ) %],  by [% bibitemloo.author %][% END %]
 
                     [% IF ( bibitemloo.holdable ) %]
             <!-- HOLDABLE -->
                         [% UNLESS ( item_level_itypes ) %]
-                        <td>
+                        <td class="itype">
                             [% IF ( bibitemloo.imageurl ) %]<img src="[% bibitemloo.imageurl %]" alt="" />[% END %]
                             [% bibitemloo.description %]
                         </td>
                         [% END %]
                         [% IF showholds || showpriority %]
-                        <td>
+                        <td class="priority">
                         [% IF showpriority %] [% bibitemloo.rank %] [% END %]
                         [% IF showholds && showpriority %] out of [% END %]
                         [% IF showholds %] [% bibitemloo.reservecount %] [% END %]
                         </td>
                         [% END %]
                 [% IF ( reserve_in_future ) %]
-                        <td>
+                        <td class="reserve_date">
               <input name="reserve_date_[% bibitemloo.biblionumber %]" id="from" size="10" class="datepickerfrom"/>
               <script language="JavaScript" type="text/javascript">
               //<![CDATA[
                 </td>[% END %]
 
                    [% END %]
-       [% IF ( bibitemloo.holdable ) %]<td>
+        [% IF ( bibitemloo.holdable ) %]<td class="expiration_date">
         <input name="expiration_date_[% bibitemloo.biblionumber %]" id="to" size="10" readonly="readonly" class="datepickerto" />
       <p style="margin:.3em 2em;">
       <a href="#" style="font-size:85%;text-decoration:none;" onclick="document.getElementById('expiration_date_[% bibitemloo.biblionumber %]').value='';return false;">Clear date</a></p>
                     [% UNLESS ( singleBranchMode ) %]
                         [% IF ( bibitemloo.holdable ) %]
                            [% IF ( choose_branch ) %]
-                                          <td>
+                                          <td class="branch">
                          [% UNLESS ( bibitemloo.holdable ) %]
                             <select name="branch" id="branch_[% bibitemloo.biblionumber %]" disabled="disabled">
                               [% FOREACH branchChoicesLoo IN bibitemloo.branchChoicesLoop %]
 
                           [% FOREACH itemLoo IN bibitemloo.itemLoop %]
                             <tr class="[% itemLoo.backgroundcolor %]">
-                              <td>
+                              <td class="copy">
                                 [% IF ( itemLoo.available ) %]
                                   <input type="radio" class="checkitem checkitem_[% bibitemloo.biblionumber %]" name="checkitem_[% bibitemloo.biblionumber %]"
                                          value="[% itemLoo.itemnumber %]" />
                                 [% END %] [% IF ( itemLoo.copynumber ) %][% itemLoo.copynumber %][% END %]
                               </td>
                               [% IF ( item_level_itypes ) %]
-                                <td>
+                                <td class="itype">
                                   [% UNLESS ( noItemTypeImages ) %]
                                   [% IF ( itemLoo.imageurl ) %]<img src="[% itemLoo.imageurl %]" alt="" />[% END %]
                                   [% END %]
                                                                [% itemLoo.description %]
                                 </td>
                               [% END %]
-                              <td>[% itemLoo.barcode %]</td>
+                              <td class="barcode">[% itemLoo.barcode %]</td>
                               [% UNLESS ( singleBranchMode ) %]
-                                <td>[% itemLoo.homeBranchName %]</td>
-                                <td>[% itemLoo.holdingBranchName %]</td>
+                                <td class="homebranch">[% itemLoo.homeBranchName %]</td>
+                                <td class="holdingbranch">[% itemLoo.holdingBranchName %]</td>
                               [% END %]
-                              <td>[% itemLoo.callNumber %]</td>
+                              <td class="call_no">[% itemLoo.callNumber %]</td>
                               [% IF ( itemLoo.itemdata_enumchron ) %]<!-- test -->
-                                <td>[% itemLoo.enumchron %]</td>
+                                <td class="vol_info">[% itemLoo.enumchron %]</td>
                               [% END %]
-                              <td>
+                              <td class="information">
                                 [% IF ( itemLoo.dateDue ) %]
                                   <span class="checkedout">Due [% itemLoo.dateDue %]</span>
                                 [% ELSIF ( itemLoo.transfertwhen ) %]
index 6d43c7e..e5238f7 100644 (file)
@@ -288,6 +288,17 @@ $(document).ready(function(){
     [% IF ( DidYouMeanFromAuthorities ) %]
         <div id='didyoumean'>Not what you expected? Check for <a href='/cgi-bin/koha/svc/suggestion?render=standalone&q=[% querystring | uri %]'>suggestions</a></div>
     [% END %]
+    [% INCLUDE 'page-numbers.inc' %]<br />
+  [% IF ( koha_spsuggest ) %]
+    Did you mean:
+    <ul style="list-style: none;">
+        [% FOREACH SPELL_SUGGES IN SPELL_SUGGEST %]
+        <li>
+            <a href="/cgi-bin/koha/opac-search.pl?q=[% SPELL_SUGGES.spsuggestion %]">[% SPELL_SUGGES.spsuggestion %]</a>
+        </li>
+        [% END %]
+    </ul>
+[% END %]
 
 [% IF ( query_error ) %]
 <div class="dialog alert">
index f794900..43b8329 100644 (file)
@@ -171,28 +171,28 @@ $.tablesorter.addParser({
 
 </td>[% END %]
 
-                <td><a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% ISSUE.biblionumber %]">[% ISSUE.title |html %]</a><span class="item-details">
+                <td class="title"><a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% ISSUE.biblionumber %]">[% ISSUE.title |html %]</a><span class="item-details">
                         [% ISSUE.author %]
                     </span></td>
                 [% IF ( ISSUE.overdue ) %]
-                    <td class="overdue">[% ISSUE.date_due | $KohaDates %]</td>
+                    <td class="date_due overdue">[% ISSUE.date_due | $KohaDates %]</td>
                 [% ELSE %]
-                    <td>[% ISSUE.date_due | $KohaDates %]</td>
+                    <td class="date_due">[% ISSUE.date_due | $KohaDates %]</td>
                 [% END %]
-                [% UNLESS ( item_level_itypes ) %]<td>[% IF ( ISSUE.imageurl ) %]<img src="[% ISSUE.imageurl %]" title="[% ISSUE.description %]" alt="[% ISSUE.description %]" />[% END %] [% ISSUE.description %]</td>[% END %]
-                [% IF ( show_barcode ) %]<td>[% ISSUE.barcode %]</td>[% END %]
-                <td>[% ISSUE.itemcallnumber %]</td>
+                [% UNLESS ( item_level_itypes ) %]<td class="itype">[% IF ( ISSUE.imageurl ) %]<img src="[% ISSUE.imageurl %]" title="[% ISSUE.description %]" alt="[% ISSUE.description %]" />[% END %] [% ISSUE.description %]</td>[% END %]
+                [% IF ( show_barcode ) %]<td class="barcode">[% ISSUE.barcode %]</td>[% END %]
+                <td class="call_no">[% ISSUE.itemcallnumber %]</td>
                 [% IF ( OpacRenewalAllowed ) %]
-                    <td>[% IF ( ISSUE.status ) %][% IF ( canrenew ) %]<input type="checkbox" name="item" value="[% ISSUE.itemnumber %]"/> <a href="/cgi-bin/koha/opac-renew.pl?from=opac_user&amp;item=[% ISSUE.itemnumber %]&amp;borrowernumber=[% ISSUE.borrowernumber %]">Renew</a>[% END %] <span class="renewals">([% ISSUE.renewsleft %] of [% ISSUE.renewsallowed %] renewals remaining)</span>
+                    <td class="renew">[% IF ( ISSUE.status ) %][% IF ( canrenew ) %]<input type="checkbox" name="item" value="[% ISSUE.itemnumber %]"/> <a href="/cgi-bin/koha/opac-renew.pl?from=opac_user&amp;item=[% ISSUE.itemnumber %]&amp;borrowernumber=[% ISSUE.borrowernumber %]">Renew</a>[% END %] <span class="renewals">([% ISSUE.renewsleft %] of [% ISSUE.renewsallowed %] renewals remaining)</span>
                         [% ELSE %]
                         Not renewable[% IF ( ISSUE.too_many ) %] <span class="renewals">([% ISSUE.renewsleft %] of [% ISSUE.renewsallowed %] renewals remaining)</span>[% ELSE %][% IF ( ISSUE.on_reserve ) %] <span class="renewals">(On hold)</span>[% END %][% END %] 
                         [% END %]</td>
                 [% END %]
 [% IF ( OPACFinesTab ) %]
-                <td>[% IF ( ISSUE.charges ) %]Yes[% ELSE %]No[% END %]</td>
+                <td class="fines">[% IF ( ISSUE.charges ) %]Yes[% ELSE %]No[% END %]</td>
 [% END %]
             [% IF ( OPACMySummaryHTML ) %]
-                <td>[% ISSUE.MySummaryHTML %]</td>
+                <td class="links">[% ISSUE.MySummaryHTML %]</td>
             [% END %]
             </tr>
         [% END %]</tbody>
@@ -372,16 +372,16 @@ $.tablesorter.addParser({
                     [% ELSE %]
                             <tr>
                     [% END %]
-                <td><a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% RESERVE.biblionumber %]">[% RESERVE.reserves_title %]</a>
+                <td class="title"><a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% RESERVE.biblionumber %]">[% RESERVE.reserves_title %]</a>
                     [% RESERVE.author %]
                 </td>
-                <td>[% RESERVE.reservedate | $KohaDates %]</td>
-        <td>[% IF ( RESERVE.expirationdate ) %][% RESERVE.expirationdate | $KohaDates %][% ELSE %]Never expires[% END %]</td>
-                <td>[% RESERVE.branch %]</td>
+                <td class="reservedate">[% RESERVE.reservedate | $KohaDates %]</td>
+        <td class="expirationdate">[% IF ( RESERVE.expirationdate ) %][% RESERVE.expirationdate | $KohaDates %][% ELSE %]Never expires[% END %]</td>
+                <td class="branch">[% RESERVE.branch %]</td>
                                [% IF ( showpriority ) %]
-                               <td>[% RESERVE.priority %] </td>
+                             <td class="priority">[% RESERVE.priority %] </td>
                                [% END %]
-                <td>
+                <td class="status">
                     [% IF ( RESERVE.wait ) %]
                         [% IF ( RESERVE.atdestination ) %]
                             [% IF ( RESERVE.found ) %]
@@ -404,7 +404,7 @@ $.tablesorter.addParser({
                             [% END %]
                     [% END %]
                 </td>
-               <td>
+              <td class="modify">
                [% IF ( RESERVE.cancelable ) %]
                        <form action="/cgi-bin/koha/opac-modrequest.pl" method="post">
                        <input type="hidden" name="biblionumber" value="[% RESERVE.biblionumber %]" />