[Koha-patches] [PATCH] Bug 2774 - Path to theme is hard-coded in many places
Owen Leonard
oleonard at myacpl.org
Wed Jun 5 19:53:14 CEST 2013
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.
---
.../prog/en/includes/installer-doc-head-close.inc | 5 +----
.../en/modules/course_reserves/course-reserves.tt | 15 +++++++--------
.../prog/en/modules/help/labels/spinelabel-home.tt | 2 +-
.../intranet-tmpl/prog/en/modules/help/mainpage.tt | 2 +-
.../prog/en/modules/installer/step1.tt | 2 +-
.../prog/en/modules/installer/step2.tt | 2 +-
.../prog/en/modules/installer/step3.tt | 2 +-
.../prog/en/modules/labels/label-manage.tt | 6 +++---
.../en/modules/reports/guided_reports_start.tt | 4 ++--
9 files changed, 18 insertions(+), 22 deletions(-)
diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/installer-doc-head-close.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/installer-doc-head-close.inc
index 2f43528..122a06c 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/installer-doc-head-close.inc
+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/installer-doc-head-close.inc
@@ -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; }
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-reserves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-reserves.tt
index c757518..fbe02f0 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-reserves.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-reserves.tt
@@ -3,18 +3,17 @@
<title>Koha › 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 %]
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/labels/spinelabel-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/labels/spinelabel-home.tt
index 89ee7fc..6706a4b 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/labels/spinelabel-home.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/labels/spinelabel-home.tt
@@ -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>
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/mainpage.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/mainpage.tt
index 486a663..ab99dd2 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/mainpage.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/mainpage.tt
@@ -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>
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step1.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step1.tt
index 3712217..038c9dc 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step1.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step1.tt
@@ -2,7 +2,7 @@
<title>Koha › Web installer › 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 › Step 1</h1>
+<h1 id="logo"><img alt="Koha" src="[% interface %]/[% theme %]/img/koha.org-logo.gif" /> Web installer › Step 1</h1>
[% UNLESS ( language ) %]
<p>You are about to install Koha.</p>
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step2.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step2.tt
index 458ff42..4a02f18 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step2.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step2.tt
@@ -1,7 +1,7 @@
[% INCLUDE 'doc-head-open.inc' %]<title>Koha › Web installer › 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 › Step 2</h1>
+<h1 id="logo"><img alt="Koha" src="[% interface %]/[% theme %]/img/koha.org-logo.gif" /> Web installer › Step 2</h1>
<h2 align="center">Database settings:</h2>
<ul>
<li><em>database type : </em>[% dbms %]</li>
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tt
index 560d4b6..ea13ac5 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tt
@@ -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 › Step 3</h1>
+<h1 id="logo"><img alt="Koha" src="[% interface %]/[% theme %]/img/koha.org-logo.gif" /> Web installer › Step 3</h1>
[% IF ( selectframeworks ) %]
<script language="JavaScript">
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-manage.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-manage.tt
index d685640..edc469a 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-manage.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-manage.tt
@@ -79,10 +79,10 @@
//]]>
</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, {
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt
index 4cd0728..a2aa3aa 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt
@@ -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 %]
--
1.7.9.5
More information about the Koha-patches
mailing list