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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/sru_modmapping.tt (-46 / +52 lines)
Lines 1-5 Link Here
1
[% INCLUDE 'doc-head-open.inc' %]
1
[% INCLUDE 'doc-head-open.inc' %]
2
<title>Koha &rsaquo; SRU Search fields mapping</title>
2
<title>Koha &rsaquo; SRU search fields mapping</title>
3
[% INCLUDE 'doc-head-close.inc' %]
3
[% INCLUDE 'doc-head-close.inc' %]
4
4
5
<script type="text/javascript">
5
<script type="text/javascript">
Lines 34-86 Link Here
34
<div id="custom-doc" class="yui-t7">
34
<div id="custom-doc" class="yui-t7">
35
35
36
    <div id="bd">
36
    <div id="bd">
37
        <h1>Modify SRU Search fields mapping</h1>
37
        <h1>Modify SRU search fields mapping</h1>
38
        <form id="form01" method="post">
38
        <form id="form01" method="post">
39
            <fieldset class="rows">
39
            <fieldset class="rows">
40
                <legend>Legend </legend>
40
                <div class="yui-g">
41
                <ul>
41
                    <div class="yui-u first">
42
                <li>
42
                        <ol>
43
                <label for="Title">Title: </label>
43
                            <li>
44
                <input id="title" type="text" value="[% mapping.title %]" />
44
                                <label for="title">Title: </label>
45
                </li>
45
                                <input id="title" type="text" value="[% mapping.title %]" />
46
                <li>
46
                            </li>
47
                <label for="ISBN">ISBN: </label>
47
                            <li>
48
                <input id="isbn" type="text" value="[% mapping.isbn %]" />
48
                                <label for="isbn">ISBN: </label>
49
                </li>
49
                                <input id="isbn" type="text" value="[% mapping.isbn %]" />
50
                <li>
50
                            </li>
51
                <label for="LCCall">LC Call No: </label>
51
                            <li>
52
                <input id="lccall" type="text" value="[% mapping.lccall %]" />
52
                                <label for="lccall">LC call number: </label>
53
                </li>
53
                                <input id="lccall" type="text" value="[% mapping.lccall %]" />
54
                <li>
54
                            </li>
55
                <label for="Control number">Control no: </label>
55
                            <li>
56
                <input id="controlnumber" type="text" value="[% mapping.controlnumber %]" />
56
                                <label for="controlnumber">Control number: </label>
57
                </li>
57
                                <input id="controlnumber" type="text" value="[% mapping.controlnumber %]" />
58
                <li>
58
                            </li>
59
                <label for="Any">Any: </label>
59
                            <li>
60
                <input id="srchany" type="text" value="[% mapping.srchany %]" />
60
                                <label for="srchany">Any: </label>
61
                </li>
61
                                <input id="srchany" type="text" value="[% mapping.srchany %]" />
62
                <li>
62
                            </li>
63
                <label for="Author">Author: </label>
63
                        </ol>
64
                <input id="author" type="text" value="[% mapping.author %]" />
64
                    </div>
65
                </li>
65
                    <div class="yui-u">
66
                <li>
66
                        <ol>
67
                <label for="ISSN">ISSN: </label>
67
                            <li>
68
                <input id="issn" type="text" value="[% mapping.issn %]" />
68
                                <label for="author">Author: </label>
69
                </li>
69
                                <input id="author" type="text" value="[% mapping.author %]" />
70
                <li>
70
                            </li>
71
                <label for="Subject">Subject: </label>
71
                            <li>
72
                <input id="subject" type="text" value="[% mapping.subject %]" />
72
                                <label for="issn">ISSN: </label>
73
                </li>
73
                                <input id="issn" type="text" value="[% mapping.issn %]" />
74
                <li>
74
                            </li>
75
                <label for="Dewey">Dewey: </label>
75
                            <li>
76
                <input id="dewey" type="text" value="[% mapping.dewey %]" />
76
                                <label for="subject">Subject: </label>
77
                </li>
77
                                <input id="subject" type="text" value="[% mapping.subject %]" />
78
                <li>
78
                            </li>
79
                <label for="Standard ID">Standard ID: </label>
79
                            <li>
80
                <input id="stdid" type="text" value="[% mapping.stdid %]" />
80
                                <label for="dewey">Dewey: </label>
81
                </li>
81
                                <input id="dewey" type="text" value="[% mapping.dewey %]" />
82
82
                            </li>
83
                </ul>
83
                            <li>
84
                                <label for="stdid">Standard ID: </label>
85
                                <input id="stdid" type="text" value="[% mapping.stdid %]" />
86
                            </li>
87
                        </ol>
88
                    </div>
89
                </div>
84
            </fieldset>
90
            </fieldset>
85
            <fieldset class="action">
91
            <fieldset class="action">
86
                <input type="submit" value="Save" class="submit" />
92
                <input type="submit" value="Save" class="submit" />
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/z3950servers.tt (-16 / +24 lines)
Lines 56-65 Link Here
56
            // enable recordtype to include field in post
56
            // enable recordtype to include field in post
57
            $('#recordtype').prop('disabled',false);
57
            $('#recordtype').prop('disabled',false);
58
        });
58
        });
59
        $("#servername").on("blur",function(){
60
            toUC(this);
61
        });
62
        $("#modify_sru_fields").on("click",function(){
63
            ModMapping();
64
        });
59
    });
65
    });
60
    function ModMapping () {
66
    function ModMapping () {
61
        var map= $('#show_sru_fields').val();
67
        var map= $('#show_sru_fields').val();
62
        window.open('/cgi-bin/koha/admin/sru_modmapping.pl?mapping='+map,'popup','width=800,height=400,resizable=no,toolbar=false,scrollbars=no,top');
68
        window.open('/cgi-bin/koha/admin/sru_modmapping.pl?mapping='+map,'popup','width=800,height=400,resizable=yes,toolbar=false,scrollbars=yes,top');
63
    }
69
    }
64
[% ELSE %]
70
[% ELSE %]
65
    $(document).ready(function() {
71
    $(document).ready(function() {
Lines 69-82 Link Here
69
            ],
75
            ],
70
            "sPaginationType": "four_button"
76
            "sPaginationType": "four_button"
71
        }));
77
        }));
78
        $(".delete").on("click",function(e){
79
            var servername = $(this).data("servername");
80
            if( confirm( _("Are you sure you want to delete server %s?").format(servername) ) ) {
81
                return true;
82
            } else {
83
                e.preventDefault();
84
            }
85
        });
72
    });
86
    });
73
    function ConfirmDelete(name,id) {
74
        if( confirm( _("Choose OK if you really want to delete server ")+
75
          name+'.')) {
76
            window.location="[% script_name %]?op=delete_confirmed&id="+id;
77
        }
78
        return false;
79
    }
80
[% END %]
87
[% END %]
81
//]]>
88
//]]>
82
</script>
89
</script>
Lines 116-125 Link Here
116
            <input type="hidden" name="id" value="[% server.id %]" />
123
            <input type="hidden" name="id" value="[% server.id %]" />
117
        [% ELSE %]
124
        [% ELSE %]
118
            <h1>New [% PROCESS ServerType %] server</h1>
125
            <h1>New [% PROCESS ServerType %] server</h1>
119
        [% END %]                
126
        [% END %]
120
        <fieldset class="rows">
127
        <fieldset class="rows">
121
        <ol>
128
        <ol>
122
        <li><label for="name">Server name: </label><input type="text" name="servername" id="servername" size="65" maxlength="100" onblur="toUC(this)" value="[% server.servername | html %]"/></li>
129
        <li><label for="name">Server name: </label>
130
            <input type="text" name="servername" id="servername" size="65" maxlength="100" value="[% server.servername | html %]"/>
131
        </li>
123
132
124
        <li><label for="host" class="required">Hostname: </label> <input type="text" name="host" id="host" size="30" value="[% server.host %]" required="required" /> <span class="required">Required</span>
133
        <li><label for="host" class="required">Hostname: </label> <input type="text" name="host" id="host" size="30" value="[% server.host %]" required="required" /> <span class="required">Required</span>
125
            [% IF (server.servertype||type) == 'sru' %]
134
            [% IF (server.servertype||type) == 'sru' %]
Lines 191-197 Link Here
191
        <li>
200
        <li>
192
        <label for="sru_fields">SRU Search fields mapping: </label>
201
        <label for="sru_fields">SRU Search fields mapping: </label>
193
        <input type="hidden" name="sru_fields" id="sru_fields" value="[% server.sru_fields %]" />
202
        <input type="hidden" name="sru_fields" id="sru_fields" value="[% server.sru_fields %]" />
194
        <input type="text" name="show_sru_fields" id="show_sru_fields" size="100" value="[% server.sru_fields %]" disabled/> <input type="button" value="Modify" onclick="ModMapping()" />
203
            <input type="text" name="show_sru_fields" id="show_sru_fields" size="100" value="[% server.sru_fields %]" disabled="disabled" /> <input type="button" id="modify_sru_fields" value="Modify" />
195
        </li>
204
        </li>
196
        [% END %]
205
        [% END %]
197
        <li>
206
        <li>
Lines 224-230 Link Here
224
        <tbody>
233
        <tbody>
225
        [% FOREACH loo IN loop %]
234
        [% FOREACH loo IN loop %]
226
            <tr>
235
            <tr>
227
            <td><a href="[% loo.script_name %]?op=edit&amp;id=[% loo.id %]">[% loo.servername %]</a></td><td>[% loo.host %]:[% loo.port %]</td><td>[% loo.db %]</td><td>[% loo.userid %]</td><td>[% IF loo.password %]########[% END %]</td><td>[% IF ( loo.checked ) %]Yes[% ELSE %]No[% END %]</td><td>[% loo.rank %]</td>
236
            <td><a href="/cgi-bin/koha/admin/z3950servers.pl?op=edit&amp;id=[% loo.id %]">[% loo.servername %]</a></td><td>[% loo.host %]:[% loo.port %]</td><td>[% loo.db %]</td><td>[% loo.userid %]</td><td>[% IF loo.password %]########[% END %]</td><td>[% IF ( loo.checked ) %]Yes[% ELSE %]No[% END %]</td><td>[% loo.rank %]</td>
228
            <td>[% loo.syntax %]</td><td>[% loo.encoding %]</td><td>[% loo.timeout %]</td>
237
            <td>[% loo.syntax %]</td><td>[% loo.encoding %]</td><td>[% loo.timeout %]</td>
229
            <td>[% IF ( loo.recordtype == 'biblio' )  %]
238
            <td>[% IF ( loo.recordtype == 'biblio' )  %]
230
                <span>Bibliographic</span>
239
                <span>Bibliographic</span>
Lines 238-246 Link Here
238
                        Actions <b class="caret"></b>
247
                        Actions <b class="caret"></b>
239
                    </a>
248
                    </a>
240
                    <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="reportactions[% savedreport.id %]">
249
                    <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="reportactions[% savedreport.id %]">
241
                        <li><a href="[% loo.script_name %]?op=edit&amp;id=[% loo.id %]"><i class="fa fa-pencil"></i> Edit</a></li>
250
                        <li><a href="/cgi-bin/koha/admin/z3950servers.pl?op=edit&amp;id=[% loo.id %]"><i class="fa fa-pencil"></i> Edit</a></li>
242
                        <li><a href="[% loo.script_name %]?op=add&amp;id=[% loo.id %]"><i class="fa fa-copy"></i> Copy</a></li>
251
                        <li><a href="/cgi-bin/koha/admin/z3950servers.pl?op=add&amp;id=[% loo.id %]"><i class="fa fa-copy"></i> Copy</a></li>
243
                        <li><a href="javascript:void(0);" onclick="ConfirmDelete('[% loo.servername | replace("['\"]","") %]','[% loo.id %]');"><i class="fa fa-remove"></i> Delete</a></li>
252
                        <li><a href="/cgi-bin/koha/admin/z3950servers.pl?op=delete_confirmed&amp;id=[% loo.id %]" class="delete" data-servername="[% loo.servername %]"><i class="fa fa-remove"></i> Delete</a></li>
244
                    </ul>
253
                    </ul>
245
                </div>
254
                </div>
246
            </td>
255
            </td>
247
- 

Return to bug 16308