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-28 Link Here
1
[% INCLUDE 'blocking_errors.inc' %]
1
[% INCLUDE 'blocking_errors.inc' %]
2
<script type="text/javascript">
3
//<![CDATA[
4
    $(document).ready(function() {
5
        $("#delAuth").click(function(){
6
            confirm_deletion();
7
            return false;
8
        });
9
10
        $("#z3950submit").click(function(){
11
            [% IF ( authid ) %]
12
                if (confirm(_("Please note that this Z39.50 search could replace the current record."))){
13
                    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');
14
                }
15
            [% ELSE %]
16
                window.open("/cgi-bin/koha/cataloguing/z3950_auth_search.pl","z3950search",'width=800,height=500,location=yes,toolbar=no,scrollbars=yes,resize=yes');
17
            [% END %]
18
            return false;
19
        });
20
21
    });
22
23
//]]>
24
</script>
25
26
[% IF ( authid || CAN_user_editauthorities) %]
2
[% IF ( authid || CAN_user_editauthorities) %]
27
3
28
<div id="toolbar" class="btn-toolbar">
4
<div id="toolbar" class="btn-toolbar">
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/authorities_js.inc (-2 / +52 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(id) {
35
    var is_confirmed = confirm(_("Are you sure you want to delete this authority?"));
36
    if( !id ){
37
        id = "[% authid %]";
38
    }
39
    if (is_confirmed) {
40
      window.location="authorities-home.pl?op=delete"
41
          + "&authid=" + id
42
          + "&type=intranet"
43
          + "&authtypecode=[% authtypecode %]"
44
          + "&marclist=[% marclist %]"
45
          + "&and_or=[% and_or %]"
46
          + "&excluding=[% excluding %]"
47
          + "&operator=[% operator %]"
48
          + "&orderby=[% orderby %]"
49
          + "&value=[% value |url %]"
50
          + "&startfrom=[% startfrom %]"
51
          + "&resultsperpage=[% resultsperpage %]"
52
          + "&csrf_token=[% csrf_token %]";
53
    }
54
}
55
34
$(document).ready(function () {
56
$(document).ready(function () {
35
    showMergingInProgress();
57
    showMergingInProgress();
36
    $('.merge_auth').click(function (event) {
58
    $('.merge_auth').click(function (event) {
37
        event.preventDefault();
59
        event.preventDefault();
38
        mergeAuth($(this).parents('tr').attr('data-authid'), $(this).parents('tr').find('div.authorizedheading').text());
60
        mergeAuth($(this).parents('tr').attr('data-authid'), $(this).parents('tr').find('div.authorizedheading').text());
39
    });
61
    });
62
63
    $("#delAuth").click(function(){
64
        confirm_deletion();
65
        return false;
66
    });
67
68
    $("#z3950submit").click(function(){
69
        [% IF ( authid ) %]
70
            if (confirm(_("Please note that this Z39.50 search could replace the current record."))){
71
                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');
72
            }
73
        [% ELSE %]
74
            window.open("/cgi-bin/koha/cataloguing/z3950_auth_search.pl","z3950search",'width=800,height=500,location=yes,toolbar=no,scrollbars=yes,resize=yes');
75
        [% END %]
76
        return false;
77
    });
78
79
    var searchType = '[% marclist %]';
80
    if (searchType) {
81
        if ('mainentry' == searchType) {
82
            $("#header_search").tabs( "option", "selected", 0 );
83
        } else if ('match' == searchType) {
84
            $("#header_search").tabs( "option", "selected", 1 );
85
        } else if ('all' == searchType) {
86
            $("#header_search").tabs( "option", "selected", 2 );
87
        }
88
    }
89
40
});
90
});
41
//]]>
91
42
</script>
92
</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_[% KOHA_VERSION %].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_[% KOHA_VERSION %].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/merge.tt (-34 / +41 lines)
Lines 1-47 Link Here
1
[% PROCESS 'merge-record.inc' %]
1
[% PROCESS 'merge-record.inc' %]
2
[% SET footerjs = 1 %]
2
[% INCLUDE 'doc-head-open.inc' %]
3
[% INCLUDE 'doc-head-open.inc' %]
3
<title>Koha &rsaquo; Cataloging &rsaquo; Merging records</title>
4
<title>Koha &rsaquo; Cataloging &rsaquo; Merging records</title>
4
[% INCLUDE 'doc-head-close.inc' %]
5
[% INCLUDE 'doc-head-close.inc' %]
5
<script type="text/javascript" src="[% interface %]/[% theme %]/js/merge-record_[% KOHA_VERSION %].js"></script>
6
[% INCLUDE 'merge-record-strings.inc' %]
7
<style type="text/css">
6
<style type="text/css">
8
div.record ul, div.record li { float:none; display:block; }
7
div.record ul, div.record li { float:none; display:block; }
9
div#result { margin-top: 1em; }
8
div#result { margin-top: 1em; }
10
/* We use this style "against" the li ui-tabs-nav style automatically applied */
9
/* We use this style "against" the li ui-tabs-nav style automatically applied */
11
</style>
10
</style>
12
<script type="text/javascript">
13
//<![CDATA[
14
15
    // When submiting the form
16
    function mergeformsubmit() {
17
        $('#tabs').remove();
18
    }
19
20
$(document).ready(function(){
21
    // Getting marc structure via ajax
22
    tagslib = [];
23
    $.getJSON("/cgi-bin/koha/authorities/merge_ajax.pl", {frameworkcode : "[% framework %]" }, function(json) {
24
        tagslib = json;
25
        rebuild_target($("#tabs"), $("#resultul"));
26
    });
27
28
    $('.preview-merge-reference').click(function (ev) {
29
        ev.preventDefault();
30
        newin=window.open($(this).attr('href'),'merge_reference', 'width=1000,height=600,toolbar=false,scrollbars=yes');
31
    });
32
33
    // Creating tabs
34
    $("#tabs").tabs();
35
});
36
37
38
function changeFramework(fw) {
39
    $("#Frameworks").val(fw);
40
}
41
42
//]]>
43
</script>
44
</head>
11
</head>
12
45
<body id="auth_merge" class="cat">
13
<body id="auth_merge" class="cat">
46
[% INCLUDE 'header.inc' %]
14
[% INCLUDE 'header.inc' %]
47
[% INCLUDE 'authorities-search.inc' %]
15
[% INCLUDE 'authorities-search.inc' %]
Lines 139-142 function changeFramework(fw) { Link Here
139
</div>
107
</div>
140
</div>
108
</div>
141
109
110
[% MACRO jsinclude BLOCK %]
111
    [% INCLUDE 'merge-record-strings.inc' %]
112
    [% INCLUDE 'authorities_js.inc' %]
113
    <script type="text/javascript" src="[% interface %]/[% theme %]/js/merge-record_[% KOHA_VERSION %].js"></script>
114
    [% INCLUDE 'merge-record-strings.inc' %]
115
    <script type="text/javascript">
116
    //<![CDATA[
117
118
        // When submiting the form
119
        function mergeformsubmit() {
120
            $('#tabs').remove();
121
        }
122
123
    $(document).ready(function(){
124
        // Getting marc structure via ajax
125
        tagslib = [];
126
        $.getJSON("/cgi-bin/koha/authorities/merge_ajax.pl", {frameworkcode : "[% framework %]" }, function(json) {
127
            tagslib = json;
128
            rebuild_target($("#tabs"), $("#resultul"));
129
        });
130
131
        $('.preview-merge-reference').click(function (ev) {
132
            ev.preventDefault();
133
            newin=window.open($(this).attr('href'),'merge_reference', 'width=1000,height=600,toolbar=false,scrollbars=yes');
134
        });
135
136
        // Creating tabs
137
        $("#tabs").tabs();
138
    });
139
140
141
    function changeFramework(fw) {
142
        $("#Frameworks").val(fw);
143
    }
144
145
    //]]>
146
    </script>
147
[% END %]
148
142
[% INCLUDE 'intranet-bottom.inc' %]
149
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist.tt (-39 / +7 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
    [% INCLUDE 'authorities_js.inc' %]
86
[% END %]
87
119
[% INCLUDE 'intranet-bottom.inc' %]
88
[% INCLUDE 'intranet-bottom.inc' %]
120
- 

Return to bug 19785