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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_auth_search.tt (-70 / +89 lines)
Lines 1-37 Link Here
1
[% SET footerjs = 1 %]
1
[% SET footerjs = 1 %]
2
[% INCLUDE 'doc-head-open.inc' %]
2
[% INCLUDE 'doc-head-open.inc' %]
3
<title>Koha &rsaquo; Z39.50 search results</title>
3
[% IF ( opsearch ) %]
4
    <title>Koha &rsaquo; Z39.50 authority search points</title>
5
[% ELSE %]
6
    <title>Koha &rsaquo; Z39.50 authority search results</title>
7
    [% END %]
4
[% INCLUDE 'doc-head-close.inc' %]
8
[% INCLUDE 'doc-head-close.inc' %]
5
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
9
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
6
<style type="text/css">
10
<style type="text/css">
7
.linktools { background-color:#FFF;border-top:1px solid #DDD; border-left: 1px solid #DDD; border-right: 1px solid #666; border-bottom:1px solid #666;display: none; white-space: nowrap;}
11
    #marcPreview { width : 90%; top: 5%; } .modal-body { max-height: 380px; } .modal-header { padding: 0 14px; } @media (max-width: 767px) { #marcPreview { margin: 0; width : auto; } }
8
.linktools a { font-size : 85%; text-decoration:none; padding:.3em;;background-color:#FFF; display:block;float:left;border-right:1px solid #DDD;}
9
.linktools a:hover { background-color:#EEE;color:#CC3300;border-right:1px solid #CCC;}
10
tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : transparent; } #marcPreview { width : 90%; top: 5%; } .modal-body { max-height: 380px; } .modal-header { padding: 0 14px; } @media (max-width: 767px) { #marcPreview { margin: 0; width : auto; } }
11
</style>
12
</style>
12
13
13
[% IF ( opsearch ) %]
14
<body id="cat_z3950_auth_search" class="cat">
14
    <style type="text/css">
15
    <div class="container-fluid">
15
    #custom-doc { width:53em;*width:51.72em;min-width:689px; margin:auto; text-align:left; }
16
    </style>
17
    </head>
18
    <body id="cat_z3950_auth_search" class="cat">
19
    <div id="custom-doc" class="yui-t7">
20
[% ELSE %]
21
    </head>
22
16
23
    <body id="cat_z3950_search" class="cat" style="padding:.5em;">
24
    <div>
25
[% END %]
26
27
    <div id="bd">
28
    [% IF ( opsearch ) %]
17
    [% IF ( opsearch ) %]
29
        <h2>Z39.50 Authority search points</h2>
18
        <h2>Z39.50 authority search points</h2>
30
        <form method="post" action="z3950_auth_search.pl" name="f" class="checkboxed">
19
        <form method="post" action="z3950_auth_search.pl" name="f" class="checkboxed">
31
        <input type="hidden" name="op" id="op" value="do_search" />
20
        <input type="hidden" name="op" id="op" value="do_search" />
32
        <input type="hidden" name="authid" value="[% authid %]" />
21
        <input type="hidden" name="authid" value="[% authid %]" />
33
        <div class="yui-g">
22
            <div class="row">
34
            <div class="yui-u first">
23
            <div class="col-xs-6">
35
                <fieldset class="rows">
24
                <fieldset class="rows">
36
                <ol>
25
                <ol>
37
                    <li><label for="srchany">Keyword (any): </label> <input type="text" id="srchany" name="srchany" value="" /></li>
26
                    <li><label for="srchany">Keyword (any): </label> <input type="text" id="srchany" name="srchany" value="" /></li>
Lines 43-79 tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : Link Here
43
                </ol>
32
                </ol>
44
                </fieldset>
33
                </fieldset>
45
            </div>
34
            </div>
46
            <div class="yui-u">
35
            <div class="col-xs-6">
47
                <fieldset class="rows">
36
                <div class="row">
48
                <ol>
37
                    <fieldset class="rows">
49
                    <li><label for="subject">Subject heading: </label> <input type="text" id="subject" name="subject" value="" /></li>
38
                    <ol>
50
                    <li><label for="subjectsubdiv">Subject sub-division: </label> <input type="text" id="subjectsubdiv" name="subjectsubdiv" value="" /></li>
39
                        <li><label for="subject">Subject heading: </label> <input type="text" id="subject" name="subject" value="" /></li>
51
                    <li><label for="title">Title (any): </label> <input type="text" id="title"  name="title" value="[% title | html %]" /></li>
40
                        <li><label for="subjectsubdiv">Subject sub-division: </label> <input type="text" id="subjectsubdiv" name="subjectsubdiv" value="" /></li>
52
                    <li><label for="uniformtitle">Title (uniform): </label> <input type="text" id="uniformtitle"  name="uniformtitle" value="[% uniformtitle | html %]" /></li>
41
                        <li><label for="title">Title (any): </label> <input type="text" id="title"  name="title" value="[% title | html %]" /></li>
53
                    <li><a id="resetZ3950Search" href="#"><i class="fa fa-trash"></i> Clear search form</a></li>
42
                        <li><label for="uniformtitle">Title (uniform): </label> <input type="text" id="uniformtitle"  name="uniformtitle" value="[% uniformtitle | html %]" /></li>
54
                </ol>
43
                        <li><a id="resetZ3950Search" href="#"><i class="fa fa-trash"></i> Clear search form</a></li>
55
                </fieldset>
44
                    </ol>
56
            </div>
45
                    </fieldset>
57
            <div class="yui-g">
46
                </div>
58
                <h2>Search targets</h2>
47
59
                <div id="z3950_search_targets_auth">
48
                <div class="row">
60
                    <span class="z3950checks"><span class="checkall"><a id="CheckAll" href="#"><i class="fa fa-check"></i> Select all</a></span> | <span class="clearall"><a id="CheckNone" href="#"><i class="fa fa-remove"></i> Clear all</a></span></span>
49
                    <h2>Search targets</h2>
61
                [% FOREACH serverloo IN serverloop %]
50
                    <div id="z3950_search_targets_auth">
62
                    <p>
51
                        <span class="z3950checks"><span class="checkall"><a id="CheckAll" href="#"><i class="fa fa-check"></i> Select all</a></span> | <span class="clearall"><a id="CheckNone" href="#"><i class="fa fa-remove"></i> Clear all</a></span></span>
63
                    [% IF ( serverloo.checked ) %]
52
                    [% FOREACH serverloo IN serverloop %]
64
                        <input type="checkbox" name="id" id="z3950_[% serverloo.id %]" value="[% serverloo.id %]" checked="checked" />
53
                        <p>
65
                    [% ELSE %]
54
                        [% IF ( serverloo.checked ) %]
66
                        <input type="checkbox" name="id" id="z3950_[% serverloo.id %]" value="[% serverloo.id %]" />
55
                            <input type="checkbox" name="id" id="z3950_[% serverloo.id %]" value="[% serverloo.id %]" checked="checked" />
56
                        [% ELSE %]
57
                            <input type="checkbox" name="id" id="z3950_[% serverloo.id %]" value="[% serverloo.id %]" />
58
                        [% END %]
59
                        <label for="z3950_[% serverloo.id %]">[% serverloo.servername %]</label>
60
                        </p>
67
                    [% END %]
61
                    [% END %]
68
                    <label for="z3950_[% serverloo.id %]">[% serverloo.servername %]</label>
62
                    </div>
69
                    </p>
70
                [% END %]
71
                </div>
63
                </div>
72
            </div>
64
            </div>
65
            </div>
73
        <fieldset class="action"><input type="submit"  class="submit" value="Search"/> <a class="cancel close" href="#">Cancel</a></fieldset>
66
        <fieldset class="action"><input type="submit"  class="submit" value="Search"/> <a class="cancel close" href="#">Cancel</a></fieldset>
74
        </form>
67
        </form>
75
[% ELSE %]
68
[% ELSE %]
76
    <h2>Results for Authority Records</h2>
69
    <h2>Results for authority records</h2>
77
    [% IF ( breeding_loop ) %]
70
    [% IF ( breeding_loop ) %]
78
    <table id="resultst">
71
    <table id="resultst">
79
<thead>    <tr>
72
<thead>    <tr>
Lines 85-96 tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : Link Here
85
    <tbody>[% FOREACH breeding_loo IN breeding_loop %]
78
    <tbody>[% FOREACH breeding_loo IN breeding_loop %]
86
        [% IF ( breeding_loo.breedingid ) %]
79
        [% IF ( breeding_loo.breedingid ) %]
87
        <tr id="row[% breeding_loo.breedingid %]">
80
        <tr id="row[% breeding_loo.breedingid %]">
88
            <td>[% breeding_loo.server %] <div class="linktools"><a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% breeding_loo.breedingid %]" class="previewMARC">Preview MARC</a> <a href="#" class="import_record" data-breedingid="[% breeding_loo.breedingid %]" data-heading_code="[% breeding_loo.heading_code %]" data-authid="[% breeding_loo.authid %]">Import</a><a href="#" id="close_menu" title="Close this menu"> X </a></div> </td>
81
            <td>[% breeding_loo.server %]</td>
89
            <td>[% breeding_loo.heading %]</td>
82
            <td>[% breeding_loo.heading %]</td>
90
            <td>[% breeding_loo.heading_code %]</td>
83
            <td>[% breeding_loo.heading_code %]</td>
91
            <td class="actions">
84
            <td class="actions">
92
                <a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% breeding_loo.breedingid %]" class="previewMARC btn btn-default btn-xs"><i class="fa fa-eye"></i> Show MARC</a>
85
                <div class="dropdown">
93
                <a href="#" class="import_record btn btn-default btn-xs" data-breedingid="[% breeding_loo.breedingid %]" data-heading_code="[% breeding_loo.heading_code %]" data-authid="[% breeding_loo.authid %]"><i class="fa fa-download"></i> Import</a>
86
                    <a class="btn btn-default btn-xs dropdown-toggle" id="cataloguesearchactions[% breeding_loo.breedingid %]" role="button" data-toggle="dropdown" href="#">
87
                      Actions <b class="caret"></b>
88
                    </a>
89
                    <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="cataloguesearchactions[% breeding_loo.breedingid %]">
90
                        <li><a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% breeding_loo.breedingid %]" class="previewMARC"><i class="fa fa-eye"></i> MARC preview</a></li>
91
                        <li><a href="#" class="import_record" data-breedingid="[% breeding_loo.breedingid %]" data-heading_code="[% breeding_loo.heading_code %]" data-authid="[% breeding_loo.authid %]"><i class="fa fa-download"></i> Import</a></li>
92
                    </ul>
93
                </div>
94
            </td>
94
            </td>
95
        </tr>
95
        </tr>
96
        [% END %]
96
        [% END %]
Lines 158-165 tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : Link Here
158
    [% END %]
158
    [% END %]
159
159
160
[% END %]
160
[% END %]
161
</div>
162
</div>
163
161
164
[% IF ( numberpending ) %]<h3 align="center">Still [% numberpending %] servers to search</h3>[% END %]
162
[% IF ( numberpending ) %]<h3 align="center">Still [% numberpending %] servers to search</h3>[% END %]
165
163
Lines 169-198 tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : Link Here
169
    <script type="text/javascript">
167
    <script type="text/javascript">
170
        $(document).ready(function(){
168
        $(document).ready(function(){
171
169
170
            $(".dropdown").on("hidden.bs.dropdown", function(){
171
                // Reset menu styles so that a click on the
172
                // original dropdown button toggle works correctly
173
                $(".dropdown").css("position","absolute");
174
                $(".dropdown-menu").css({
175
                    "top" : "100%",
176
                    "left" : "auto",
177
                    "right" : 0
178
                });
179
            });
180
172
            $("#resultst").dataTable($.extend(true, {}, dataTablesDefaults, {
181
            $("#resultst").dataTable($.extend(true, {}, dataTablesDefaults, {
173
                "sDom": 't',
182
                "sDom": 't',
174
                "aoColumnDefs": [
183
                "aoColumnDefs": [
175
                    { "aTargets": [ -1,-2 ], "bSortable": false, "bSearchable": false },
184
                    { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
176
                ],
185
                ],
177
                "aaSorting": [[ 1, "asc" ]],
186
                "aaSorting": [[ 1, "asc" ]],
178
                "bPaginate": false
187
                "bPaginate": false
179
            }));
188
            }));
180
                /* Inline edit/delete links */
189
181
                $("td").click(function(event){
190
            /* Display actions menu anywhere the table is clicked */
182
                    var $tgt = $(event.target);
191
            $("td").click(function(event){
183
                    var row = $(this).parent();
192
                var tgt = $(event.target);
184
                    $(".linktools").hide();
193
                var row = $(this).parent();
185
                    $("tr").removeClass("selected");
194
                var rowid = row.attr("id");
186
                    row.addClass("selected");
195
                $("tr").removeClass("highlighted-row");
187
                    if($tgt.is("a")||$tgt.is(":nth-child(4)")||$tgt.is(":nth-child(5)")){
196
                row.addClass("highlighted-row");
188
                        //Don't show inline links for cells containing links of their own.
197
                $(".dropdown").removeClass("open");
189
                    } else {
198
                if(tgt.is("a")||tgt.is(":nth-child(8)")){
190
                        var position = $(this).offset();
199
                    // Don't show inline links for cells containing links of their own.
191
                        var top = position.top+5;
200
                } else {
192
                        var left = position.left+5;
201
                    event.stopPropagation();
193
                        $(".linktools",row).show().css("position","absolute").css("top",top).css("left",left);
202
                    var dropdown = $(".dropdown", row);
194
                    }
203
                    dropdown.addClass("open");
195
                });
204
                    var position = $(this).offset();
205
                    var top = position.top + 5;
206
                    var left = position.left + 5;
207
                    dropdown.css("position","unset");
208
                    $(".dropdown-menu", row).css({
209
                        "top" : top,
210
                        "left" : left,
211
                        "right" : "unset"
212
                    });
213
214
               }
215
            });
196
216
197
        });
217
        });
198
    </script>
218
    </script>
199
- 

Return to bug 19946