-<div id="toolbar">
-<script type="text/javascript">
- //<![CDATA[
-
- // prepare DOM for YUI Toolbar
-
- $(document).ready(function() {
- $("#newmenuc").empty();
- $("#delAuthc").empty();
- $("#savemenuc").empty();
- yuiToolbar();
- });
-
- // YUI Toolbar Functions
+[% INCLUDE 'blocking_errors.inc' %]
+[% IF ( authid || CAN_user_editauthorities) %]
+
+<div id="toolbar" class="btn-toolbar">
+
+[% IF ( authid ) %]
+ [% IF ( CAN_user_editauthorities ) %]
+ <div class="btn-group"><a class="btn btn-default btn-sm" id="editAuth" href="authorities.pl?authid=[% authid %]"><i class="fa fa-pencil"></i> Edit</a></div>
+ <div class="btn-group"><a class="btn btn-default btn-sm" id="dupAuth" href="authorities.pl?authid=[% authid %]&op=duplicate"><i class="fa fa-copy"></i> Duplicate</a></div>
+ [% UNLESS ( count ) %]
+ <div class="btn-group"><a href="#" class="btn btn-default btn-sm" id="delAuth"><i class="fa fa-trash"></i> Delete</a></div>
+ [% END %]
+ [% END %]
- function yuiToolbar() {
-
- var newmenu = [
- [% FOREACH authtypesloo IN authtypesloop %]{ text: "[% authtypesloo.authtypetext %]", url: "/cgi-bin/koha/authorities/authorities.pl?authtypecode=[% authtypesloo.value %]"},
+ <div class="btn-group">
+ <a class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown" href="#"><i class="fa fa-download"></i> Save
+ <span class="caret"></span>
+ </a>
+ <ul class="dropdown-menu">
+ <li><a href="/cgi-bin/koha/authorities/export.pl?format=mads&op=export&authid=[% authid %]">MADS (XML)</a></li>
+ <li><a href="/cgi-bin/koha/authorities/export.pl?format=marcxml&op=export&authid=[% authid %]">MARCXML</a></li>
+ <li><a href="/cgi-bin/koha/authorities/export.pl?format=marc8&op=export&authid=[% authid %]">MARC (non-Unicode/MARC-8)</a></li>
+ <li><a href="/cgi-bin/koha/authorities/export.pl?format=utf8&op=export&authid=[% authid %]">MARC (Unicode/UTF-8)</a></li>
+ </ul>
+ </div>
[% END %]
- ]
-
- new YAHOO.widget.Button({
- type: "menu",
- label: _("New authority"),
- name: "newmenubutton",
- menu: newmenu,
- container: "newmenuc"
- });
-
- var editButton = new YAHOO.widget.Button("editAuth");
-
- var delAuthButton = new YAHOO.widget.Button({
- id: "delAuth",
- type: "button",
- label: _("Delete"),
- container: "delAuthc",
- onclick: {fn: confirm_deletion }
- });
- var savemenu = [
- { text: _("MADS (XML)"), url: "/cgi-bin/koha/authorities/export.pl?format=mads&op=export&authid=[% authid %]" },
- { text: _("MARCXML"), url: "/cgi-bin/koha/authorities/export.pl?format=marcxml&op=export&authid=[% authid %]" },
- { text: _("MARC (non-Unicode/MARC-8)"), url: "/cgi-bin/koha/authorities/export.pl?format=marc8&op=export&authid=[% authid %]" },
- { text: _("MARC (Unicode/UTF-8)"), url: "/cgi-bin/koha/authorities/export.pl?format=utf8&op=export&authid=[% authid %]" },
- ];
-
- new YAHOO.widget.Button({
- type: "menu",
- label: _("Save"),
- name: "savemenubutton",
- menu: savemenu,
- container: "savemenuc"
- });
- }
-
- //]]>
- </script>
- <form name="f2" method="post" action="authorities.pl">
-
-[% IF ( authid ) %] <a id="editAuth" href="authorities.pl?authid=[% authid %]">Edit</a>
-
- [% UNLESS ( count ) %]
- <span id="delAuthc"><a id="delAuth" href="javascript:confirm_deletion()">Delete</a></span>
+[% IF ( CAN_user_editauthorities ) %]
+ <div class="btn-group">
+ <a class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown" href="#"><i class="fa fa-plus"></i> New authority
+ <span class="caret"></span>
+ </a>
+ <ul class="dropdown-menu">
+ [% FOREACH authority_type IN authority_types %]
+ <li><a href="/cgi-bin/koha/authorities/authorities.pl?authtypecode=[% authority_type.authtypecode %]">[% authority_type.authtypetext %]</a></li>
+ [% END %]
+ </ul>
+ </div>
+ [% IF servers.count > 0 %]
+ <div class="btn-group">
+ <a class="btn btn-default btn-sm" id="z3950submit" href="#"><i class="fa fa-search"></i> New from Z39.50</a>
+ </div>
[% END %]
- <span id="savemenuc">Save</span>
-[% ELSE %] [% END %]
-
- <span id="newmenuc">
- <label for="add_authtypecode">New: </label>
- <select id="add_authtypecode" name="authtypecode">
-[% FOREACH authtypesloo IN authtypesloop %]
- [% IF ( authtypesloo.selected ) %]
- <option value="[% authtypesloo.value %]" selected="selected">[% authtypesloo.authtypetext %]</option>
- [% ELSE %]
- <option value="[% authtypesloo.value %]">[% authtypesloo.authtypetext %]</option>
- [% END %]
[% END %]
- </select>
- <input type="submit" value="Add" class="button" />
- </span></form>
</div>
+
+[% END %]