Koha/koha-tmpl/intranet-tmpl/prog/en/includes/cataloging-toolbar.inc
Owen Leonard fefe64cf55 More work on standardizing toolbars. Also standardizing form markup in /tools
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-10-20 17:05:10 -05:00

59 lines
No EOL
1.5 KiB
HTML

<div id="toolbar">
<script type="text/javascript">
//<![CDATA[
// prepare DOM for YUI Toolbar
$(document).ready(function() {
$("#newmenuc").empty();
yuiToolbar();
});
// YUI Toolbar Functions
function yuiToolbar() {
<!-- TMPL_IF NAME="NOTMARC" -->
new YAHOO.widget.Button("newrecord");
<!-- TMPL_ELSE -->
var newmenu = [
{ text: "Default Framework", url: "/cgi-bin/koha/cataloguing/addbiblio.pl?frameworkcode=" },
<!-- TMPL_LOOP NAME="frameworkcodeloop" -->{ text: "<!-- TMPL_VAR name="frameworktext" --> Framework", url: "/cgi-bin/koha/cataloguing/addbiblio.pl?frameworkcode=<!-- TMPL_VAR name="value" -->"},
<!-- /TMPL_LOOP -->
]
new YAHOO.widget.Button({
type: "menu",
label: "New Record",
name: "newmenubutton",
menu: newmenu,
container: "newmenuc"
});
}
<!-- /TMPL_IF -->
//]]>
</script>
<span id="newmenuc">
<!-- TMPL_IF NAME="NOTMARC" -->
<a id="newrecord" href="/cgi-bin/koha/cataloging/addbiblio.pl">New Record</a>
<!-- TMPL_ELSE -->
<form name="f" action="addbiblio.pl" method="post">
<label for="frameworkcode">New Record with framework:</label>
<select name="frameworkcode" id="frameworkcode">
<option value="">Default</option>
<!-- TMPL_LOOP NAME="frameworkcodeloop" -->
<option value="<!-- TMPL_VAR NAME="value" -->">
<!-- TMPL_VAR NAME="frameworktext" -->
</option>
<!-- /TMPL_LOOP -->
</select>
<input type="submit" value="Add Record Without Search" />
</form>
</span>
</div>