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

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/authorities-search.inc (-16 lines)
Lines 1-22 Link Here
1
<div class="gradient">
1
<div class="gradient">
2
<h1 id="logo"><a href="/cgi-bin/koha/mainpage.pl">[% LibraryName %]</a></h1>
2
<h1 id="logo"><a href="/cgi-bin/koha/mainpage.pl">[% LibraryName %]</a></h1>
3
<!-- Begin Authorities Resident Search Box -->
3
<!-- Begin Authorities Resident Search Box -->
4
<script type="text/javascript">
5
//<![CDATA[
6
    $(document).ready(function() {
7
        var searchType = '[% marclist %]';
8
        if (searchType) {
9
            if ('mainentry' == searchType) {
10
                $("#header_search").tabs( "option", "selected", 0 );
11
            } else if ('match' == searchType) {
12
                $("#header_search").tabs( "option", "selected", 1 );
13
            } else if ('all' == searchType) {
14
                $("#header_search").tabs( "option", "selected", 2 );
15
            }
16
        }
17
    });
18
//]]>
19
</script>
20
<div id="header_search" class="residentsearch">
4
<div id="header_search" class="residentsearch">
21
    <div id="mainmain_heading" class="residentsearch">
5
    <div id="mainmain_heading" class="residentsearch">
22
    <p class="tip">Enter main heading ($a only):</p>
6
    <p class="tip">Enter main heading ($a only):</p>
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/authorities-toolbar.inc (-24 lines)
Lines 1-27 Link Here
1
<script type="text/javascript">
2
//<![CDATA[
3
    $(document).ready(function() {
4
        $("#delAuth").click(function(){
5
            confirm_deletion();
6
            return false;
7
        });
8
9
        $("#z3950submit").click(function(){
10
            [% IF ( authid ) %]
11
                if (confirm(_("Please note that this Z39.50 search could replace the current record."))){
12
                    window.open("/cgi-bin/koha/cataloguing/z3950_auth_search.pl?authid=[% authid %]","z3950search",'width=800,height=500,location=yes,toolbar=no,scrollbars=yes,resize=yes');
13
                }
14
            [% ELSE %]
15
                window.open("/cgi-bin/koha/cataloguing/z3950_auth_search.pl","z3950search",'width=800,height=500,location=yes,toolbar=no,scrollbars=yes,resize=yes');
16
            [% END %]
17
            return false;
18
        });
19
20
    });
21
22
//]]>
23
</script>
24
25
[% IF ( authid || CAN_user_editauthorities) %]
1
[% IF ( authid || CAN_user_editauthorities) %]
26
2
27
<div id="toolbar" class="btn-toolbar">
3
<div id="toolbar" class="btn-toolbar">
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/authorities_js.inc (-2 / +37 lines)
Lines 1-5 Link Here
1
<script type="text/javascript">
1
<script type="text/javascript">
2
//<![CDATA[
2
3
function mergeAuth(authid, summary) {
3
function mergeAuth(authid, summary) {
4
    var alreadySelected = $.cookie('auth_to_merge');
4
    var alreadySelected = $.cookie('auth_to_merge');
5
    if (alreadySelected !== undefined) {
5
    if (alreadySelected !== undefined) {
Lines 31-42 function showMergingInProgress() { Link Here
31
    }
31
    }
32
}
32
}
33
33
34
function confirm_deletion() {
35
    var is_confirmed = confirm(_("Are you sure you want to delete this authority?"));
36
    if (is_confirmed) {
37
        window.location="authorities-home.pl?op=delete&authid=[% authid %]&csrf_token=[% csrf_token %]";
38
    }
39
}
40
34
$(document).ready(function () {
41
$(document).ready(function () {
35
    showMergingInProgress();
42
    showMergingInProgress();
36
    $('.merge_auth').click(function (event) {
43
    $('.merge_auth').click(function (event) {
37
        event.preventDefault();
44
        event.preventDefault();
38
        mergeAuth($(this).parents('tr').attr('data-authid'), $(this).parents('tr').find('div.authorizedheading').text());
45
        mergeAuth($(this).parents('tr').attr('data-authid'), $(this).parents('tr').find('div.authorizedheading').text());
39
    });
46
    });
47
48
    $("#delAuth").click(function(){
49
        confirm_deletion();
50
        return false;
51
    });
52
53
    $("#z3950submit").click(function(){
54
        [% IF ( authid ) %]
55
            if (confirm(_("Please note that this Z39.50 search could replace the current record."))){
56
                window.open("/cgi-bin/koha/cataloguing/z3950_auth_search.pl?authid=[% authid %]","z3950search",'width=800,height=500,location=yes,toolbar=no,scrollbars=yes,resize=yes');
57
            }
58
        [% ELSE %]
59
            window.open("/cgi-bin/koha/cataloguing/z3950_auth_search.pl","z3950search",'width=800,height=500,location=yes,toolbar=no,scrollbars=yes,resize=yes');
60
        [% END %]
61
        return false;
62
    });
63
64
    var searchType = '[% marclist %]';
65
    if (searchType) {
66
        if ('mainentry' == searchType) {
67
            $("#header_search").tabs( "option", "selected", 0 );
68
        } else if ('match' == searchType) {
69
            $("#header_search").tabs( "option", "selected", 1 );
70
        } else if ('all' == searchType) {
71
            $("#header_search").tabs( "option", "selected", 2 );
72
        }
73
    }
74
40
});
75
});
41
//]]>
76
42
</script>
77
</script>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities-home.tt (-21 / +7 lines)
Lines 1-28 Link Here
1
[% SET footerjs = 1 %]
1
[% INCLUDE 'doc-head-open.inc' %]
2
[% INCLUDE 'doc-head-open.inc' %]
2
<title>Koha &rsaquo; Authorities</title>
3
<title>Koha &rsaquo; Authorities</title>
3
[% INCLUDE 'doc-head-close.inc' %]
4
[% INCLUDE 'doc-head-close.inc' %]
4
<script language="JavaScript" type="text/javascript">
5
//<![CDATA[
6
function Help() {
7
    newin=window.open("/cgi-bin/koha/help.pl","KohaHelp",'width=600,height=600,toolbar=false,scrollbars=yes');
8
}
9
10
function addauthority() {
11
    X = document.forms[0].authtype.value;
12
    window.location="/cgi-bin/koha/authorities/authorities.pl?authtypecode="+X;
13
}
14
function searchauthority() {
15
    X = document.forms[0].authtype2.value;
16
    Y = document.forms[0].value.value;
17
    window.location="/cgi-bin/koha/authorities/authorities-home.pl?op=do_search&type=intranet&authtypecode="+X+"&value="+Y+"&marclist=&and_or=and&excluding=&operator=contains";
18
}
19
function confirm_deletion() {   // not really implemented, but required by phantom delAuthButton code in authorities-toolbar.inc
20
    return true;
21
}
22
//]]>
23
</script>
24
[% INCLUDE 'authorities_js.inc' %]
25
</head>
5
</head>
6
26
<body id="auth_authorities_home" class="auth">
7
<body id="auth_authorities_home" class="auth">
27
[% INCLUDE 'header.inc' %]
8
[% INCLUDE 'header.inc' %]
28
[% INCLUDE 'authorities-search.inc' %]
9
[% INCLUDE 'authorities-search.inc' %]
Lines 41-44 function confirm_deletion() { // not really implemented, but required by phant Link Here
41
    </div>
22
    </div>
42
    </div>
23
    </div>
43
  </div>
24
  </div>
25
26
[% MACRO jsinclude BLOCK %]
27
    [% INCLUDE 'authorities_js.inc' %]
28
[% END %]
29
44
[% INCLUDE 'intranet-bottom.inc' %]
30
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/detail.tt (-49 / +26 lines)
Lines 1-3 Link Here
1
[% SET footerjs = 1 %]
1
[% PROCESS 'authorities.inc' %]
2
[% PROCESS 'authorities.inc' %]
2
[% INCLUDE 'doc-head-open.inc' %]
3
[% INCLUDE 'doc-head-open.inc' %]
3
<title>Koha &rsaquo; Authorities &rsaquo;
4
<title>Koha &rsaquo; Authorities &rsaquo;
Lines 8-63 Link Here
8
    [% END %]
9
    [% END %]
9
</title>
10
</title>
10
[% INCLUDE 'doc-head-close.inc' %]
11
[% INCLUDE 'doc-head-close.inc' %]
11
[% IF ( displayhierarchy ) %]
12
<script type="text/javascript" src="/intranet-tmpl/lib/jquery/plugins/jquery.jstree.js"></script>
13
[% END %]
14
<script type="text/javascript">
15
16
//<![CDATA[
17
18
	 $(document).ready(function() {
19
    $('#authoritiestabs').tabs();
20
    [% IF ( displayhierarchy ) %]
21
        var current_nodes = [];
22
        $('.currentauth').each(function() {
23
            current_nodes.push('#' + $(this).parent().parents('li:first').attr('id'));
24
            });
25
        $('#hierarchies').jstree({
26
                "plugins": [ "themes", "html_data"],
27
                "themes": { "theme": "classic",
28
                            "icons": false },
29
                "core": { "initially_open": current_nodes }
30
            });
31
    [% END %]
32
	 });
33
34
function confirm_deletion() {
35
    var is_confirmed = confirm(_("Are you sure you want to delete this authority?"));
36
    if (is_confirmed) {
37
        window.location="authorities-home.pl?op=delete&authid=[% authid %]&csrf_token=[% csrf_token %]";
38
    }
39
}
40
function Dopop(link) {
41
	newin=window.open(link,'width=500,height=400,toolbar=false,scrollbars=yes');
42
}
43
//]]>
44
</script>
45
<script type="text/javascript">
46
function Help() {
47
    newin=window.open("/cgi-bin/koha/help.pl","KohaHelp",'width=600,height=600,toolbar=false,scrollbars=yes');
48
}
49
50
function addauthority() {
51
    X = document.forms[0].authtype.value;
52
    window.location="/cgi-bin/koha/authorities/authorities.pl?authtypecode="+X;
53
}
54
function searchauthority() {
55
    X = document.forms[0].authtype2.value;
56
    Y = document.forms[0].value.value;
57
    window.location="/cgi-bin/koha/authorities/authorities-home.pl?op=do_search&type=intranet&authtypecode="+X+"&value="+Y+"&marclist=&and_or=and&excluding=&operator=contains";
58
}
59
</script>
60
</head>
12
</head>
13
61
<body id="auth_detail" class="auth">
14
<body id="auth_detail" class="auth">
62
[% INCLUDE 'header.inc' %]
15
[% INCLUDE 'header.inc' %]
63
[% INCLUDE 'authorities-search.inc' %]
16
[% INCLUDE 'authorities-search.inc' %]
Lines 143-146 function searchauthority() { Link Here
143
[% END %]
96
[% END %]
144
</div>
97
</div>
145
98
99
[% MACRO jsinclude BLOCK %]
100
    [% INCLUDE 'authorities_js.inc' %]
101
    [% IF ( displayhierarchy ) %]
102
        <script type="text/javascript" src="/intranet-tmpl/lib/jquery/plugins/jquery.jstree.js"></script>
103
    [% END %]
104
    <script type="text/javascript">
105
        $(document).ready(function() {
106
            $('#authoritiestabs').tabs();
107
            [% IF ( displayhierarchy ) %]
108
                var current_nodes = [];
109
                $('.currentauth').each(function() {
110
                    current_nodes.push('#' + $(this).parent().parents('li:first').attr('id'));
111
                    });
112
                $('#hierarchies').jstree({
113
                        "plugins": [ "themes", "html_data"],
114
                        "themes": { "theme": "classic",
115
                                    "icons": false },
116
                        "core": { "initially_open": current_nodes }
117
                    });
118
            [% END %]
119
         });
120
    </script>
121
[% END %]
122
146
[% INCLUDE 'intranet-bottom.inc' %]
123
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist.tt (-39 / +27 lines)
Lines 1-46 Link Here
1
[% SET footerjs = 1 %]
1
[% PROCESS 'authorities-search-results.inc' %]
2
[% PROCESS 'authorities-search-results.inc' %]
2
[% INCLUDE 'doc-head-open.inc' %]
3
[% INCLUDE 'doc-head-open.inc' %]
3
<title>Koha &rsaquo; Authorities &rsaquo; Authority search results</title>
4
<title>Koha &rsaquo; Authorities &rsaquo; Authority search results</title>
4
[% INCLUDE 'doc-head-close.inc' %]
5
[% INCLUDE 'doc-head-close.inc' %]
5
<script type="text/javascript">
6
//<![CDATA[
7
8
function confirm_deletion(id) {
9
    var is_confirmed = confirm(_("Are you sure you want to delete this authority?"));
10
    if (is_confirmed) {
11
      window.location="authorities-home.pl?op=delete"
12
          + "&authid=" + id
13
          + "&type=intranet"
14
          + "&authtypecode=[% authtypecode %]"
15
          + "&marclist=[% marclist %]"
16
          + "&and_or=[% and_or %]"
17
          + "&excluding=[% excluding %]"
18
          + "&operator=[% operator %]"
19
          + "&orderby=[% orderby %]"
20
          + "&value=[% value |url %]"
21
          + "&startfrom=[% startfrom %]"
22
          + "&resultsperpage=[% resultsperpage %]"
23
          + "&csrf_token=[% csrf_token %]";
24
    }
25
}
26
27
function Help() {
28
    newin=window.open("/cgi-bin/koha/help.pl","KohaHelp",'width=600,height=600,toolbar=false,scrollbars=yes');
29
}
30
31
function addauthority() {
32
    X = document.forms[0].authtype.value;
33
    window.location="/cgi-bin/koha/authorities/authorities.pl?authtypecode="+X;
34
}
35
function searchauthority() {
36
    X = document.forms[0].authtype2.value;
37
    Y = document.forms[0].value.value;
38
    window.location="/cgi-bin/koha/authorities/authorities-home.pl?op=do_search&type=intranet&authtypecode="+X+"&value="+Y+"&marclist=&and_or=and&excluding=&operator=contains";
39
}
40
//]]>
41
</script>
42
[% INCLUDE 'authorities_js.inc' %]
43
</head>
6
</head>
7
44
<body id="auth_searchresultlist" class="auth">
8
<body id="auth_searchresultlist" class="auth">
45
[% INCLUDE 'header.inc' %]
9
[% INCLUDE 'header.inc' %]
46
[% INCLUDE 'authorities-search.inc' %]
10
[% INCLUDE 'authorities-search.inc' %]
Lines 116-119 function searchauthority() { Link Here
116
</div>
80
</div>
117
</div>
81
</div>
118
</div>
82
</div>
83
84
[% MACRO jsinclude BLOCK %]
85
    <script type="text/javascript">
86
        function confirm_deletion(id) {
87
            var is_confirmed = confirm(_("Are you sure you want to delete this authority?"));
88
            if (is_confirmed) {
89
              window.location="authorities-home.pl?op=delete"
90
                  + "&authid=" + id
91
                  + "&type=intranet"
92
                  + "&authtypecode=[% authtypecode %]"
93
                  + "&marclist=[% marclist %]"
94
                  + "&and_or=[% and_or %]"
95
                  + "&excluding=[% excluding %]"
96
                  + "&operator=[% operator %]"
97
                  + "&orderby=[% orderby %]"
98
                  + "&value=[% value |url %]"
99
                  + "&startfrom=[% startfrom %]"
100
                  + "&resultsperpage=[% resultsperpage %]"
101
                  + "&csrf_token=[% csrf_token %]";
102
            }
103
        }
104
    </script>
105
    [% INCLUDE 'authorities_js.inc' %]
106
[% END %]
107
119
[% INCLUDE 'intranet-bottom.inc' %]
108
[% INCLUDE 'intranet-bottom.inc' %]
120
- 

Return to bug 19785