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

(-)a/api/v1/swagger/definitions/illrequest.yaml (-1 / +1 lines)
Lines 128-134 properties: Link Here
128
    description: The request's current status
128
    description: The request's current status
129
  status_alias:
129
  status_alias:
130
    type:
130
    type:
131
      - string
131
      - object
132
      - "null"
132
      - "null"
133
    description: The ID of a user defined status for this request
133
    description: The ID of a user defined status for this request
134
  updated:
134
  updated:
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/ill-batch-modal.inc (-3 / +4 lines)
Lines 18-25 Link Here
18
                                    value="" />
18
                                    value="" />
19
                                </li>
19
                                </li>
20
                                <li id="batch_patron">
20
                                <li id="batch_patron">
21
                                    <label class="required" for="cardnumber">Card number, username or surname:</label>
21
                                    <label class="required" for="batchcardnumber">Card number, username or surname:</label>
22
                                    <input type="text" autocomplete="off" name="cardnumber" id="cardnumber" type="text" value="" />
22
                                    <input type="text" autocomplete="off" name="batchcardnumber" id="batchcardnumber" type="text" value="" />
23
                                    <span id="patron_link"></span>
23
                                    <span id="patron_link"></span>
24
                                </li>
24
                                </li>
25
                                <li id="batch_branch">
25
                                <li id="batch_branch">
Lines 65-71 Link Here
65
                        </div>
65
                        </div>
66
                    </div>
66
                    </div>
67
                    <div id="create-requests" style="display:none">
67
                    <div id="create-requests" style="display:none">
68
                        <button id="create-requests-button" type="button" class="btn btn-xs btn-success">Add items to batch</button>
68
                        <button id="create-requests-button" type="button" class="btn btn-xs btn-primary">Add items to batch</button>
69
                    </div>
69
                    </div>
70
                    <table id="identifier-table" style="display:none">
70
                    <table id="identifier-table" style="display:none">
71
                        <thead>
71
                        <thead>
Lines 74-79 Link Here
74
                                <th scope="col">Identifier value</th>
74
                                <th scope="col">Identifier value</th>
75
                                <th scope="col">Metadata</th>
75
                                <th scope="col">Metadata</th>
76
                                <th scope="col">Request ID</th>
76
                                <th scope="col">Request ID</th>
77
                                <th scope="col">Request Status</th>
77
                                <th scope="col"></th>
78
                                <th scope="col"></th>
78
                            </tr>
79
                            </tr>
79
                        </thead>
80
                        </thead>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/ill_batch_statuses.tt (-2 / +2 lines)
Lines 132-138 Link Here
132
                                [% FOREACH status IN statuses %]
132
                                [% FOREACH status IN statuses %]
133
                                <tr>
133
                                <tr>
134
                                    <td>[% status.name | html %]</td>
134
                                    <td>[% status.name | html %]</td>
135
                                    <td>[% name.code | html %]</td>
135
                                    <td>[% status.code | html %]</td>
136
                                    <td>[% status.is_system ? "Yes" : "No" | html %]</td>
136
                                    <td>[% status.is_system ? "Yes" : "No" | html %]</td>
137
                                    <td class="actions">
137
                                    <td class="actions">
138
                                        <a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/ill_batch_statuses.pl?op=add_form&amp;code=[% status.code | uri %]"><i class="fa fa-pencil"></i> Edit</a>
138
                                        <a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/ill_batch_statuses.pl?op=add_form&amp;code=[% status.code | uri %]"><i class="fa fa-pencil"></i> Edit</a>
Lines 146-152 Link Here
146
                        </table>
146
                        </table>
147
                    [% ELSE %]
147
                    [% ELSE %]
148
                        <div class="dialog message">
148
                        <div class="dialog message">
149
                            There are no batch statuses defined. <a href="/cgi-bin/koha/admin/debit_types.pl?op=add_form">Create new batch status</a>
149
                            There are no batch statuses defined. <a href="/cgi-bin/koha/admin/ill_batch_statuses.pl?op=add_form">Create new batch status</a>
150
                        </div>
150
                        </div>
151
                    [% END %]
151
                    [% END %]
152
                [% END %]
152
                [% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/js/ill-batch-modal.js (-18 / +23 lines)
Lines 7-13 Link Here
7
    // Elements we work frequently with
7
    // Elements we work frequently with
8
    var textarea = document.getElementById("identifiers_input");
8
    var textarea = document.getElementById("identifiers_input");
9
    var nameInput = document.getElementById("name");
9
    var nameInput = document.getElementById("name");
10
    var cardnumberInput = document.getElementById("cardnumber");
10
    var cardnumberInput = document.getElementById("batchcardnumber");
11
    var branchcodeSelect = document.getElementById("branchcode");
11
    var branchcodeSelect = document.getElementById("branchcode");
12
    var processButton = document.getElementById("process_button");
12
    var processButton = document.getElementById("process_button");
13
    var createButton = document.getElementById("button_create_batch");
13
    var createButton = document.getElementById("button_create_batch");
Lines 22-27 Link Here
22
    var statusesSelect = document.getElementById('statuscode');
22
    var statusesSelect = document.getElementById('statuscode');
23
23
24
24
25
    // Bail if there aren't any metadata enrichment plugins installed
26
    if (typeof metadata_enrichment_services === 'undefined') {
27
        return;
28
    }
25
    // We need a data structure keyed on identifier type, which tells us how to parse that
29
    // We need a data structure keyed on identifier type, which tells us how to parse that
26
    // identifier type and what services can get its metadata. We receive an array of
30
    // identifier type and what services can get its metadata. We receive an array of
27
    // available services
31
    // available services
Lines 299-304 Link Here
299
                tableContent.data = tableContent.data.map(function (row) {
303
                tableContent.data = tableContent.data.map(function (row) {
300
                    if (row.value === identifier) {
304
                    if (row.value === identifier) {
301
                        row.requestId = data.illrequest_id;
305
                        row.requestId = data.illrequest_id;
306
                        row.requestStatus = data.status;
302
                    }
307
                    }
303
                    return row;
308
                    return row;
304
                });
309
                });
Lines 893-898 Link Here
893
        return data.requestId || '-';
898
        return data.requestId || '-';
894
    }
899
    }
895
900
901
    function createRequestStatus(x, y, data) {
902
        return data.requestStatus || '-';
903
    }
904
896
    function buildTable(identifiers) {
905
    function buildTable(identifiers) {
897
        table = KohaTable('identifier-table', {
906
        table = KohaTable('identifier-table', {
898
            processing: true,
907
            processing: true,
Lines 918-926 Link Here
918
                },
927
                },
919
                {
928
                {
920
                    data: 'requestId',
929
                    data: 'requestId',
921
                    width: '13%',
930
                    width: '6.5%',
922
                    render: createRequestId
931
                    render: createRequestId
923
                },
932
                },
933
                {
934
                    data: 'requestStatus',
935
                    width: '6.5%',
936
                    render: createRequestStatus
937
                },
924
                {
938
                {
925
                    width: '18%',
939
                    width: '18%',
926
                    render: createActions,
940
                    render: createActions,
Lines 1021-1043 Link Here
1021
    }
1035
    }
1022
1036
1023
    function patronAutocomplete() {
1037
    function patronAutocomplete() {
1024
        // Add autocomplete for patron selection
1038
        patron_autocomplete(
1025
        $('#batch-form #cardnumber').autocomplete({
1039
            $('#batch-form #batchcardnumber'),
1026
            appendTo: '#batch-form',
1040
            {
1027
            source: "/cgi-bin/koha/circ/ysearch.pl",
1041
              'on-select-callback': function( event, ui ) {
1028
            minLength: 3,
1042
                $("#batch-form #batchcardnumber").val( ui.item.cardnumber );
1029
            select: function (event, ui) {
1030
                var field = ui.item.cardnumber;
1031
                $('#batch-form #cardnumber').val(field)
1032
                return false;
1043
                return false;
1044
              }
1033
            }
1045
            }
1034
        })
1046
          );
1035
            .data("ui-autocomplete")._renderItem = function (ul, item) {
1036
                return $("<li></li>")
1037
                    .data("ui-autocomplete-item", item)
1038
                    .append("<a>" + item.surname + ", " + item.firstname + " (" + item.cardnumber + ") <small>" + item.address + " " + item.city + " " + item.zipcode + " " + item.country + "</small></a>")
1039
                    .appendTo(ul);
1040
            };
1041
    };
1047
    };
1042
1048
1043
    function createPatronLink() {
1049
    function createPatronLink() {
1044
- 

Return to bug 30719