[Koha-patches] [PATCH] Bug 9624 - Replace YUI button on reports dictionary page with Bootstrap

Owen Leonard oleonard at myacpl.org
Fri Feb 15 17:35:51 CET 2013


This patch removes the toolbar include file used by the reports
dictionary and embeds the toolbar markup directly in the main
template since it's the only instance where it is used.
Toolbar is converted to use Bootstrap, replacing YUI button code
with Bootstrap markup.

To test, view the reports dictionary and confirm that the "New
definition" button looks correct and works correctly.
---
 .../prog/en/includes/dictionary-toolbar.inc        |   21 --------------------
 .../prog/en/modules/reports/dictionary.tt          |    6 +++++-
 2 files changed, 5 insertions(+), 22 deletions(-)
 delete mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/dictionary-toolbar.inc

diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/dictionary-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/dictionary-toolbar.inc
deleted file mode 100644
index 4d213a1..0000000
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/dictionary-toolbar.inc
+++ /dev/null
@@ -1,21 +0,0 @@
-<div id="toolbar">
-	<script type="text/javascript">
-	//<![CDATA[
-
-	// prepare DOM for YUI Toolbar
-
-	 $(document).ready(function() {
-	    yuiToolbar();
-	 });
-
-	// YUI Toolbar Functions
-
-	function yuiToolbar() {
-	    new YAHOO.widget.Button("newdictionary");
-	}
-
-	//]]>
-	</script>
-	<ul class="toolbar">
-    <li><a id="newdictionary" href="/cgi-bin/koha/reports/dictionary.pl?phase=Add%20New%20Definition">New definition</a></li>
-</ul></div>
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/dictionary.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/dictionary.tt
index 2e15834..20c56b7 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/dictionary.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/dictionary.tt
@@ -22,7 +22,11 @@
 <div id="yui-main">
 <div class="yui-b">
 [% IF ( start_dictionary ) %]
-[% INCLUDE 'dictionary-toolbar.inc' %]
+    <div id="toolbar">
+        <ul class="toolbar">
+            <li><a id="newdictionary" class="btn btn-small" href="/cgi-bin/koha/reports/dictionary.pl?phase=Add%20New%20Definition"><i class="icon-plus"></i> New definition</a></li>
+        </ul>
+    </div>
 [% END %]
 <h1>Dictionary</h1>
 [% IF ( start_dictionary ) %]
-- 
1.7.9.5


More information about the Koha-patches mailing list