Bugzilla – Attachment 17247 Details for
Bug 8061
Koha's templates do not cope well with right-to-left languages
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 8061: RTL CSS overrides (OPAC)
PASSED-QA-Bug-8061-RTL-CSS-overrides-OPAC.patch (text/plain), 6.00 KB, created by
Katrin Fischer
on 2013-04-07 10:09:17 UTC
(
hide
)
Description:
[PASSED QA] Bug 8061: RTL CSS overrides (OPAC)
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2013-04-07 10:09:17 UTC
Size:
6.00 KB
patch
obsolete
>From d335d09e5bff3b2e22c8daf6cca48420387489ec Mon Sep 17 00:00:00 2001 >From: D Ruth Bavousett <druthb@gmail.com> >Date: Fri, 5 Apr 2013 17:58:33 +0300 >Subject: [PATCH] [PASSED QA] Bug 8061: RTL CSS overrides (OPAC) > >This patch repairs a few things in templates and CSS to allow >for the injection of right-to-left CSS, also in this patch. >It should apply to 3.8 and master. > >To test, install and enable a right-to-left language for the >OPAC, currently Hebrew or Arabic. >The Arabic OPAC translations for 3.6 are mostly-complete, so >they are a good test case. > >It's helpful to have a reader of the language handy, but the >layout should be easy enough to figure out, even for >non-readers. > >Signed-off-by: Karam Qubsi <karamqubsi@gmail.com> >Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> >Amended patch adding back author and adding sign off. > >Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> >--- > koha-tmpl/opac-tmpl/prog/en/css/right-to-left.css | 184 ++++++++++++++++++++ > .../opac-tmpl/prog/en/includes/doc-head-close.inc | 3 + > .../prog/en/modules/opac-addbybiblionumber.tt | 2 +- > koha-tmpl/opac-tmpl/prog/en/modules/opac-review.tt | 2 +- > 4 files changed, 189 insertions(+), 2 deletions(-) > create mode 100644 koha-tmpl/opac-tmpl/prog/en/css/right-to-left.css > >diff --git a/koha-tmpl/opac-tmpl/prog/en/css/right-to-left.css b/koha-tmpl/opac-tmpl/prog/en/css/right-to-left.css >new file mode 100644 >index 0000000..141fcc8 >--- /dev/null >+++ b/koha-tmpl/opac-tmpl/prog/en/css/right-to-left.css >@@ -0,0 +1,184 @@ >+/* Adjust text directions */ >+body, >+body #doc, >+#doc2, >+#doc3, >+#doc4, >+.yui-t1, >+.yui-t2, >+.yui-t3, >+.yui-t4, >+.yui-t5, >+.yui-t6, >+.yui-t7 >+{ >+ text-align:right; >+ direction: rtl; >+} >+ >+caption, >+table#marc th >+{ >+ text-align: right; >+} >+ >+/* Swap floats */ >+ >+body#advsearch #cartmenulink, >+body#advsearch #listsmenulink, >+#renewcontrols, >+.commentline .avatar, >+.resort, >+.yui-t1 #yui-main, >+.yui-t2 #yui-main, >+.yui-t3 #yui-main >+{ >+ float: left; >+} >+ >+div.lang, >+fieldset.rows label, >+fieldset.rows span.label, >+#auth, >+#bookcover, >+.left, >+.nav_results ul.pg_menu li, >+.ui-tabs-nav li, >+.yui-g div.first, >+.yui-gc div.first, >+.yui-gc div.first div.first, >+.yui-gd div.first, >+.yui-ge div.first, >+.yui-gf div.first, >+.yui-t1 .yui-b >+{ >+ float: right; >+} >+ >+h1#libraryname >+{ >+ float: right !important; >+} >+ >+#fluid-offset >+{ >+ float: none; >+} >+ >+/* Adjust margins, padding, alignment and table-element widths */ >+ >+div#menu li a >+{ >+ margin-left: -1px; >+} >+ >+.yui-t1 #yui-main, >+.yui-t1 #yui-main .yui-b, >+.yui-t2 #yui-main, >+.yui-t3 #yui-main >+{ >+ margin-left: 0; >+} >+ >+h1, >+h2, >+h3, >+h4, >+h5, >+h6 >+{ >+ margin-left: 0.5em; >+} >+ >+.results_summary .label >+{ >+ margin-left: 0.5em; >+} >+ >+ul li >+{ >+ margin-right: 1.5em; >+} >+ >+ul.pg_menu li, >+.author, >+.nav_results >+{ >+ margin-right: 0.5em; >+} >+ >+#usershowreviews >+{ >+ margin-right: 15em; >+} >+ >+#moresearches >+{ >+ margin: .6em 10em .3em 0; >+} >+ >+#menu ul >+{ >+ padding-left:0; >+} >+ >+#custom-doc, >+#opac-main-search >+{ >+ padding-right: 2em; >+} >+ >+.nav_results .l_Results a >+{ >+ padding: 8px 3px 8px 28px; >+} >+ >+body#advsearch #moresearches >+{ >+ clear:none; >+} >+ >+span.koha_url >+{ >+ left: 2em; >+ right:auto; >+} >+ >+.yui-u first >+{ >+ right: 15em; >+} >+ >+table#marc td:first-child >+{ >+ width: 15em; >+} >+ >+.yui-t1 #yui-main, >+.yui-t2 #yui-main, >+.yui-t3 #yui-main { >+ width: 80%; >+} >+ >+/* Borders */ >+ >+div#menu { >+ border-right: 0; >+ border-left: 1px solid #979797; >+} >+ >+#menu ul li.active a { >+ border-left: 0; >+ border-right: 1px solid #979797; >+} >+ >+/* flip over breadcrumb image */ >+ >+h3 img { >+ -moz-transform: scaleX(-1); >+ -o-transform: scaleX(-1); >+ -webkit-transform: scaleX(-1); >+ transform: scaleX(-1); >+ filter: FlipH; >+ -ms-filter: "FlipH"; >+} >diff --git a/koha-tmpl/opac-tmpl/prog/en/includes/doc-head-close.inc b/koha-tmpl/opac-tmpl/prog/en/includes/doc-head-close.inc >index 45424e8..147b82c 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/includes/doc-head-close.inc >+++ b/koha-tmpl/opac-tmpl/prog/en/includes/doc-head-close.inc >@@ -24,6 +24,9 @@ > <link rel="stylesheet" type="text/css" href="[% themelang %]/css/persona-buttons.css" /> > [% END %] > [% IF ( OPACMobileUserCSS ) %]<style type="text/css" media="screen and (max-width:700px)">[% OPACMobileUserCSS %]</style>[% END %] >+[% IF ( bidi ) %] >+ <link rel="stylesheet" type="text/css" href="[% themelang %]/css/right-to-left.css" /> >+[% END %] > [% IF ( OPACUserCSS ) %]<style type="text/css">[% OPACUserCSS %]</style>[% END %] > <!-- yui js --> > <script type="text/javascript" src="[% yuipath %]/utilities/utilities.js"></script> >diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-addbybiblionumber.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-addbybiblionumber.tt >index a1e1f9b..566a18f 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-addbybiblionumber.tt >+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-addbybiblionumber.tt >@@ -1,9 +1,9 @@ > [% INCLUDE 'doc-head-open.inc' %] > [% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog › Add to your list >-[% INCLUDE 'doc-head-close.inc' %] > <style type="text/css"> > #custom-doc { width:34.62em;*width:33.78em;min-width:450px; margin:auto; margin-top: .4em;text-align:left; } > </style> >+[% INCLUDE 'doc-head-close.inc' %] > </head> > <body id="addtolist"> > <div id="custom-doc" class="yui-t7"> >diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-review.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-review.tt >index 4198701..3df04b4 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-review.tt >+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-review.tt >@@ -1,8 +1,8 @@ > [% INCLUDE 'doc-head-open.inc' %][% LibraryNameTitle or "Koha online" %] catalog › Comments on [% title |html %] >-[% INCLUDE 'doc-head-close.inc' %] > <style type="text/css"> > #custom-doc { width:37.08em;*width:36.16em;min-width:485px; margin:1em auto; text-align:left; } > </style> >+[% INCLUDE 'doc-head-close.inc' %] > <script type="text/javascript"> > //<![CDATA[ > $(document).ready(function() { >-- >1.7.9.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 8061
:
9470
|
9579
|
13087
|
17178
|
17206
|
17207
|
17215
|
17216
|
17231
|
17232
|
17233
|
17234
|
17235
|
17236
|
17237
|
17238
|
17239
|
17240
|
17241
|
17242
|
17243
|
17244
|
17245
|
17246
| 17247 |
17248
|
17249
|
17286