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

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc (-1 / +1 lines)
Lines 324-330 $(document).ready(function() { Link Here
324
    </script>
324
    </script>
325
[% END %]
325
[% END %]
326
[% IF Koha.Preference( 'OpacZ3950' ) %]
326
[% IF Koha.Preference( 'OpacZ3950' ) %]
327
<script type="text/javascript">
327
<script>
328
//<![CDATA[
328
//<![CDATA[
329
     $(document).ready(function() {
329
     $(document).ready(function() {
330
        $("#z3950searchOpac").click(function(){
330
        $("#z3950searchOpac").click(function(){
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-z3950-search.tt (-44 / +44 lines)
Lines 1-13 Link Here
1
[% USE Koha %]
1
[% USE Koha %]
2
[% USE raw %]
3
[% USE Asset %]
2
[% INCLUDE 'doc-head-open.inc' %]
4
[% INCLUDE 'doc-head-open.inc' %]
3
Koha &rsaquo; Z39.50/SRU search results
5
Koha &rsaquo; Z39.50/SRU search results
4
[% INCLUDE 'doc-head-close.inc' %]
6
[% INCLUDE 'doc-head-close.inc' %]
5
[% INCLUDE 'greybox.inc' %]
7
[% INCLUDE 'greybox.inc' %]
6
[% BLOCK cssinclude %][% END %]
8
[% BLOCK cssinclude %][% END %]
7
    <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
9
    [% Asset.css("css/datatables.css") | $raw %]
8
    <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/staff-global.css" />
9
10
10
    <style type="text/css">
11
    <style>
11
        .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;}
12
        .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;}
12
        .linktools a { font-size : 85%; text-decoration:none; padding:.3em;;background-color:#FFF; display:block;float:left;border-right:1px solid #DDD;}
13
        .linktools a { font-size : 85%; text-decoration:none; padding:.3em;;background-color:#FFF; display:block;float:left;border-right:1px solid #DDD;}
13
        .linktools a:hover { background-color:#EEE;color:#CC3300;border-right:1px solid #CCC;}
14
        .linktools a:hover { background-color:#EEE;color:#CC3300;border-right:1px solid #CCC;}
Lines 62-81 Koha &rsaquo; Z39.50/SRU search results Link Here
62
<form method="post" action="opac-z3950-search.pl" name="f">
63
<form method="post" action="opac-z3950-search.pl" name="f">
63
    <div class="row-fluid">
64
    <div class="row-fluid">
64
        <input type="hidden" name="op" id="op" value="do_search" />
65
        <input type="hidden" name="op" id="op" value="do_search" />
65
        <input type="hidden" name="biblionumber" value="[% biblionumber %]" />
66
        <input type="hidden" name="biblionumber" value="[% biblionumber | uri %]" />
66
        <input type="hidden" name="frameworkcode" value="[% frameworkcode %]" />
67
        <input type="hidden" name="frameworkcode" value="[% frameworkcode | uri %]" />
67
        <div id="search_params" class="span6 form-horizontal">
68
        <div id="search_params" class="span6 form-horizontal">
68
            <h2>Search Parameters</h2>
69
            <h2>Search Parameters</h2>
69
            <div id="search_field" class="well">
70
            <div id="search_field" class="well">
70
                [% FOREACH field IN search_fields %]
71
                [% FOREACH field IN search_fields %]
71
                    <div class="input-prepend input-block-level">
72
                    <div class="input-prepend input-block-level">
72
                        <span class="add-on">[% field.label %]</span>
73
                        <span class="add-on">[% field.label | html %]</span>
73
                        <input type="text" id="[% field.prop %]" name="[% field.prop %]" value="[% ${field.prop} %]" />
74
                        <input type="text" id="[% field.prop | html %]" name="[% field.prop | html %]" value="[% ${field.prop} | html %]" />
74
                    </div>
75
                    </div>
75
                [% END %]
76
                [% END %]
76
            </div>
77
            </div>
77
            <div class="control-group">
78
            <div class="control-group">
78
                <div calss="controls">
79
                <div class="controls">
79
                    <button onclick="$("form[name='f']").submit();" class="btn search-submit">Search</button>
80
                    <button onclick="$("form[name='f']").submit();" class="btn search-submit">Search</button>
80
                    <a href="#">Cancel</a>
81
                    <a href="#">Cancel</a>
81
                </div>
82
                </div>
Lines 96-110 Koha &rsaquo; Z39.50/SRU search results Link Here
96
          <div id="z3950_search_targets" class="well checkboxed">
97
          <div id="z3950_search_targets" class="well checkboxed">
97
        [% FOREACH serverloo IN serverloop %]
98
        [% FOREACH serverloo IN serverloop %]
98
          <div class="input-group">
99
          <div class="input-group">
99
            <label for="z3950_[% serverloo.id %]">
100
            <label for="z3950_[% serverloo.id | html %]">
100
                <input
101
                <input
101
                    style="vertical-align:-2px"
102
                    style="vertical-align:-2px;"
102
                    type="checkbox" name="id"
103
                    type="checkbox" name="id"
103
                    id="z3950_[% serverloo.id %]"
104
                    id="z3950_[% serverloo.id | html %]"
104
                    value="[% serverloo.id %]"
105
                    value="[% serverloo.id | html %]"
105
                    [% IF ( serverloo.checked ) %]checked="checked"[% END %]
106
                    [% IF ( serverloo.checked ) %]checked="checked"[% END %]
106
                />
107
                />
107
                [% serverloo.servername %]
108
                [% serverloo.servername | html %]
108
            </label>
109
            </label>
109
          </div>
110
          </div>
110
        [% END %]
111
        [% END %]
Lines 117-123 Koha &rsaquo; Z39.50/SRU search results Link Here
117
    <h2>Results</h2>
118
    <h2>Results</h2>
118
    <p>You searched for:
119
    <p>You searched for:
119
        [% FOREACH field IN search_fields %]
120
        [% FOREACH field IN search_fields %]
120
            [% IF ( ${field.prop} ) %]<em>[% field.label %]: </em><span class=term>[% ${field.prop} %]</span> [% END %]
121
            [% IF ( ${field.prop} ) %]<em>[% field.label | html %]: </em><span class=term>[% ${field.prop} | html %]</span> [% END %]
121
        [% END %]
122
        [% END %]
122
    </p>
123
    </p>
123
</div>
124
</div>
Lines 125-134 Koha &rsaquo; Z39.50/SRU search results Link Here
125
            <div class="alert alert-danger">
126
            <div class="alert alert-danger">
126
                <ul>
127
                <ul>
127
                [% FOREACH errcon IN errconn %]
128
                [% FOREACH errcon IN errconn %]
128
                    [% IF ( errcon.error == '10000' ) %]<li>Connection failed to [% errcon.server %]</li>
129
                    [% IF ( errcon.error == '10000' ) %]<li>Connection failed to [% errcon.server | html %]</li>
129
                    [% ELSIF ( errcon.error == '10007' ) %]<li>Connection timeout to [% errcon.server %]</li>
130
                    [% ELSIF ( errcon.error == '10007' ) %]<li>Connection timeout to [% errcon.server | html %]</li>
130
                    [% ELSIF ( errcon.error == 'xslt_err' ) %]<li>[% errcon.server %]: Warning: XSLT error on search result [% errcon.seq %]</li>
131
                    [% ELSIF ( errcon.error == 'xslt_err' ) %]<li>[% errcon.server | html %]: Warning: XSLT error on search result [% errcon.seq | html %]</li>
131
                    [% ELSE %]<li>[% errcon.server %] record [% errcon.seq %]: [% errcon.error %]</li>
132
                    [% ELSE %]<li>[% errcon.server | html %] record [% errcon.seq | html %]: [% errcon.error | html %]</li>
132
                    [% END %]
133
                    [% END %]
133
                [% END %]
134
                [% END %]
134
                </ul>
135
                </ul>
Lines 152-168 Koha &rsaquo; Z39.50/SRU search results Link Here
152
        </tr></thead>
153
        </tr></thead>
153
        <tbody>[% FOREACH breeding_loo IN breeding_loop %]
154
        <tbody>[% FOREACH breeding_loo IN breeding_loop %]
154
            [% IF ( breeding_loo.breedingid ) %]
155
            [% IF ( breeding_loo.breedingid ) %]
155
            <tr id="row[% breeding_loo.breedingid %]">
156
            <tr id="row[% breeding_loo.breedingid | html %]">
156
                <td>[% breeding_loo.server %] </td>
157
                <td>[% breeding_loo.server | html %] </td>
157
                <td>[% breeding_loo.title |html %]</td>
158
                <td>[% breeding_loo.title | html %]</td>
158
                <td>[% breeding_loo.author %]</td>
159
                <td>[% breeding_loo.author | html %]</td>
159
                <td>[% breeding_loo.date %]</td>
160
                <td>[% breeding_loo.date | html  %]</td>
160
                <td>[% breeding_loo.edition %]</td>
161
                <td>[% breeding_loo.edition | html %]</td>
161
                <td>[% breeding_loo.isbn %]</td>
162
                <td>[% breeding_loo.isbn | html %]</td>
162
                <td>[% breeding_loo.lccn %]</td>
163
                <td>[% breeding_loo.lccn | html %]</td>
163
                <td><a href="/cgi-bin/koha/opac-showmarc.pl?importid=[% breeding_loo.breedingid %]" title="MARC" rel="gb_page_center[600,500]">MARC</a></td>
164
                <td><a href="/cgi-bin/koha/opac-showmarc.pl?importid=[% breeding_loo.breedingid | uri %]" title="MARC" rel="gb_page_center[600,500]">MARC</a></td>
164
                <td><a href="/cgi-bin/koha/opac-showmarc.pl?viewas=card&amp;importid=[% breeding_loo.breedingid %]" title="MARC" rel="gb_page_center[600,500]">Card</a></td>
165
                <td><a href="/cgi-bin/koha/opac-showmarc.pl?viewas=card&amp;importid=[% breeding_loo.breedingid | uri %]" title="MARC" rel="gb_page_center[600,500]">Card</a></td>
165
                <td><a target="_blank" href="http://[% breeding_loo.opacurl %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% breeding_loo.biblionumber %]">Show</a></td>
166
                <td><a target="_blank" href="http://[% breeding_loo.opacurl | url %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% breeding_loo.biblionumber  | uri %]">Show</a></td>
166
            </tr>
167
            </tr>
167
            [% END %]
168
            [% END %]
168
        [% END %]</tbody>
169
        [% END %]</tbody>
Lines 172-204 Koha &rsaquo; Z39.50/SRU search results Link Here
172
173
173
<form method="post" action="opac-z3950-search.pl" id="page_form" name="page_form">
174
<form method="post" action="opac-z3950-search.pl" id="page_form" name="page_form">
174
    <input type="hidden" name="op" id="op" value="do_search" />
175
    <input type="hidden" name="op" id="op" value="do_search" />
175
    <input type="hidden" name="current_page" id="current_page" value="[% current_page %]" />
176
    <input type="hidden" name="current_page" id="current_page" value="[% current_page | html %]" />
176
    <input type="hidden" name="biblionumber" value="[% biblionumber %]" />
177
    <input type="hidden" name="biblionumber" value="[% biblionumber  | uri %]" />
177
    <input type="hidden" name="frameworkcode" value="[% frameworkcode %]" />
178
    <input type="hidden" name="frameworkcode" value="[% frameworkcode | uri %]" />
178
    [% FOREACH field IN search_fields %]
179
    [% FOREACH field IN search_fields %]
179
        <input type="hidden" name="[% field.prop %]" value="[% ${field.prop} %]" />
180
        <input type="hidden" name="[% field.prop | html %]" value="[% ${field.prop} | html %]" />
180
    [% END %]
181
    [% END %]
181
182
182
    [% FOREACH server IN servers %]
183
    [% FOREACH server IN servers %]
183
    <input type="hidden" name="id" id="z3950_[% server.id %]" value="[% server.id %]" />
184
    <input type="hidden" name="id" id="z3950_[% server.id | html %]" value="[% server.id | html %]" />
184
    [% END %]
185
    [% END %]
185
[% IF total_pages > 1 %]
186
[% IF total_pages > 1 %]
186
    <div class="row-fluid">
187
    <div class="row-fluid">
187
        <div class="span4">
188
        <div class="span4">
188
            <div class="input-prepend input-append">
189
            <div class="input-prepend input-append">
189
                [% IF ( show_prevbutton ) %]
190
                [% IF ( show_prevbutton ) %]
190
                    <button class="btn" type="button" name="changepage_prev" onclick="$('#current_page').val([% current_page %]-1);$('#page_form').submit();">Previous Page</button>
191
                    <button class="btn" type="button" name="changepage_prev" onclick="$('#current_page').val([% current_page | html %]-1);$('#page_form').submit();">Previous Page</button>
191
                [% END %]
192
                [% END %]
192
                <span class="add-on">Page [% current_page %] / [% total_pages %]</span>
193
                <span class="add-on">Page [% current_page | html %] / [% total_pages | html %]</span>
193
                [% IF ( show_nextbutton ) %]
194
                [% IF ( show_nextbutton ) %]
194
                    <button class="btn" type="button" name="changepage_next" onclick="$('#current_page').val([% current_page %]+1);$('#page_form').submit();">Next Page</button>
195
                    <button class="btn" type="button" name="changepage_next" onclick="$('#current_page').val([% current_page | html %]+1);$('#page_form').submit();">Next Page</button>
195
                [% END %]
196
                [% END %]
196
            </div>
197
            </div>
197
        </div>
198
        </div>
198
        <div class="span2 offset5">
199
        <div class="span2 offset5">
199
            <div class="input-prepend input-append">
200
            <div class="input-prepend input-append">
200
                <span class="add-on">Go to page</span>
201
                <span class="add-on">Go to page</span>
201
                <input id="goto_page" name="goto_page" value="[% current_page %]" size="4" type="text"/>
202
                <input id="goto_page" name="goto_page" value="[% current_page | html %]" size="4" type="text"/>
202
                <button class="btn" type="submit" name="changepage_goto" onclick="return validate_goto_page();">Go</button>
203
                <button class="btn" type="submit" name="changepage_goto" onclick="return validate_goto_page();">Go</button>
203
            </div>
204
            </div>
204
        </div>
205
        </div>
Lines 220-236 Koha &rsaquo; Z39.50/SRU search results Link Here
220
    </div>
221
    </div>
221
</div>
222
</div>
222
223
223
[% IF ( numberpending ) %]<h3 align="center">Still [% numberpending %] servers to search</h3>[% END %]
224
[% IF ( numberpending ) %]<h3 align="center">Still [% numberpending | html %] servers to search</h3>[% END %]
224
225
225
[% INCLUDE 'opac-bottom.inc' %]
226
[% INCLUDE 'opac-bottom.inc' %]
226
[% BLOCK jsinclude %][% END %]
227
[% BLOCK jsinclude %][% END %]
227
[% INCLUDE 'datatables.inc' %]
228
[% INCLUDE 'datatables.inc' %]
228
<script type="text/javascript" src="[% interface %]/[% theme %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
229
229
230
<script type="text/javascript">
230
<script>
231
//<![CDATA[
231
//<![CDATA[
232
function Import(GetThisOne,biblionumber) {
232
function Import(GetThisOne,biblionumber) {
233
    opener.document.location="../cataloguing/addbiblio.pl?biblionumber="+biblionumber+"&z3950=1&frameworkcode=[% frameworkcode %]&breedingid="+GetThisOne;
233
    opener.document.location="../cataloguing/addbiblio.pl?biblionumber="+biblionumber+"&z3950=1&frameworkcode=[% frameworkcode | uri %]&breedingid="+GetThisOne;
234
    window.close();
234
    window.close();
235
    return false;
235
    return false;
236
}
236
}
Lines 292-299 function validate_goto_page(){ Link Here
292
        alert(_("The page entered is not a number."));
292
        alert(_("The page entered is not a number."));
293
        return false;
293
        return false;
294
    }
294
    }
295
    else if(page < 1 || page > [% total_pages %] ) {
295
    else if(page < 1 || page > [% total_pages | html %] ) {
296
        alert(_("The page should be a number between 1 and %s.").format([% total_pages %]));
296
        alert(_("The page should be a number between 1 and %s.").format([% total_pages | html %]));
297
        return false;
297
        return false;
298
    }
298
    }
299
    else {
299
    else {
(-)a/opac/opac-z3950-search.pl (-12 / +11 lines)
Lines 5-22 Link Here
5
#
5
#
6
# This file is part of Koha.
6
# This file is part of Koha.
7
#
7
#
8
# Koha is free software; you can redistribute it and/or modify it under the
8
# Koha is free software; you can redistribute it and/or modify it
9
# terms of the GNU General Public License as published by the Free Software
9
# under the terms of the GNU General Public License as published by
10
# Foundation; either version 2 of the License, or (at your option) any later
10
# the Free Software Foundation; either version 3 of the License, or
11
# version.
11
# (at your option) any later version.
12
#
12
#
13
# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
13
# Koha is distributed in the hope that it will be useful, but
14
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
14
# WITHOUT ANY WARRANTY; without even the implied warranty of
15
# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
15
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
# GNU General Public License for more details.
16
#
17
#
17
# You should have received a copy of the GNU General Public License along
18
# You should have received a copy of the GNU General Public License
18
# with Koha; if not, write to the Free Software Foundation, Inc.,
19
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20
20
21
use strict;
21
use strict;
22
use warnings;
22
use warnings;
Lines 52-58 my ( $template, $loggedinuser, $cookie ) = get_template_and_user({ Link Here
52
        template_name   => "opac-z3950-search.tt",
52
        template_name   => "opac-z3950-search.tt",
53
        query           => $input,
53
        query           => $input,
54
        type            => "opac",
54
        type            => "opac",
55
        authnotrequired => 1,
55
        authnotrequired => ( C4::Context->preference("OpacPublic") ? 1 : 0 ),
56
        debug           => 1,
56
        debug           => 1,
57
});
57
});
58
58
59
- 

Return to bug 11361