[Koha-patches] [PATCH] Bug 9619 - Replace YUI buttons on libraries administration page with Bootstrap

Owen Leonard oleonard at myacpl.org
Fri Feb 15 16:31:24 CET 2013


This patch converts the toolbar used by libraries administration
to Bootstrap, replacing YUI button and menu code
with Bootstrap markup.

To test, view any the branches administration page and confirm
that the buttons to add a library and add a category look
correct and work correctly.
---
 .../prog/en/modules/admin/branches.tt              |   31 +++-----------------
 1 file changed, 4 insertions(+), 27 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt
index 2bfefb3..7cd4b65 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt
@@ -58,33 +58,10 @@ tinyMCE.init({
 	<div id="yui-main">
 	<div class="yui-b">
 	[% IF ( else ) %]
-	<div id="toolbar">
-	<script type="text/javascript">
-	//<![CDATA[
-
-	// prepare DOM for YUI Toolbar
-
-	 $(document).ready(function() {
-	    yuiToolbar();
-		$.tablesorter.defaults.widgets = ['zebra']; 
-		$("#branchest").tablesorter({
-			sortList: [[0,0]],
-			headers: { 3:{sorter:false},4:{sorter:false},5:{sorter:false},6:{sorter:false}}
-		}).tablesorterPager({container: $("#pagerbranchest"),positionFixed: false,size: 10}); 
-		}); 
-	// YUI Toolbar Functions
-
-	function yuiToolbar() {
-	    new YAHOO.widget.Button("newbranch");
-		new YAHOO.widget.Button("newcategory");
-	}
-
-	//]]>
-	</script>
-	<ul class="toolbar">
-    <li><a id="newbranch" href="/cgi-bin/koha/admin/branches.pl?op=add">New library</a></li>
-    <li><a id="newcategory" href="/cgi-bin/koha/admin/branches.pl?op=editcategory">New group</a></li>
-</ul></div>
+    <div id="toolbar" class="btn-toolbar">
+        <a class="btn btn-small" id="newbranch" href="/cgi-bin/koha/admin/branches.pl?op=add"><i class="icon-plus"></i> New library</a>
+        <a class="btn btn-small" id="newcategory" href="/cgi-bin/koha/admin/branches.pl?op=editcategory"><i class="icon-plus"></i> New group</a>
+    </div>
 [% END %]
 
 [% IF ( add ) %]
-- 
1.7.9.5


More information about the Koha-patches mailing list