Bug 2774 - Path to theme is hard-coded in many places
authorOwen Leonard <oleonard@myacpl.org>
Tue, 4 Jun 2013 19:35:42 +0000 (15:35 -0400)
committerGalen Charlton <gmc@esilibrary.com>
Fri, 7 Jun 2013 16:04:15 +0000 (09:04 -0700)
This patch corrects serveral more places in the templates where the path
to the prog theme is hard-coded. To test, apply the patch and view the
following cases:

- When a database update is triggered the login page loads login.css.
  This path should be correct. (Reference to wizard.css is removed as
  per Bug 10422).
- The course reserves home page should load datatables-related assets
  correctly.
- Help pages for the Quick spine label creator and the staff client home
  page should show the correct paths where they reference the Koha file
  system.
- The web installer pages should correctly load the Koha logo.
- The label creator "manage" pages (layouts, templates, etc.) should
  correctly load datatables-related assets.

Signed-off-by: Liz Rea <liz@catalyst.net.nz>
Checked all 5 - look good.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
koha-tmpl/intranet-tmpl/prog/en/includes/installer-doc-head-close.inc
koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-reserves.tt
koha-tmpl/intranet-tmpl/prog/en/modules/help/labels/spinelabel-home.tt
koha-tmpl/intranet-tmpl/prog/en/modules/help/mainpage.tt
koha-tmpl/intranet-tmpl/prog/en/modules/installer/step1.tt
koha-tmpl/intranet-tmpl/prog/en/modules/installer/step2.tt
koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tt
koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-manage.tt
koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt

index 2f43528..122a06c 100644 (file)
@@ -3,10 +3,7 @@
 <style type="text/css" media="screen">
 
 [% IF ( login ) %]
-    @import url(/intranet-tmpl/prog/en/css/login.css);
-[% END %]
-[% IF ( wizard ) %]
-    @import url(/intranet-tmpl/prog/en/css/wizard.css);
+    @import url([% themelang %]/css/login.css);
 [% END %]
 
 html { background: #eee; }
index c757518..fbe02f0 100644 (file)
@@ -3,18 +3,17 @@
 <title>Koha &rsaquo; Course reserves</title>
 [% INCLUDE 'doc-head-close.inc' %]
 
-<link rel="stylesheet" type="text/css" href="/intranet-tmpl/prog/en/css/datatables.css" />
-<script type="text/javascript" src="/intranet-tmpl/prog/en/lib/jquery/plugins/jquery.dataTables.min.js"></script>
+<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
+<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.dataTables.min.js"></script>
 [% INCLUDE 'datatables-strings.inc' %]
-<script type="text/javascript" src="/intranet-tmpl/prog/en/js/datatables.js"></script>
-<script type="text/javascript" id="js">$(document).ready(function() {
- $(document).ready(function() {
+<script type="text/javascript" src="[% themelang %]/js/datatables.js"></script>
+<script type="text/javascript" id="js">
+$(document).ready(function() {
     $("#course_reserves_table").dataTable($.extend(true, {}, dataTablesDefaults, {
         "sPaginationType": "four_button",
         "aLengthMenu": [[10, 20, 50, 100, -1], [10, 20, 50, 100, "All"]],
         "iDisplayLength": 20
     }));
- });
 });
 </script>
 
@@ -96,9 +95,9 @@
                                     <td>[% c.students_count %]</td>
                                     <td>
                                         [% IF c.enabled == 'yes' %]
-                                            <img src="/intranet-tmpl/prog/img/approve.gif" />
+                                            <img src="[% interface %]/[% theme %]/img/approve.gif" />
                                         [% ELSE %]
-                                            <img src="http://kohadev:8080/intranet-tmpl/prog/img/deny.gif" />
+                                            <img src="[% interface %]/[% theme %]/img/deny.gif" />
                                         [% END %]
                                     </td>
                             [% END %]
index 89ee7fc..6706a4b 100644 (file)
@@ -6,7 +6,7 @@
 
 <ul>
        <li>Define the fields you want to print on the spine label in the SpineLabelFormat system preference</li>
-       <li>Format your label printing by editing spinelabel.css found in koha-tmpl/intranet-tmpl/prog/en/css/</li>
+    <li>Format your label printing by editing spinelabel.css found in [% themelang %]/css/</li>
 </ul>
 
 <p>To use this tool you simply need the barcode for the book you'd like to print the spine label for.</p>
index 486a663..ab99dd2 100644 (file)
@@ -24,7 +24,7 @@
 
 <p>As part of the upgrade process your online help will be overwritten with the new Help as part of the install. If you want to keep a copy of your online help, you should instruct your System Administrator to upgrade the Online Help directory in the Koha file tree.</p>
 
-<p>The online help directory is: <pre>/koha-tmpl/intranet-tmpl/prog/en/modules/help</pre></p>
+<p>The online help directory is: <pre>[% themelang %]/modules/help</pre></p>
 
 <p><strong>See the full documentation for Koha in the <a href="http://manual.koha-community.org/3.12/en/">manual</a> (online).</strong></p>
 
index 3712217..038c9dc 100644 (file)
@@ -2,7 +2,7 @@
 <title>Koha &rsaquo; Web installer &rsaquo; Step 1</title>
 [% INCLUDE 'installer-doc-head-close.inc' %]
 <div>
-<h1 id="logo"><img alt="Koha" src="/intranet-tmpl/prog/img/koha.org-logo.gif" /> Web installer &rsaquo; Step 1</h1>
+<h1 id="logo"><img alt="Koha" src="[% interface %]/[% theme %]/img/koha.org-logo.gif" /> Web installer &rsaquo; Step 1</h1>
 [% UNLESS ( language ) %]
 <p>You are about to install Koha.</p>
 
index 458ff42..4a02f18 100644 (file)
@@ -1,7 +1,7 @@
 [% INCLUDE 'doc-head-open.inc' %]<title>Koha &rsaquo; Web installer &rsaquo; Step 2</title>
 [% INCLUDE 'installer-doc-head-close.inc' %]
 <div>
-<h1 id="logo"><img alt="Koha" src="/intranet-tmpl/prog/img/koha.org-logo.gif" /> Web installer &rsaquo; Step 2</h1>
+<h1 id="logo"><img alt="Koha" src="[% interface %]/[% theme %]/img/koha.org-logo.gif" /> Web installer &rsaquo; Step 2</h1>
 <h2 align="center">Database settings:</h2>
 <ul>
 <li><em>database type : </em>[% dbms %]</li>
index 560d4b6..ea13ac5 100644 (file)
@@ -2,7 +2,7 @@
 [% IF ( finish ) %]<meta http-equiv="refresh" content="10; url=/cgi-bin/koha/mainpage.pl">[% END %]
 [% INCLUDE 'installer-doc-head-close.inc' %]
 <div>
-<h1 id="logo"><img alt="Koha" src="/intranet-tmpl/prog/img/koha.org-logo.gif" /> Web installer &rsaquo; Step 3</h1>
+<h1 id="logo"><img alt="Koha" src="[% interface %]/[% theme %]/img/koha.org-logo.gif" /> Web installer &rsaquo; Step 3</h1>
 
 [% IF ( selectframeworks ) %]
     <script language="JavaScript">
index d685640..edc469a 100644 (file)
         //]]>
     </script>
 
-<link rel="stylesheet" type="text/css" href="/intranet-tmpl/prog/en/css/datatables.css" />
-<script type="text/javascript" src="/intranet-tmpl/prog/en/lib/jquery/plugins/jquery.dataTables.min.js"></script>
+<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
+<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.dataTables.min.js"></script>
 [% INCLUDE 'datatables-strings.inc' %]
-<script type="text/javascript" src="/intranet-tmpl/prog/en/js/datatables.js"></script>
+<script type="text/javascript" src="[% themelang %]/js/datatables.js"></script>
 <script type="text/javascript" id="js">
  $(document).ready(function() {
     $("#labels-table").dataTable($.extend(true, {}, dataTablesDefaults, {
index 9cb99f3..8c34135 100644 (file)
@@ -427,9 +427,9 @@ canned reports and writing custom SQL reports.</p>
 
 <!--- Summary and Matrix reports have not yet been implemented-->
 <!--<div class="yui-u">Summary:
-<img src="/intranet-tmpl/prog/img/reports-summary-graphic.gif" /></div>
+<img src="[% interface %]/[% theme %]/img/reports-summary-graphic.gif" /></div>
 <div class="yui-u">Matrix:
-<img src="/intranet-tmpl/prog/img/reports-matrix-graphic.gif" /></div>-->
+<img src="[% interface %]/[% theme %]/img/reports-matrix-graphic.gif" /></div>-->
 
 [% END %]