Bug 16220 - The view tabs on opac-detail.pl are not responsive
authorOwen Leonard <oleonard@myacpl.org>
Thu, 7 Apr 2016 16:11:58 +0000 (12:11 -0400)
committerBrendan Gallagher <brendan@bywatersolutions.com>
Fri, 22 Apr 2016 23:02:49 +0000 (23:02 +0000)
When looking at the detail page for a bibliographic record, there are
tabs linking to the "Normal," "MARC," and "ISBD" views. These tabs need
to be styled responsively so that they work well at all browser widths.

This patch makes some slight markup changes to the templates and updates
the LESS files to add responsive styling.

This patch does not include the compiled CSS file, so the follow-up is
required to test the visual changes.

Signed-off-by: Marc VĂ©ron <veron@veron.ch>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>

koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-ISBDdetail.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-MARCdetail.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt
koha-tmpl/opac-tmpl/bootstrap/less/opac.less
koha-tmpl/opac-tmpl/bootstrap/less/responsive.less

index 3c47566..108b9bf 100644 (file)
@@ -19,7 +19,7 @@
                     <div id="usermarcdetail">
                         <div id="catalogue_detail_biblio">
                             <div id="views">
-                                <span class="view"><a id="Normalview" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblionumber %]">Normal view</a></span> <span class="view"><a id="MARCview" href="/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=[% biblionumber %]">MARC view</a></span> <span class="view"><span id="ISBDview">ISBD view</span></span></div>
+                                <span class="view"><a id="Normalview" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblionumber %]">Normal view</a></span> <span class="view"><a id="MARCview" href="/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=[% biblionumber %]">MARC view</a></span> <span class="view current-view"><span id="ISBDview">ISBD view</span></span></div>
 
                                 <div id="isbdcontents">[% ISBD %]</div>
 
index f4ca095..1f0680e 100644 (file)
@@ -21,7 +21,7 @@
 
                             <div id="views">
                                 <span class="view"><a id="Normalview" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblionumber %]">Normal view</a></span>
-                                <span class="view"><span id="MARCview">MARC view</span></span>
+                                <span class="view current-view"><span id="MARCview">MARC view</span></span>
                                 [% IF ( ISBD ) %]<span class="view"><a id="ISBDview"  href="/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=[% biblionumber %]">ISBD view</a></span>[% END %]
                             </div>
                             <h1 class="title">[% bibliotitle %] (Record no. [% biblionumber %])</h1>
index 8e7efe4..478eccb 100644 (file)
                     [% END %]
 
                     <div id="views">
-                        <span class="view"><span id="Normalview">Normal view</span></span>
+                        <span class="view current-view"><span id="Normalview">Normal view</span></span>
                         <span class="view"><a id="MARCview" href="/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=[% biblionumber %]">MARC view</a></span>
                         [% IF ( ISBD ) %]<span class="view"><a id="ISBDview" href="/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=[% biblionumber %]">ISBD view</a></span>[% END %]
                     </div>
index 447e255..6d20cd0 100644 (file)
@@ -1059,14 +1059,17 @@ div.rows {
 }
 
 #views {
-    border-bottom : 1px solid #D6D6D6;
     margin-bottom : .5em;
     padding : 0 2em 0.2em 0.2em;
-    white-space : nowrap;
 }
 
 .view {
-    padding : 0.2em .2em 2px .2em;
+    background-color : #F3F3F3;
+    border: 1px solid #C9C9C9;
+    border-radius: 4px;
+    display: inline-block;
+    padding: 0.2em 0.5em;
+    white-space: nowrap;
 }
 
 #bibliodescriptions,
@@ -1081,40 +1084,30 @@ div.rows {
         background-image: url("../images/sprite.png");
         background-repeat : no-repeat;
         font-size : 87%;
-        font-weight : normal;
-        padding: 0.4em 0.7em 5px 26px;
+        padding-left: 15px;
         text-decoration: none;
     }
 }
 
-span#MARCview,
-span#ISBDview,
-span#Normalview,
-span#Fullhistory,
-span#Briefhistory {
-    font-weight: bold;
+.view {
+    a {
+        font-weight : normal;
+    }
 }
 
-a#MARCview,
-span#MARCview {
-    background-position: -3px -23px;
-}
-a#MARCviewPop,
-span#MARCviewPop {
-    background-position: -3px -23px;
+.current-view {
+    background-color: #fff;
+    font-weight: bold;
 }
-a#ISBDview,
-span#ISBDview {
-    background-position: -3px -52px;
+
+#MARCview {
+    background-position: -9px -27px;
 }
-a#Normalview,
-span#Normalview {
-    background-position: -1px 6px;
+#ISBDview {
+    background-position: -10px -56px;
 }
-
-.view a {
-    background-color : #F3F3F3;
-    border-left : 1px solid #C9C9C9;
+#Normalview {
+    background-position: -8px 3px;
 }
 
 #bookcover {
index e3772b1..6fc7358 100644 (file)
     .statictabs li a {
         padding: .1em .5em;
     }
-    #views {
-        border : 0;
-        padding : 0;
-        margin : 0;
-    }
-    .view {
-        padding : 0;
-        a,
-        span {
-            border : 1px solid #C9C9C9;
-            .border-radius-all(4px);
-            font-size : 80%;
-            padding : 0.3em 0.4em 4px 26px
-        }
-    }
     .input-fluid {
         width : 90%;
     }
     }
 }
 
+@media only screen and (min-width: 608px) {
+    #views {
+        border-bottom : 1px solid #D6D6D6;
+        margin: 0;
+        padding: 0;
+        white-space : nowrap;
+    }
+    .view {
+        border-radius: 0;
+        border-right-width: 0;
+        border-top-width: 0;
+        border-bottom-width: 0;
+    }
+
+    .current-view {
+        border: 0;
+        -webkit-box-shadow: none;
+        -moz-box-shadow:    none;
+        box-shadow:         none;
+    }
+}
+
 @media only screen and (min-width: 608px) and (max-width: 767px) {
     /* Screens between 608 and 767 pixels wide */
     #oh:after {