View | Details | Raw Unified | Return to bug 9675
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/authorities-toolbar.inc (-75 / +35 lines)
Lines 1-82 Link Here
1
<div id="toolbar">
2
<script type="text/javascript">
1
<script type="text/javascript">
3
	//<![CDATA[
2
//<![CDATA[
4
3
    $(document).ready(function() {
5
	// prepare DOM for YUI Toolbar
4
        $("#delAuth").click(function(){
6
5
            confirm_deletion();
7
	 $(document).ready(function() {
6
            return false;
8
	    $("#newmenuc").empty();
9
	    $("#delAuthc").empty();
10
        $("#savemenuc").empty();
11
	    yuiToolbar();
12
	 });
13
14
	// YUI Toolbar Functions
15
16
	function yuiToolbar() {   
17
	
18
		var newmenu = [
19
			[% FOREACH authtypesloo IN authtypesloop %]{ text: "[% authtypesloo.authtypetext %]", url: "/cgi-bin/koha/authorities/authorities.pl?authtypecode=[% authtypesloo.value %]"},
20
[% END %]
21
		]
22
23
	    new YAHOO.widget.Button({
24
	        type: "menu",
25
            label: _("New authority"),
26
	        name: "newmenubutton",
27
	        menu: newmenu,
28
	        container: "newmenuc"
29
	    });  
30
		
31
		var editButton = new YAHOO.widget.Button("editAuth");
32
		
33
		var delAuthButton = new YAHOO.widget.Button({
34
          id: "delAuth", 
35
          type: "button", 
36
          label: _("Delete"), 
37
          container: "delAuthc",
38
		  onclick: {fn: confirm_deletion }
39
        });
7
        });
8
    });
40
9
41
        var savemenu = [
10
//]]>
42
            { text: _("MADS (XML)"), url: "/cgi-bin/koha/authorities/export.pl?format=mads&op=export&authid=[% authid %]" },
11
</script>
43
            { text: _("MARCXML"), url: "/cgi-bin/koha/authorities/export.pl?format=marcxml&op=export&authid=[% authid %]" },
12
<div id="toolbar" class="btn-toolbar">
44
            { text: _("MARC (non-Unicode/MARC-8)"), url: "/cgi-bin/koha/authorities/export.pl?format=marc8&op=export&authid=[% authid %]" },
45
            { text: _("MARC (Unicode/UTF-8)"), url: "/cgi-bin/koha/authorities/export.pl?format=utf8&op=export&authid=[% authid %]" },
46
        ];
47
48
        new YAHOO.widget.Button({
49
            type: "menu",
50
            label: _("Save"),
51
            name: "savemenubutton",
52
            menu: savemenu,
53
            container: "savemenuc"
54
        });
55
	}
56
13
57
	//]]>
14
[% IF ( authid ) %]
58
	</script>
15
    <div class="btn-group"><a class="btn btn-small" id="editAuth" href="authorities.pl?authid=[% authid %]"><i class="icon-pencil"></i> Edit</a></div>
59
  <form name="f2" method="post" action="authorities.pl">	
60
  
61
[% IF ( authid ) %]  <a id="editAuth" href="authorities.pl?authid=[% authid %]">Edit</a>
62
    
63
    [% UNLESS ( count ) %]
16
    [% UNLESS ( count ) %]
64
    <span id="delAuthc"><a id="delAuth" href="javascript:confirm_deletion()">Delete</a></span>
17
        <div class="btn-group"><a href="#" class="btn btn-small" id="delAuth"><i class="icon-remove"></i> Delete</a></div>
65
    [% END %]
18
    [% END %]
66
    <span id="savemenuc">Save</span>
19
67
[% ELSE %]&nbsp;[% END %]
20
    <div class="btn-group">
68
  
21
        <a class="btn btn-small dropdown-toggle" data-toggle="dropdown" href="#"><i class="icon-download-alt"></i> Save
69
  <span id="newmenuc">
22
        <span class="caret"></span>
70
	<label for="add_authtypecode">New: </label>
23
        </a>
71
        <select id="add_authtypecode" name="authtypecode">
24
        <ul class="dropdown-menu">
72
[% FOREACH authtypesloo IN authtypesloop %]
25
            <li><a href="/cgi-bin/koha/authorities/export.pl?format=mads&amp;op=export&amp;authid=[% authid %]">MADS (XML)</a></li>
73
  [% IF ( authtypesloo.selected ) %]
26
            <li><a href="/cgi-bin/koha/authorities/export.pl?format=marcxml&amp;op=export&amp;authid=[% authid %]">MARCXML</a></li>
74
        <option value="[% authtypesloo.value %]" selected="selected">[% authtypesloo.authtypetext %]</option>
27
            <li><a href="/cgi-bin/koha/authorities/export.pl?format=marc8&amp;op=export&amp;authid=[% authid %]">MARC (non-Unicode/MARC-8)</a></li>
75
  [% ELSE %]
28
            <li><a href="/cgi-bin/koha/authorities/export.pl?format=utf8&amp;op=export&amp;authid=[% authid %]">MARC (Unicode/UTF-8)</a></li>
76
        <option value="[% authtypesloo.value %]">[% authtypesloo.authtypetext %]</option>
29
        </ul>
77
  [% END %]
30
    </div>
78
[% END %]
31
[% END %]
79
        </select>
32
80
      <input type="submit" value="Add" class="button" />
33
    <div class="btn-group">
81
  </span></form>
34
        <a class="btn btn-small dropdown-toggle" data-toggle="dropdown" href="#"><i class="icon-plus"></i> New authority
35
        <span class="caret"></span>
36
        </a>
37
        <ul class="dropdown-menu">
38
            [% FOREACH authtypesloo IN authtypesloop %]
39
            <li><a href="/cgi-bin/koha/authorities/authorities.pl?authtypecode=[% authtypesloo.value %]">[% authtypesloo.authtypetext %]</a></li>
40
            [% END %]
41
        </ul>
42
    </div>
82
</div>
43
</div>
83
- 

Return to bug 9675