LP#1691009 Cache the RTL and LTR stylesheets user/dbs/lp1681009_rtl_style_merge
authorDan Scott <dscott@laurentian.ca>
Thu, 27 Apr 2017 19:31:39 +0000 (15:31 -0400)
committerDan Scott <dscott@laurentian.ca>
Thu, 27 Apr 2017 19:31:39 +0000 (15:31 -0400)
To allow browsers to cache the correct version of the stylesheet, append a GET
param indicating the direction.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Open-ILS/src/templates/opac/parts/base.tt2

index 6a78bcc..8d7b07d 100644 (file)
@@ -10,7 +10,9 @@
         [% END %]
         <meta name = "viewport" content = "initial-scale = 1.0">
         <link rel="stylesheet" type="text/css" href="[% ctx.media_prefix %]/css/skin/default/opac/semiauto.css" />
-        <link rel="stylesheet" type="text/css" href="[% ctx.opac_root %]/css/style.css" />
+        <link rel="stylesheet" type="text/css" href="[% ctx.opac_root %]/css/style.css?dir=[%
+          IF ctx.get_i18n_l(ctx.eg_locale).rtl == 't' %]rtl[%
+          ELSE %]ltr[% END %]" />
         [% IF ctx.get_i18n_l(ctx.eg_locale).rtl == 't' %]
         <link rel="stylesheet" type="text/css" href="[% ctx.media_prefix %]/css/skin/default/opac/semiauto-rtl.css" />
         [% END %]