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

(-)a/Koha/REST/V1/Items.pm (+5 lines)
Lines 212-219 sub add_to_bundle { Link Here
212
        );
212
        );
213
    }
213
    }
214
214
215
    my $add_link = $c->validation->param('body')->{'marc_link'} // 0;
215
    return try {
216
    return try {
216
        my $link = $item->add_to_bundle($bundle_item);
217
        my $link = $item->add_to_bundle($bundle_item);
218
        if ($add_link) {
219
            $bundle_item->biblio->link_marc_host(
220
                { biblionumber => $item->biblio->biblionumber } );
221
        }
217
        return $c->render(
222
        return $c->render(
218
            status  => 201,
223
            status  => 201,
219
            openapi => $bundle_item
224
            openapi => $bundle_item
(-)a/api/v1/swagger/definitions/bundle_link.yaml (+3 lines)
Lines 11-14 properties: Link Here
11
      - string
11
      - string
12
      - "null"
12
      - "null"
13
    description: Item barcode
13
    description: Item barcode
14
  marc_link:
15
    type: boolean
16
    description: Is there a marc link for this item
14
additionalProperties: false
17
additionalProperties: false
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt (-2 / +5 lines)
Lines 1248-1253 Note that permanent location is a code, and location may be an authval. Link Here
1248
                                    <input type="text" id="external_id" name="external_id" required="required">
1248
                                    <input type="text" id="external_id" name="external_id" required="required">
1249
                                    <span class="required">Required</span>
1249
                                    <span class="required">Required</span>
1250
                                </li>
1250
                                </li>
1251
                                <li>
1252
                                    <label for="bundle_link">Add MARC link: </label>
1253
                                    <input type="checkbox" name="bundle_link"/>
1254
                                </li>
1251
                            </ol>
1255
                            </ol>
1252
                        </fieldset>
1256
                        </fieldset>
1253
                    </div>
1257
                    </div>
Lines 1757-1763 Note that permanent location is a code, and location may be an authval. Link Here
1757
                  /* Send the data using post with external_id */
1761
                  /* Send the data using post with external_id */
1758
                  var posting = $.post({
1762
                  var posting = $.post({
1759
                      url: url,
1763
                      url: url,
1760
                      data: JSON.stringify({ external_id: $('#external_id').val()}),
1764
                      data: JSON.stringify({ external_id: $('#external_id').val(), marc_link: $('#link').prop('checked') }),
1761
                      contentType: "application/json; charset=utf-8",
1765
                      contentType: "application/json; charset=utf-8",
1762
                      dataType: "json"
1766
                      dataType: "json"
1763
                  });
1767
                  });
1764
- 

Return to bug 29560