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

(-)a/installer/data/mysql/kohastructure.sql (-1 / +1 lines)
Lines 2295-2301 CREATE TABLE `z3950servers` ( -- connection information for the Z39.50 targets u Link Here
2295
  `sru_options` varchar(255) default NULL, -- options like sru=get, sru_version=1.1; will be passed to the server via ZOOM
2295
  `sru_options` varchar(255) default NULL, -- options like sru=get, sru_version=1.1; will be passed to the server via ZOOM
2296
  `sru_fields` LONGTEXT default NULL, -- contains the mapping between the Z3950 search fields and the specific SRU server indexes
2296
  `sru_fields` LONGTEXT default NULL, -- contains the mapping between the Z3950 search fields and the specific SRU server indexes
2297
  `add_xslt` LONGTEXT default NULL, -- zero or more paths to XSLT files to be processed on the search results
2297
  `add_xslt` LONGTEXT default NULL, -- zero or more paths to XSLT files to be processed on the search results
2298
  `attributes` VARCHAR(255) default NULL, -- additionnal attributes passed to PQF queries
2298
  `attributes` VARCHAR(255) default NULL, -- additional attributes passed to PQF queries
2299
  PRIMARY KEY  (`id`)
2299
  PRIMARY KEY  (`id`)
2300
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
2300
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
2301
2301
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/z3950servers.tt (-2 / +72 lines)
Lines 18-23 Link Here
18
[% IF op == 'list' %]
18
[% IF op == 'list' %]
19
    <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
19
    <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
20
[% END %]
20
[% END %]
21
22
<script type="text/javascript">
23
//<![CDATA[
24
[% IF ( add_form ) %]
25
    $(document).ready(function(){
26
        // Update selects for syntax, encoding and recordtype
27
        [% IF server %]
28
            $("#syntax").val('[% server.syntax %]');
29
            $("#encoding").val('[% server.encoding %]');
30
            $("#recordtype").val('[% server.recordtype %]');
31
        [% END %]
32
        // Disable recordtype (and default to bib) for non-Z3950 servers until auth is supported
33
        [% UNLESS (server.servertype||type) == 'zed' %]
34
            $("#recordtype").prop('disabled',true);
35
        [% END %]
36
        $( "#serverentry" ).validate({
37
            rules: {
38
                servername: { required: true },
39
                host: { required: true },
40
                port: {
41
                    required: true,
42
                    number: true
43
                },
44
                db: { required: true },
45
                rank: { number: true },
46
                timeout: { number: true }
47
            }
48
        });
49
        $("#serverentry").submit(function( event ) {
50
            // first test if show_sru_fields exists
51
            if( $('#show_sru_fields').length && $('#show_sru_fields').val()=='' && !confirm( _("No SRU search field mappings have been defined. This means that all field searches will go through the whole record. Continue?"))) {
52
                return false;
53
            }
54
            // copy show_sru_fields to hidden counterpart
55
            $('#sru_fields').val( $('#show_sru_fields').val() );
56
            // enable recordtype to include field in post
57
            $('#recordtype').prop('disabled',false);
58
        });
59
        $("#servername").on("blur",function(){
60
            toUC(this);
61
        });
62
        $("#modify_sru_fields").on("click",function(){
63
            ModMapping();
64
        });
65
    });
66
    function ModMapping () {
67
        var map= $('#show_sru_fields').val();
68
        window.open('/cgi-bin/koha/admin/sru_modmapping.pl?mapping='+map,'popup','width=800,height=400,resizable=yes,toolbar=false,scrollbars=yes,top');
69
    }
70
[% ELSE %]
71
    $(document).ready(function() {
72
        $("#serverst").dataTable($.extend(true, {}, dataTablesDefaults, {
73
            "aoColumnDefs": [
74
                { "aTargets": [-1], "bSortable": false, "bSearchable": false },
75
            ],
76
            "sPaginationType": "four_button"
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
        });
86
    });
87
[% END %]
88
//]]>
89
</script>
90
21
</head>
91
</head>
22
92
23
<body id="admin_z3950servers" class="admin">
93
<body id="admin_z3950servers" class="admin">
Lines 83-91 Link Here
83
        </li>
153
        </li>
84
        <li><label for="rank">Rank (display order): </label> <input type="text" name="rank" id="rank" size="4" value="[% server.rank %]" />
154
        <li><label for="rank">Rank (display order): </label> <input type="text" name="rank" id="rank" size="4" value="[% server.rank %]" />
85
        </li>
155
        </li>
156
        [% IF (server.servertype||type) == 'zed' %]
86
        <li><label for="attributes">Attributes (additional PQF attributes added to each query): </label><input type="text" name="attributes" id="attributes" size="30" value="[% server.attributes %]" />
157
        <li><label for="attributes">Attributes (additional PQF attributes added to each query): </label><input type="text" name="attributes" id="attributes" size="30" value="[% server.attributes %]" />
87
        </li>
158
        </li>
88
159
        [% END %]
89
160
90
        <li><label for="syntax">Syntax (z3950 can send<br /> records in various format. Choose one): </label>
161
        <li><label for="syntax">Syntax (z3950 can send<br /> records in various format. Choose one): </label>
91
        <select name="syntax" id="syntax">
162
        <select name="syntax" id="syntax">
92
- 

Return to bug 11297