Bug 11057: Bootstrap theme: fix display of active language in language chooser
authorOwen Leonard <oleonard@myacpl.org>
Sun, 20 Oct 2013 17:39:06 +0000 (10:39 -0700)
committerGalen Charlton <gmc@esilibrary.com>
Wed, 23 Oct 2013 17:32:57 +0000 (17:32 +0000)
There is a problem with how an active single language is styled, making
the alignment look incorrect. This patch amends the markup and the CSS
to make it look better. This patch does not address the position of the
language menu.

To test you must have at least one additional single translation
installed. Apply the patch, refresh the page, and confirm that the
display of the active language is improved.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Improved view of current language. No koha-qa errors.

1) Downloaded a couple of xx-YY-bootstrap.po from
http://translate.koha-community.org/projects/314
2) Installed sample languages
3) Enable them and opaclanguagesdisplay
4) Checked correct alignment of selected language

Signed-off-by: Ed Veal <ed.veal@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
The selected language has not a padding, contrary to others.
Not perfect but it fixes the descripted behavior.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
koha-tmpl/opac-tmpl/bootstrap/css/opac.css
koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc
koha-tmpl/opac-tmpl/bootstrap/less/opac.less

index 5b3da1c..a97158f 100644 (file)
@@ -386,6 +386,9 @@ td {
   margin-top: .5em;
   position: static;
 }
+#changelanguage .nav > .active > p {
+  padding: 0 15px;
+}
 .table-striped tbody > tr:nth-child(odd) > td,
 .table-striped tbody > tr:nth-child(odd) > th {
   background-color: #F4F4F4;
index 2164ee4..c3ce588 100644 (file)
@@ -57,9 +57,9 @@
                                     [% ELSE %]
                                         [% IF ( languages_loo.group_enabled ) %]
                                             [% IF ( languages_loo.current ) %]
-                                                <li class="morelang"><p>[% IF ( languages_loo.native_description ) %][% languages_loo.native_description %][% ELSE %][% languages_loo.rfc4646_subtag %][% END %]</p></li>
+                                                <li class="active"><p class="navbar-text">[% IF ( languages_loo.native_description ) %][% languages_loo.native_description %][% ELSE %][% languages_loo.rfc4646_subtag %][% END %]</p></li>
                                             [% ELSE %]
-                                                <li class="morelang"><a href="/cgi-bin/koha/opac-changelanguage.pl?language=[% languages_loo.rfc4646_subtag %]">[% IF ( languages_loo.native_description ) %][% languages_loo.native_description %][% ELSE %][% languages_loo.rfc4646_subtag %][% END %]</a></li>
+                                                <li><a href="/cgi-bin/koha/opac-changelanguage.pl?language=[% languages_loo.rfc4646_subtag %]">[% IF ( languages_loo.native_description ) %][% languages_loo.native_description %][% ELSE %][% languages_loo.rfc4646_subtag %][% END %]</a></li>
                                             [% END %]
                                         [% END # / IF languages_loo.current %]
                                     [% END # / IF ( languages_loo.plural ) %]
index 106fb3a..c95d82a 100644 (file)
@@ -352,6 +352,10 @@ table, td {
     position: static;
 }
 
+#changelanguage .nav > .active > p {
+    padding : 0 15px;
+}
+
 .table-striped tbody > tr:nth-child(odd) > td,
 .table-striped tbody > tr:nth-child(odd) > th {
   background-color: #F4F4F4;