Bugzilla – Attachment 9470 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]
Proposed patch
0001-Bug-8061-RTL-CSS-overrides-OPAC.patch (text/plain), 6.20 KB, created by
D Ruth Holloway
on 2012-05-09 08:43:33 UTC
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
D Ruth Holloway
Created:
2012-05-09 08:43:33 UTC
Size:
6.20 KB
patch
obsolete
>From 4566e5d1cb9edb2ff34ebf61152320aef5edaaed Mon Sep 17 00:00:00 2001 >From: D Ruth Bavousett <ruth@bywatersolutions.com> >Date: Thu, 3 May 2012 06:41:36 -0700 >Subject: [PATCH] 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. >--- > koha-tmpl/opac-tmpl/prog/en/css/opac.css | 1 + > 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 +- > 5 files changed, 190 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/opac.css b/koha-tmpl/opac-tmpl/prog/en/css/opac.css >index 21dc08f..50f00a7 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/css/opac.css >+++ b/koha-tmpl/opac-tmpl/prog/en/css/opac.css >@@ -2055,6 +2055,7 @@ div.ft { > #recentcomments { > margin:auto; > max-width:750px; >+ float:right; > } > > .searchresults .commentline { >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..7c660a5 >--- /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 15bea79..653f2a1 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 >@@ -15,6 +15,9 @@ > [% END %] > <link rel="stylesheet" type="text/css" media="print" href="[% themelang %]/css/print.css" /> > <link rel="stylesheet" type="text/css" href="[% themelang %]/lib/jquery/plugins/ui.tabs.css" /> >+[% 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 f6479f9..7ce4c52 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 57d098e..0387502 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 %] >-[% 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" language="JavaScript"> > //<![CDATA[ > $(document).ready(function() { >-- >1.7.2.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