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

(-)a/C4/Biblio.pm (+17 lines)
Lines 44-49 use Koha::Authority::Types; Link Here
44
use Koha::Acquisition::Currencies;
44
use Koha::Acquisition::Currencies;
45
use Koha::Biblio::Metadata;
45
use Koha::Biblio::Metadata;
46
use Koha::Biblio::Metadatas;
46
use Koha::Biblio::Metadatas;
47
use Koha::Holdings;
47
use Koha::Holds;
48
use Koha::Holds;
48
use Koha::ItemTypes;
49
use Koha::ItemTypes;
49
use Koha::SearchEngine;
50
use Koha::SearchEngine;
Lines 1523-1528 sub GetAuthorisedValueDesc { Link Here
1523
            return $itemtype ? $itemtype->translated_description : q||;
1524
            return $itemtype ? $itemtype->translated_description : q||;
1524
        }
1525
        }
1525
1526
1527
        #---- holdings
1528
        if ( $tagslib->{$tag}->{$subfield}->{'authorised_value'} eq "holdings" ) {
1529
            my $holding = Koha::Holdings->find( $value );
1530
            if ( $holding ) {
1531
                my @parts;
1532
1533
                push @parts, $value;
1534
                push @parts, $holding->holdingbranch() if $holding->holdingbranch();
1535
                push @parts, $holding->location() if $holding->location();
1536
                push @parts, $holding->callnumber() if $holding->callnumber();
1537
1538
                return join(' ', @parts);
1539
            }
1540
            return q||;
1541
        }
1542
1526
        #---- "true" authorized value
1543
        #---- "true" authorized value
1527
        $category = $tagslib->{$tag}->{$subfield}->{'authorised_value'};
1544
        $category = $tagslib->{$tag}->{$subfield}->{'authorised_value'};
1528
    }
1545
    }
(-)a/C4/Holdings.pm (+746 lines)
Line 0 Link Here
1
package C4::Holdings;
2
3
# Copyright 2000-2002 Katipo Communications
4
# Copyright 2010 BibLibre
5
# Copyright 2011 Equinox Software, Inc.
6
#
7
# This file is part of Koha.
8
#
9
# Koha is free software; you can redistribute it and/or modify it
10
# under the terms of the GNU General Public License as published by
11
# the Free Software Foundation; either version 3 of the License, or
12
# (at your option) any later version.
13
#
14
# Koha is distributed in the hope that it will be useful, but
15
# WITHOUT ANY WARRANTY; without even the implied warranty of
16
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
# GNU General Public License for more details.
18
#
19
# You should have received a copy of the GNU General Public License
20
# along with Koha; if not, see <http://www.gnu.org/licenses>.
21
22
use Modern::Perl;
23
use Carp;
24
25
# TODO check which use's are really necessary
26
27
use Encode qw( decode is_utf8 );
28
use List::MoreUtils qw( uniq );
29
use MARC::Record;
30
use MARC::File::USMARC;
31
use MARC::File::XML;
32
use POSIX qw(strftime);
33
34
use C4::Koha;
35
use C4::Log;    # logaction
36
use C4::ClassSource;
37
use C4::Charset;
38
use C4::Debug;
39
40
use Koha::Caches;
41
use Koha::Holdings::Metadata;
42
use Koha::Holdings::Metadatas;
43
use Koha::Libraries;
44
45
use vars qw(@ISA @EXPORT);
46
use vars qw($debug $cgi_debug);
47
48
BEGIN {
49
50
    require Exporter;
51
    @ISA = qw( Exporter );
52
53
    # to add holdings
54
    # EXPORTED FUNCTIONS.
55
    push @EXPORT, qw(
56
      &AddHolding
57
    );
58
59
    # to get something
60
    push @EXPORT, qw(
61
      GetHolding
62
    );
63
64
    # To modify something
65
    push @EXPORT, qw(
66
      &ModHolding
67
    );
68
69
    # To delete something
70
    push @EXPORT, qw(
71
      &DelHolding
72
    );
73
}
74
75
=head1 NAME
76
77
C4::Holding - cataloging management functions
78
79
=head1 DESCRIPTION
80
81
Holding.pm contains functions for managing storage and editing of holdings data within Koha. Most of the functions in this module are used for cataloging holdings records: adding, editing, or removing holdings. Koha stores holdings information in two places:
82
83
=over 4
84
85
=item 1. in the holdings table which is limited to a one-to-one mapping to underlying MARC data
86
87
=item 2. as MARC XML in holdings_metadata.metadata
88
89
=back
90
91
In the 3.0 version of Koha, the authoritative record-level information is in holdings_metadata.metadata
92
93
Because the data isn't completely normalized there's a chance for information to get out of sync. The design choice to go with a un-normalized schema was driven by performance and stability concerns. However, if this occur, it can be considered as a bug : The API is (or should be) complete & the only entry point for all holdings management.
94
95
=over 4
96
97
=item 1. Add*/Mod*/Del*/ - high-level external functions suitable for being called from external scripts to manage the collection
98
99
=back
100
101
The MARC record (in holdings_metadata.metadata) contains the MARC holdings record. It also contains the holding_id. That is the reason why it is not stored directly by AddHolding, with all other fields. To save a holding, we need to:
102
103
=over 4
104
105
=item 1. save data in holdings table, that gives us a holding_id
106
107
=item 2. add the holding_id into the MARC record
108
109
=item 3. save the marc record
110
111
=back
112
113
=head1 EXPORTED FUNCTIONS
114
115
=head2 AddHolding
116
117
  $holding_id = AddHolding($record, $frameworkcode, $biblionumber);
118
119
Exported function (core API) for adding a new holding to koha.
120
121
The first argument is a C<MARC::Record> object containing the
122
holding to add, while the second argument is the desired MARC
123
framework code and third the biblionumber to link to.
124
125
=cut
126
127
sub AddHolding {
128
    my $record          = shift;
129
    my $frameworkcode   = shift;
130
    my $biblionumber    = shift;
131
    if (!$record) {
132
        carp('AddHolding called with undefined record');
133
        return;
134
    }
135
136
    my $dbh = C4::Context->dbh;
137
138
    my $biblio = Koha::Biblios->find( $biblionumber );
139
    my $biblioitemnumber = $biblio->biblioitem->biblioitemnumber;
140
141
    # transform the data into koha-table style data
142
    SetUTF8Flag($record);
143
    my $rowData = TransformMarcHoldingToKoha( $record );
144
    my ($holding_id) = _koha_add_holding( $dbh, $rowData, $frameworkcode, $biblionumber, $biblioitemnumber );
145
146
    _koha_marc_update_ids( $record, $frameworkcode, $holding_id, $biblionumber, $biblioitemnumber );
147
148
    # now add the record
149
    ModHoldingMarc( $record, $holding_id, $frameworkcode );
150
151
    logaction( "CATALOGUING", "ADD", $holding_id, "holding" ) if C4::Context->preference("CataloguingLog");
152
    return $holding_id;
153
}
154
155
=head2 ModHolding
156
157
  ModHolding($record, $holding_id, $frameworkcode);
158
159
Replace an existing holding record identified by C<$holding_id>
160
with one supplied by the MARC::Record object C<$record>.
161
162
C<$frameworkcode> specifies the MARC framework to use
163
when storing the modified holdings record.
164
165
Returns 1 on success 0 on failure
166
167
=cut
168
169
sub ModHolding {
170
    my ( $record, $holding_id, $frameworkcode ) = @_;
171
    if (!$record) {
172
        carp 'No record passed to ModHolding';
173
        return 0;
174
    }
175
176
    if ( C4::Context->preference("CataloguingLog") ) {
177
        my $newrecord = GetMarcHolding($holding_id);
178
        logaction( "CATALOGUING", "MODIFY", $holding_id, "holding BEFORE=>" . $newrecord->as_formatted );
179
    }
180
181
    # Cleaning up invalid fields must be done early or SetUTF8Flag is liable to
182
    # throw an exception which probably won't be handled.
183
    foreach my $field ($record->fields()) {
184
        if (! $field->is_control_field()) {
185
            if (scalar($field->subfields()) == 0 || (scalar($field->subfields()) == 1 && $field->subfield('9'))) {
186
                $record->delete_field($field);
187
            }
188
        }
189
    }
190
191
    SetUTF8Flag($record);
192
    my $dbh = C4::Context->dbh;
193
194
    $frameworkcode = C4::Context->preference('DefaultSummaryHoldingsFrameworkCode') if !$frameworkcode || $frameworkcode eq "Default";
195
196
    # update holding_id in MARC
197
    _koha_marc_update_ids( $record, $frameworkcode, $holding_id );
198
199
    # load the koha-table data object
200
    my $rowData = TransformMarcHoldingToKoha( $record );
201
    # update the MARC record (that now contains biblio and items) with the new record data
202
    &ModHoldingMarc( $record, $holding_id, $frameworkcode );
203
204
    # modify the other koha tables
205
    _koha_modify_holding( $dbh, $holding_id, $rowData, $frameworkcode );
206
207
    return 1;
208
}
209
210
=head2 DelHolding
211
212
  my $error = &DelHolding($holding_id);
213
214
Exported function (core API) for deleting a holding in koha.
215
Deletes holding record from Koha tables (holdings, holdings_metadata)
216
Also backs it up to deleted* tables.
217
Checks to make sure that the holding has no items attached.
218
return:
219
C<$error> : undef unless an error occurs
220
221
=cut
222
223
sub DelHolding {
224
    my ($holding_id) = @_;
225
    my $dbh = C4::Context->dbh;
226
    my $error;    # for error handling
227
228
    # First make sure this holding has no items attached
229
    my $sth = $dbh->prepare("SELECT itemnumber FROM items WHERE holding_id=?");
230
    $sth->execute($holding_id);
231
    if ( my $itemnumber = $sth->fetchrow ) {
232
233
        # Fix this to use a status the template can understand
234
        $error .= "This holding record has items attached, please delete them first before deleting this holding record ";
235
    }
236
237
    return $error if $error;
238
239
    # delete holding
240
    _koha_delete_holding( $dbh, $holding_id );
241
242
    logaction( "CATALOGUING", "DELETE", $holding_id, "holding" ) if C4::Context->preference("CataloguingLog");
243
244
    return;
245
}
246
247
=head2 GetHolding
248
249
  my $holding = &GetHolding($holding_id);
250
251
=cut
252
253
sub GetHolding {
254
    my ($holding_id) = @_;
255
    my $dbh             = C4::Context->dbh;
256
    my $sth             = $dbh->prepare("SELECT * FROM holding WHERE holding_id = ? AND deleted_at IS NULL");
257
    my $count           = 0;
258
    my @results;
259
    $sth->execute($holding_id);
260
    if ( my $data = $sth->fetchrow_hashref ) {
261
        return $data;
262
    }
263
    return;
264
}
265
266
=head2 GetHoldingsByBiblionumber
267
268
  GetHoldingsByBiblionumber($biblionumber);
269
270
Returns an arrayref of hashrefs suitable for use in a TMPL_LOOP
271
Called by C<C4::XISBN>
272
273
=cut
274
275
sub GetHoldingsByBiblionumber {
276
    my ( $bib ) = @_;
277
    my $dbh = C4::Context->dbh;
278
    my $sth = $dbh->prepare("SELECT * FROM holdings WHERE holdings.biblionumber = ? AND deleted_at IS NULL") || die $dbh->errstr;
279
    # Get all holdings attached to a biblioitem
280
    my $i = 0;
281
    my @results;
282
    $sth->execute($bib) || die $sth->errstr;
283
    while ( my $data = $sth->fetchrow_hashref ) {
284
        push(@results, $data);
285
    }
286
    return (\@results);
287
}
288
289
=head2 GetMarcHolding
290
291
  my $record = GetMarcHolding(holding_id, [$opac]);
292
293
Returns MARC::Record representing a holding record, or C<undef> if the
294
record doesn't exist.
295
296
=over 4
297
298
=item C<$holding_id>
299
300
the holding_id
301
302
=item C<$opac>
303
304
set to true to make the result suited for OPAC view. This causes things like
305
OpacHiddenItems to be applied.
306
307
=back
308
309
=cut
310
311
sub GetMarcHolding {
312
    my $holding_id = shift;
313
    my $opac         = shift || 0;
314
315
    if (not defined $holding_id) {
316
        carp 'GetMarcHolding called with undefined holding_id';
317
        return;
318
    }
319
320
    # Use state to speed up repeated calls in batch processes
321
    state $marcflavour = C4::Context->preference('marcflavour');
322
323
    my $marcxml = GetXmlHolding( $holding_id );
324
    $marcxml = StripNonXmlChars( $marcxml );
325
    my $frameworkcode = GetHoldingFrameworkCode( $holding_id );
326
    MARC::File::XML->default_record_format( $marcflavour );
327
328
    if ($marcxml) {
329
        my $record = eval {
330
            MARC::Record::new_from_xml( $marcxml, "utf8", $marcflavour );
331
        };
332
        if ($@) { warn " problem with holding $holding_id : $@ \n$marcxml"; }
333
        return unless $record;
334
335
        _koha_marc_update_ids( $record, $frameworkcode, $holding_id );
336
337
        return $record;
338
    }
339
    return;
340
}
341
342
=head2 GetXmlHolding
343
344
  my $marcxml = GetXmlHolding($holding_id);
345
346
Returns holdings_metadata.metadata/marcxml of the holding_id passed in parameter.
347
348
=cut
349
350
sub GetXmlHolding {
351
    my ($holding_id) = @_;
352
    return unless $holding_id;
353
354
    # Use state to speed up repeated calls in batch processes
355
    state $marcflavour = C4::Context->preference('marcflavour');
356
    state $sth = C4::Context->dbh->prepare(
357
        q|
358
        SELECT metadata
359
        FROM holdings_metadata
360
        WHERE holding_id=?
361
            AND format='marcxml'
362
            AND marcflavour=?
363
        |
364
    );
365
366
    $sth->execute( $holding_id, $marcflavour );
367
    my ($marcxml) = $sth->fetchrow();
368
    $sth->finish();
369
    return $marcxml;
370
}
371
372
=head2 GetHoldingFrameworkCode
373
374
  $frameworkcode = GetFrameworkCode( $holding_id )
375
376
=cut
377
378
sub GetHoldingFrameworkCode {
379
    my ($holding_id) = @_;
380
    # Use state to speed up repeated calls in batch processes
381
    state $sth = C4::Context->dbh->prepare("SELECT frameworkcode FROM holdings WHERE holding_id=?");
382
    $sth->execute($holding_id);
383
    my ($frameworkcode) = $sth->fetchrow;
384
    $sth->finish();
385
    return $frameworkcode;
386
}
387
388
=head1 INTERNAL FUNCTIONS
389
390
=head2 _koha_add_holding
391
392
  my ($holding_id,$error) = _koha_add_hodings($dbh, $holding, $frameworkcode, $biblionumber, $biblioitemnumber);
393
394
Internal function to add a holding ($holding is a hash with the values)
395
396
=cut
397
398
sub _koha_add_holding {
399
    my ( $dbh, $holding, $frameworkcode, $biblionumber, $biblioitemnumber ) = @_;
400
401
    my $error;
402
403
    my $query = "INSERT INTO holdings
404
        SET biblionumber = ?,
405
            biblioitemnumber = ?,
406
            frameworkcode = ?,
407
            holdingbranch = ?,
408
            location = ?,
409
            callnumber = ?,
410
            suppress = ?,
411
            datecreated = NOW()
412
        ";
413
414
    my $sth = $dbh->prepare($query);
415
    $sth->execute(
416
        $biblionumber, $biblioitemnumber, $frameworkcode,
417
        $holding->{holdingbranch}, $holding->{location}, $holding->{callnumber}, $holding->{suppress}
418
    );
419
420
    my $holding_id = $dbh->{'mysql_insertid'};
421
    if ( $dbh->errstr ) {
422
        $error .= "ERROR in _koha_add_holding $query" . $dbh->errstr;
423
        warn $error;
424
    }
425
426
    $sth->finish();
427
428
    return ( $holding_id, $error );
429
}
430
431
=head2 _koha_modify_holding
432
433
  my ($biblionumber,$error) == _koha_modify_holding($dbh, $holding, $frameworkcode);
434
435
Internal function for updating the holdings table
436
437
=cut
438
439
sub _koha_modify_holding {
440
    my ( $dbh, $holding_id, $holding, $frameworkcode ) = @_;
441
    my $error;
442
443
    my $query = "
444
        UPDATE holdings
445
        SET    frameworkcode = ?,
446
               holdingbranch = ?,
447
               location = ?,
448
               callnumber = ?,
449
               suppress = ?
450
        WHERE  holding_id = ?
451
        "
452
      ;
453
    my $sth = $dbh->prepare($query);
454
455
    $sth->execute(
456
        $frameworkcode, $holding->{holdingbranch}, $holding->{location}, $holding->{callnumber}, $holding->{suppress}, $holding_id
457
    ) if $holding_id;
458
459
    if ( $dbh->errstr || !$holding_id ) {
460
        die "ERROR in _koha_modify_holding for holding $holding_id: " . $dbh->errstr;
461
    }
462
    return ( $holding_id, $error );
463
}
464
465
=head2 _koha_delete_holding
466
467
  $error = _koha_delete_holding($dbh, $holding_id);
468
469
Internal sub for deleting from holdings table
470
471
C<$dbh> - the database handle
472
473
C<$holding_id> - the holding_id of the holding to be deleted
474
475
=cut
476
477
sub _koha_delete_holding {
478
    my ( $dbh, $holding_id ) = @_;
479
480
    my $schema = Koha::Database->new->schema;
481
    $schema->txn_do(
482
        sub {
483
            $dbh->do('UPDATE holdings_metadata SET deleted_at = NOW() WHERE holding_id=?', undef, $holding_id);
484
            $dbh->do('UPDATE holdings SET deleted_at = NOW() WHERE holding_id=?', undef, $holding_id);
485
        }
486
    );
487
    return;
488
}
489
490
=head1 INTERNAL FUNCTIONS
491
492
=head2 _koha_marc_update_ids
493
494
495
  _koha_marc_update_ids($record, $frameworkcode, $holding_id[, $biblionumber, $biblioitemnumber]);
496
497
Internal function to add or update holding_id, biblionumber and biblioitemnumber to
498
the MARC XML.
499
500
=cut
501
502
sub _koha_marc_update_ids {
503
    my ( $record, $frameworkcode, $holding_id, $biblionumber, $biblioitemnumber ) = @_;
504
505
    my ( $holding_tag, $holding_subfield ) = GetMarcHoldingFromKohaField( "holdings.holding_id" );
506
    die qq{No holding_id tag for framework "$frameworkcode"} unless $holding_tag;
507
508
    if ( $holding_tag < 10 ) {
509
        C4::Biblio::UpsertMarcControlField( $record, $holding_tag, $holding_id );
510
    } else {
511
        C4::Biblio::UpsertMarcSubfield($record, $holding_tag, $holding_subfield, $holding_id);
512
    }
513
514
    if ( defined $biblionumber ) {
515
        my ( $biblio_tag, $biblio_subfield ) = GetMarcHoldingFromKohaField( "biblio.biblionumber" );
516
        die qq{No biblionumber tag for framework "$frameworkcode"} unless $biblio_tag;
517
        if ( $biblio_tag < 10 ) {
518
            C4::Biblio::UpsertMarcControlField( $record, $biblio_tag, $biblionumber );
519
        } else {
520
            C4::Biblio::UpsertMarcSubfield($record, $biblio_tag, $biblio_subfield, $biblionumber);
521
        }
522
    }
523
    if ( defined $biblioitemnumber ) {
524
        my ( $biblioitem_tag, $biblioitem_subfield ) = GetMarcHoldingFromKohaField( "biblioitems.biblioitemnumber" );
525
        die qq{No biblioitemnumber tag for framework "$frameworkcode"} unless $biblioitem_tag;
526
        if ( $biblioitem_tag < 10 ) {
527
            C4::Biblio::UpsertMarcControlField( $record, $biblioitem_tag, $biblioitemnumber );
528
        } else {
529
            C4::Biblio::UpsertMarcSubfield($record, $biblioitem_tag, $biblioitem_subfield, $biblioitemnumber);
530
        }
531
    }
532
}
533
534
=head1 UNEXPORTED FUNCTIONS
535
536
=head2 ModHoldingMarc
537
538
  &ModHoldingMarc($newrec,$holding_id,$frameworkcode);
539
540
Add MARC XML data for a holding to koha
541
542
Function exported, but should NOT be used, unless you really know what you're doing
543
544
=cut
545
546
sub ModHoldingMarc {
547
    # pass the MARC::Record to this function, and it will create the records in
548
    # the marcxml field
549
    my ( $record, $holding_id, $frameworkcode ) = @_;
550
    if ( !$record ) {
551
        carp 'ModHoldingMarc passed an undefined record';
552
        return;
553
    }
554
555
    # Clone record as it gets modified
556
    $record = $record->clone();
557
    my $dbh    = C4::Context->dbh;
558
    my @fields = $record->fields();
559
    if ( !$frameworkcode ) {
560
        $frameworkcode = "";
561
    }
562
    my $sth = $dbh->prepare("UPDATE holdings SET frameworkcode=? WHERE holding_id=?");
563
    $sth->execute( $frameworkcode, $holding_id );
564
    $sth->finish;
565
    my $encoding = C4::Context->preference("marcflavour");
566
567
    # deal with UNIMARC field 100 (encoding) : create it if needed & set encoding to unicode
568
    if ( $encoding eq "UNIMARC" ) {
569
        my $defaultlanguage = C4::Context->preference("UNIMARCField100Language");
570
        $defaultlanguage = "fre" if (!$defaultlanguage || length($defaultlanguage) != 3);
571
        my $string = $record->subfield( 100, "a" );
572
        if ( ($string) && ( length( $record->subfield( 100, "a" ) ) == 36 ) ) {
573
            my $f100 = $record->field(100);
574
            $record->delete_field($f100);
575
        } else {
576
            $string = POSIX::strftime( "%Y%m%d", localtime );
577
            $string =~ s/\-//g;
578
            $string = sprintf( "%-*s", 35, $string );
579
            substr ( $string, 22, 3, $defaultlanguage);
580
        }
581
        substr( $string, 25, 3, "y50" );
582
        unless ( $record->subfield( 100, "a" ) ) {
583
            $record->insert_fields_ordered( MARC::Field->new( 100, "", "", "a" => $string ) );
584
        }
585
    }
586
587
    #enhancement 5374: update transaction date (005) for marc21/unimarc
588
    if($encoding =~ /MARC21|UNIMARC/) {
589
      my @a= (localtime) [5,4,3,2,1,0]; $a[0]+=1900; $a[1]++;
590
        # YY MM DD HH MM SS (update year and month)
591
      my $f005= $record->field('005');
592
      $f005->update(sprintf("%4d%02d%02d%02d%02d%04.1f",@a)) if $f005;
593
    }
594
595
    my $metadata = {
596
        holding_id => $holding_id,
597
        format        => 'marcxml',
598
        marcflavour   => C4::Context->preference('marcflavour'),
599
    };
600
    # FIXME To replace with ->find_or_create?
601
    if ( my $m_rs = Koha::Holdings::Metadatas->find($metadata) ) {
602
        $m_rs->metadata( $record->as_xml_record($encoding) );
603
        $m_rs->store;
604
    } else {
605
        my $m_rs = Koha::Holdings::Metadata->new($metadata);
606
        $m_rs->metadata( $record->as_xml_record($encoding) );
607
        $m_rs->store;
608
    }
609
    return $holding_id;
610
}
611
612
=head2 GetMarcHoldingFromKohaField
613
614
    ( $field,$subfield ) = GetMarcHoldingFromKohaField( $kohafield );
615
    @fields = GetMarcHoldingFromKohaField( $kohafield );
616
    $field = GetMarcHoldingFromKohaField( $kohafield );
617
618
    Returns the MARC fields & subfields mapped to $kohafield.
619
    Uses the HLD framework that is considered as authoritative.
620
621
    In list context all mappings are returned; there can be multiple
622
    mappings. Note that in the above example you could miss a second
623
    mappings in the first call.
624
    In scalar context only the field tag of the first mapping is returned.
625
626
=cut
627
628
sub GetMarcHoldingFromKohaField {
629
    my ( $kohafield ) = @_;
630
    return unless $kohafield;
631
    # The next call uses the Default framework since it is AUTHORITATIVE
632
    # for all Koha to MARC mappings.
633
    my $mss = C4::Biblio::GetMarcSubfieldStructure( 'HLD' ); # Do not change framework
634
    my @retval;
635
    foreach( @{ $mss->{$kohafield} } ) {
636
        push @retval, $_->{tagfield}, $_->{tagsubfield};
637
    }
638
    return wantarray ? @retval : ( @retval ? $retval[0] : undef );
639
}
640
641
=head2 GetMarcHoldingSubfieldStructureFromKohaField
642
643
    my $str = GetMarcHoldingSubfieldStructureFromKohaField( $kohafield );
644
645
    Returns marc subfield structure information for $kohafield.
646
    Uses the HLD framework that is considered as authoritative.
647
648
    In list context returns a list of all hashrefs, since there may be
649
    multiple mappings. In scalar context the first hashref is returned.
650
651
=cut
652
653
sub GetMarcHoldingSubfieldStructureFromKohaField {
654
    my ( $kohafield ) = @_;
655
656
    return unless $kohafield;
657
658
    # The next call uses the Default framework since it is AUTHORITATIVE
659
    # for all Koha to MARC mappings.
660
    my $mss = C4::Biblio::GetMarcSubfieldStructure( 'HLD' ); # Do not change framework
661
    return unless $mss->{$kohafield};
662
    return wantarray ? @{$mss->{$kohafield}} : $mss->{$kohafield}->[0];
663
}
664
665
=head2 TransformMarcHoldingToKoha
666
667
    $result = TransformMarcHoldingToKoha( $record, undef )
668
669
Extract data from a MARC holdings record into a hashref representing
670
Koha holdings fields.
671
672
If passed an undefined record will log the error and return an empty
673
hash_ref.
674
675
=cut
676
677
sub TransformMarcHoldingToKoha {
678
    my ( $record ) = @_;
679
680
    my $result = {};
681
    if (!defined $record) {
682
        carp('TransformMarcToKoha called with undefined record');
683
        return $result;
684
    }
685
686
    my %tables = ( holdings => 1 );
687
688
    # The next call acknowledges HLD as the authoritative framework
689
    # for holdings to MARC mappings.
690
    my $mss = C4::Biblio::GetMarcSubfieldStructure( 'HLD' ); # Do not change framework
691
    foreach my $kohafield ( keys %{ $mss } ) {
692
        my ( $table, $column ) = split /[.]/, $kohafield, 2;
693
        next unless $tables{$table};
694
        my $val = TransformMarcHoldingToKohaOneField( $kohafield, $record );
695
        next if !defined $val;
696
        $result->{$column} = $val;
697
    }
698
    return $result;
699
}
700
701
=head2 TransformMarcHoldingToKohaOneField
702
703
    $val = TransformMarcHoldingToKohaOneField( 'biblio.title', $marc );
704
705
    Note: The authoritative Default framework is used implicitly.
706
707
=cut
708
709
sub TransformMarcHoldingToKohaOneField {
710
    my ( $kohafield, $marc ) = @_;
711
712
    my ( @rv, $retval );
713
    my @mss = GetMarcHoldingSubfieldStructureFromKohaField($kohafield);
714
    foreach my $fldhash ( @mss ) {
715
        my $tag = $fldhash->{tagfield};
716
        my $sub = $fldhash->{tagsubfield};
717
        foreach my $fld ( $marc->field($tag) ) {
718
            if( $sub eq '@' || $fld->is_control_field ) {
719
                push @rv, $fld->data if $fld->data;
720
            } else {
721
                push @rv, grep { $_ } $fld->subfield($sub);
722
            }
723
        }
724
    }
725
    return unless @rv;
726
    $retval = join ' | ', uniq(@rv);
727
728
    return $retval;
729
}
730
731
1;
732
733
734
__END__
735
736
=head1 AUTHOR
737
738
Koha Development Team <http://koha-community.org/>
739
740
Paul POULAIN paul.poulain@free.fr
741
742
Joshua Ferraro jmf@liblime.com
743
744
Ere Maijala ere.maijala@helsinki.fi
745
746
=cut
(-)a/C4/Items.pm (-1 / +3 lines)
Lines 1795-1801 sub _koha_new_item { Link Here
1795
            more_subfields_xml  = ?,
1795
            more_subfields_xml  = ?,
1796
            copynumber          = ?,
1796
            copynumber          = ?,
1797
            stocknumber         = ?,
1797
            stocknumber         = ?,
1798
            new_status          = ?
1798
            new_status          = ?,
1799
            holding_id          = ?
1799
          ";
1800
          ";
1800
    my $sth = $dbh->prepare($query);
1801
    my $sth = $dbh->prepare($query);
1801
    my $today = output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 });
1802
    my $today = output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 });
Lines 1840-1845 sub _koha_new_item { Link Here
1840
            $item->{'copynumber'},
1841
            $item->{'copynumber'},
1841
            $item->{'stocknumber'},
1842
            $item->{'stocknumber'},
1842
            $item->{'new_status'},
1843
            $item->{'new_status'},
1844
            $item->{'holding_id'},
1843
    );
1845
    );
1844
1846
1845
    my $itemnumber;
1847
    my $itemnumber;
(-)a/C4/Search.pm (+8 lines)
Lines 20-25 use strict; Link Here
20
require Exporter;
20
require Exporter;
21
use C4::Context;
21
use C4::Context;
22
use C4::Biblio;    # GetMarcFromKohaField, GetBiblioData
22
use C4::Biblio;    # GetMarcFromKohaField, GetBiblioData
23
use C4::Holdings;  # GetHoldingsByBiblionumber
23
use C4::Koha;      # getFacets
24
use C4::Koha;      # getFacets
24
use Koha::DateUtils;
25
use Koha::DateUtils;
25
use Koha::Libraries;
26
use Koha::Libraries;
Lines 2053-2058 sub searchResults { Link Here
2053
        my $maxitems_pref = C4::Context->preference('maxItemsinSearchResults');
2054
        my $maxitems_pref = C4::Context->preference('maxItemsinSearchResults');
2054
        my $maxitems = $maxitems_pref ? $maxitems_pref - 1 : 1;
2055
        my $maxitems = $maxitems_pref ? $maxitems_pref - 1 : 1;
2055
        my @hiddenitems; # hidden itemnumbers based on OpacHiddenItems syspref
2056
        my @hiddenitems; # hidden itemnumbers based on OpacHiddenItems syspref
2057
        my $summary_holdings;
2056
2058
2057
        # loop through every item
2059
        # loop through every item
2058
        foreach my $field (@fields) {
2060
        foreach my $field (@fields) {
Lines 2236-2241 sub searchResults { Link Here
2236
            push @available_items_loop, $available_items->{$key}
2238
            push @available_items_loop, $available_items->{$key}
2237
        }
2239
        }
2238
2240
2241
        # Fetch summary holdings
2242
        if (C4::Context->preference('SummaryHoldings')) {
2243
            $summary_holdings = C4::Holdings::GetHoldingsByBiblionumber($oldbiblio->{biblionumber});
2244
        }
2245
2239
        # XSLT processing of some stuff
2246
        # XSLT processing of some stuff
2240
        # we fetched the sysprefs already before the loop through all retrieved record!
2247
        # we fetched the sysprefs already before the loop through all retrieved record!
2241
        if (!$scan && $xslfile) {
2248
        if (!$scan && $xslfile) {
Lines 2268-2273 sub searchResults { Link Here
2268
        $oldbiblio->{onholdcount}          = $item_onhold_count;
2275
        $oldbiblio->{onholdcount}          = $item_onhold_count;
2269
        $oldbiblio->{orderedcount}         = $ordered_count;
2276
        $oldbiblio->{orderedcount}         = $ordered_count;
2270
        $oldbiblio->{notforloancount}      = $notforloan_count;
2277
        $oldbiblio->{notforloancount}      = $notforloan_count;
2278
        $oldbiblio->{summary_holdings}     = $summary_holdings;
2271
2279
2272
        if (C4::Context->preference("AlternateHoldingsField") && $items_count == 0) {
2280
        if (C4::Context->preference("AlternateHoldingsField") && $items_count == 0) {
2273
            my $fieldspec = C4::Context->preference("AlternateHoldingsField");
2281
            my $fieldspec = C4::Context->preference("AlternateHoldingsField");
(-)a/C4/XSLT.pm (-1 / +32 lines)
Lines 241-249 sub XSLTParse4Display { Link Here
241
    # grab the XML, run it through our stylesheet, push it out to the browser
241
    # grab the XML, run it through our stylesheet, push it out to the browser
242
    my $record = transformMARCXML4XSLT($biblionumber, $orig_record);
242
    my $record = transformMARCXML4XSLT($biblionumber, $orig_record);
243
    my $itemsxml  = buildKohaItemsNamespace($biblionumber, $hidden_items);
243
    my $itemsxml  = buildKohaItemsNamespace($biblionumber, $hidden_items);
244
    my $holdingsxml  = buildKohaHoldingsNamespace($biblionumber);
244
    my $xmlrecord = $record->as_xml(C4::Context->preference('marcflavour'));
245
    my $xmlrecord = $record->as_xml(C4::Context->preference('marcflavour'));
245
246
246
    $xmlrecord =~ s/\<\/record\>/$itemsxml$sysxml\<\/record\>/;
247
    $xmlrecord =~ s/\<\/record\>/$itemsxml$holdingsxml$sysxml\<\/record\>/;
247
    if ($fixamps) { # We need to correct the HTML entities that Zebra outputs
248
    if ($fixamps) { # We need to correct the HTML entities that Zebra outputs
248
        $xmlrecord =~ s/\&amp;amp;/\&amp;/g;
249
        $xmlrecord =~ s/\&amp;amp;/\&amp;/g;
249
        $xmlrecord =~ s/\&amp\;lt\;/\&lt\;/g;
250
        $xmlrecord =~ s/\&amp\;lt\;/\&lt\;/g;
Lines 342-347 sub buildKohaItemsNamespace { Link Here
342
    return $xml;
343
    return $xml;
343
}
344
}
344
345
346
sub buildKohaHoldingsNamespace {
347
    my ($biblionumber) = @_;
348
349
    my $holdings = C4::Holdings::GetHoldingsByBiblionumber( $biblionumber );
350
351
    my $shelflocations =
352
      { map { $_->{authorised_value} => $_->{opac_description} } Koha::AuthorisedValues->get_descriptions_by_koha_field( { frameworkcode => 'HLD', kohafield => 'holdings.location' } ) };
353
354
    my %branches = map { $_->branchcode => $_->branchname } Koha::Libraries->search({}, { order_by => 'branchname' });
355
356
    my $location = "";
357
    my $ccode = "";
358
    my $xml = '';
359
    for my $holding ( @{$holdings} ) {
360
        my $holdingbranch = $holding->{holdingbranch} ? xml_escape($branches{$holding->{holdingbranch}}) : '';
361
        my $location = $holding->{location} ? xml_escape($shelflocations->{$holding->{location}} || $holding->{location}) : '';
362
        my $callnumber = xml_escape($holding->{callnumber});
363
        my $suppress = $holding->{suppress} || '0';
364
        $xml .=
365
            "<holding>"
366
          . "<holdingbranch>$holdingbranch</holdingbranch>"
367
          . "<location>$location</location>"
368
          . "<callnumber>$callnumber</callnumber>"
369
          . "<suppress>$suppress</suppress>"
370
          . "</holding>";
371
    }
372
    $xml = "<holdings xmlns=\"http://www.koha-community.org/holdings\">$xml</holdings>";
373
    return $xml;
374
}
375
345
=head2 engine
376
=head2 engine
346
377
347
Returns reference to XSLT handler object.
378
Returns reference to XSLT handler object.
(-)a/Koha/Holding.pm (+71 lines)
Line 0 Link Here
1
package Koha::Holding;
2
3
# Copyright ByWater Solutions 2014
4
#
5
# This file is part of Koha.
6
#
7
# Koha is free software; you can redistribute it and/or modify it under the
8
# terms of the GNU General Public License as published by the Free Software
9
# Foundation; either version 3 of the License, or (at your option) any later
10
# version.
11
#
12
# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
13
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
14
# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
15
#
16
# You should have received a copy of the GNU General Public License along
17
# with Koha; if not, write to the Free Software Foundation, Inc.,
18
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19
20
use Modern::Perl;
21
22
use Carp;
23
24
use Koha::Database;
25
26
use base qw(Koha::Object);
27
28
=head1 NAME
29
30
Koha::Holding - Koha Holding Object class
31
32
=head1 API
33
34
=head2 Class Methods
35
36
=cut
37
38
=head3 items
39
40
my @items = $holding->items();
41
my $items = $holding->items();
42
43
Returns the related Koha::Items object for this holding in scalar context,
44
or list of Koha::Item objects in list context.
45
46
=cut
47
48
sub items {
49
    my ($self) = @_;
50
51
    $self->{_items} ||= Koha::Items->search( { holding_id => $self->holding_id() } );
52
53
    return wantarray ? $self->{_items}->as_list : $self->{_items};
54
}
55
56
=head3 type
57
58
=cut
59
60
sub _type {
61
    return 'Holding';
62
}
63
64
=head1 AUTHOR
65
66
Kyle M Hall <kyle@bywatersolutions.com>
67
Ere Maijala <ere.maijala@helsinki.fi>
68
69
=cut
70
71
1;
(-)a/Koha/Holdings.pm (+63 lines)
Line 0 Link Here
1
package Koha::Holdings;
2
3
# Copyright ByWater Solutions 2015
4
#
5
# This file is part of Koha.
6
#
7
# Koha is free software; you can redistribute it and/or modify it under the
8
# terms of the GNU General Public License as published by the Free Software
9
# Foundation; either version 3 of the License, or (at your option) any later
10
# version.
11
#
12
# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
13
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
14
# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
15
#
16
# You should have received a copy of the GNU General Public License along
17
# with Koha; if not, write to the Free Software Foundation, Inc.,
18
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19
20
use Modern::Perl;
21
22
use Carp;
23
24
use Koha::Database;
25
26
use Koha::Holding;
27
28
use base qw(Koha::Objects);
29
30
=head1 NAME
31
32
Koha::Holdings - Koha Holdings object set class
33
34
=head1 API
35
36
=head2 Class Methods
37
38
=cut
39
40
=head3 type
41
42
=cut
43
44
sub _type {
45
    return 'Holding';
46
}
47
48
=head3 object_class
49
50
=cut
51
52
sub object_class {
53
    return 'Koha::Holding';
54
}
55
56
=head1 AUTHOR
57
58
Kyle M Hall <kyle@bywatersolutions.com>
59
Ere Maijala <ere.maijala@helsinki.fi>
60
61
=cut
62
63
1;
(-)a/Koha/Holdings/Metadata.pm (+44 lines)
Line 0 Link Here
1
package Koha::Holdings::Metadata;
2
3
# This file is part of Koha.
4
#
5
# Koha is free software; you can redistribute it and/or modify it under the
6
# terms of the GNU General Public License as published by the Free Software
7
# Foundation; either version 3 of the License, or (at your option) any later
8
# version.
9
#
10
# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
11
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
12
# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
13
#
14
# You should have received a copy of the GNU General Public License along
15
# with Koha; if not, write to the Free Software Foundation, Inc.,
16
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17
18
use Modern::Perl;
19
20
use Carp;
21
22
use Koha::Database;
23
24
use base qw(Koha::Object);
25
26
=head1 NAME
27
28
Koha::Metadata - Koha Metadata Object class
29
30
=head1 API
31
32
=head2 Class Methods
33
34
=cut
35
36
=head3 type
37
38
=cut
39
40
sub _type {
41
    return 'HoldingsMetadata';
42
}
43
44
1;
(-)a/Koha/Holdings/Metadatas.pm (+50 lines)
Line 0 Link Here
1
package Koha::Holdings::Metadatas;
2
3
# This file is part of Koha.
4
#
5
# Koha is free software; you can redistribute it and/or modify it under the
6
# terms of the GNU General Public License as published by the Free Software
7
# Foundation; either version 3 of the License, or (at your option) any later
8
# version.
9
#
10
# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
11
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
12
# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
13
#
14
# You should have received a copy of the GNU General Public License along
15
# with Koha; if not, write to the Free Software Foundation, Inc.,
16
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17
18
use Modern::Perl;
19
20
use Carp;
21
22
use Koha::Database;
23
24
use Koha::Biblio::Metadata;
25
26
use base qw(Koha::Objects);
27
28
=head1 NAME
29
30
Koha::Biblio::Metadatas - Koha Metadata Object set class
31
32
=head1 API
33
34
=head2 Class Methods
35
36
=cut
37
38
=head3 type
39
40
=cut
41
42
sub _type {
43
    return 'HoldingsMetadata';
44
}
45
46
sub object_class {
47
    return 'Koha::Holdings::Metadata';
48
}
49
50
1;
(-)a/Koha/Schema/Result/BiblioFramework.pm (-2 / +16 lines)
Lines 37-42 __PACKAGE__->table("biblio_framework"); Link Here
37
  is_nullable: 0
37
  is_nullable: 0
38
  size: 255
38
  size: 255
39
39
40
=head2 frameworktype
41
42
  data_type: 'enum'
43
  default_value: 'bib'
44
  extra: {list => ["bib","hld"]}
45
  is_nullable: 0
46
40
=cut
47
=cut
41
48
42
__PACKAGE__->add_columns(
49
__PACKAGE__->add_columns(
Lines 44-49 __PACKAGE__->add_columns( Link Here
44
  { data_type => "varchar", default_value => "", is_nullable => 0, size => 4 },
51
  { data_type => "varchar", default_value => "", is_nullable => 0, size => 4 },
45
  "frameworktext",
52
  "frameworktext",
46
  { data_type => "varchar", default_value => "", is_nullable => 0, size => 255 },
53
  { data_type => "varchar", default_value => "", is_nullable => 0, size => 255 },
54
  "frameworktype",
55
  {
56
    data_type => "enum",
57
    default_value => "bib",
58
    extra => { list => ["bib", "hld"] },
59
    is_nullable => 0,
60
  },
47
);
61
);
48
62
49
=head1 PRIMARY KEY
63
=head1 PRIMARY KEY
Lines 59-66 __PACKAGE__->add_columns( Link Here
59
__PACKAGE__->set_primary_key("frameworkcode");
73
__PACKAGE__->set_primary_key("frameworkcode");
60
74
61
75
62
# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21
76
# Created by DBIx::Class::Schema::Loader v0.07048 @ 2018-04-03 15:37:39
63
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:KY1w7J/5cBsz9VV7QEBKPw
77
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:DD+ImqvVMYuKRnDvdXVq5w
64
78
65
# FIXME This should not be needed, we need to add the FK at DB level
79
# FIXME This should not be needed, we need to add the FK at DB level
66
# It cannot be done now because the default framework (frameworkcode=='')
80
# It cannot be done now because the default framework (frameworkcode=='')
(-)a/Koha/Schema/Result/Deleteditem.pm (-4 / +11 lines)
Lines 198-204 __PACKAGE__->table("deleteditems"); Link Here
198
198
199
  data_type: 'timestamp'
199
  data_type: 'timestamp'
200
  datetime_undef_if_invalid: 1
200
  datetime_undef_if_invalid: 1
201
  default_value: current_timestamp
201
  default_value: 'current_timestamp()'
202
  is_nullable: 0
202
  is_nullable: 0
203
203
204
=head2 location
204
=head2 location
Lines 282-287 __PACKAGE__->table("deleteditems"); Link Here
282
  is_nullable: 1
282
  is_nullable: 1
283
  size: 32
283
  size: 32
284
284
285
=head2 holdingnumber
286
287
  data_type: 'integer'
288
  is_nullable: 1
289
285
=cut
290
=cut
286
291
287
__PACKAGE__->add_columns(
292
__PACKAGE__->add_columns(
Lines 361-367 __PACKAGE__->add_columns( Link Here
361
  {
366
  {
362
    data_type => "timestamp",
367
    data_type => "timestamp",
363
    datetime_undef_if_invalid => 1,
368
    datetime_undef_if_invalid => 1,
364
    default_value => \"current_timestamp",
369
    default_value => "current_timestamp()",
365
    is_nullable => 0,
370
    is_nullable => 0,
366
  },
371
  },
367
  "location",
372
  "location",
Lines 392-397 __PACKAGE__->add_columns( Link Here
392
  { data_type => "varchar", is_nullable => 1, size => 32 },
397
  { data_type => "varchar", is_nullable => 1, size => 32 },
393
  "new_status",
398
  "new_status",
394
  { data_type => "varchar", is_nullable => 1, size => 32 },
399
  { data_type => "varchar", is_nullable => 1, size => 32 },
400
  "holdingnumber",
401
  { data_type => "integer", is_nullable => 1 },
395
);
402
);
396
403
397
=head1 PRIMARY KEY
404
=head1 PRIMARY KEY
Lines 407-414 __PACKAGE__->add_columns( Link Here
407
__PACKAGE__->set_primary_key("itemnumber");
414
__PACKAGE__->set_primary_key("itemnumber");
408
415
409
416
410
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-18 16:41:11
417
# Created by DBIx::Class::Schema::Loader v0.07048 @ 2018-03-27 18:01:32
411
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:xb11fPjp5PyXU7yfFWHycw
418
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:4Wn3TX+QZrVviNlZDtKymA
412
419
413
420
414
# You can replace this text with custom content, and it will be preserved on regeneration
421
# You can replace this text with custom content, and it will be preserved on regeneration
(-)a/Koha/Schema/Result/Holding.pm (+242 lines)
Line 0 Link Here
1
use utf8;
2
package Koha::Schema::Result::Holding;
3
4
# Created by DBIx::Class::Schema::Loader
5
# DO NOT MODIFY THE FIRST PART OF THIS FILE
6
7
=head1 NAME
8
9
Koha::Schema::Result::Holding
10
11
=cut
12
13
use strict;
14
use warnings;
15
16
use base 'DBIx::Class::Core';
17
18
=head1 TABLE: C<holdings>
19
20
=cut
21
22
__PACKAGE__->table("holdings");
23
24
=head1 ACCESSORS
25
26
=head2 holdingnumber
27
28
  data_type: 'integer'
29
  is_auto_increment: 1
30
  is_nullable: 0
31
32
=head2 biblionumber
33
34
  data_type: 'integer'
35
  default_value: 0
36
  is_foreign_key: 1
37
  is_nullable: 0
38
39
=head2 biblioitemnumber
40
41
  data_type: 'integer'
42
  default_value: 0
43
  is_foreign_key: 1
44
  is_nullable: 0
45
46
=head2 frameworkcode
47
48
  data_type: 'varchar'
49
  default_value: (empty string)
50
  is_nullable: 0
51
  size: 4
52
53
=head2 holdingbranch
54
55
  data_type: 'varchar'
56
  is_foreign_key: 1
57
  is_nullable: 1
58
  size: 10
59
60
=head2 location
61
62
  data_type: 'varchar'
63
  is_nullable: 1
64
  size: 80
65
66
=head2 callnumber
67
68
  data_type: 'varchar'
69
  is_nullable: 1
70
  size: 255
71
72
=head2 suppress
73
74
  data_type: 'tinyint'
75
  is_nullable: 1
76
77
=head2 timestamp
78
79
  data_type: 'timestamp'
80
  datetime_undef_if_invalid: 1
81
  default_value: 'current_timestamp()'
82
  is_nullable: 0
83
84
=head2 datecreated
85
86
  data_type: 'date'
87
  datetime_undef_if_invalid: 1
88
  is_nullable: 0
89
90
=head2 deleted_at
91
92
  data_type: 'datetime'
93
  datetime_undef_if_invalid: 1
94
  is_nullable: 1
95
96
=cut
97
98
__PACKAGE__->add_columns(
99
  "holdingnumber",
100
  { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
101
  "biblionumber",
102
  {
103
    data_type      => "integer",
104
    default_value  => 0,
105
    is_foreign_key => 1,
106
    is_nullable    => 0,
107
  },
108
  "biblioitemnumber",
109
  {
110
    data_type      => "integer",
111
    default_value  => 0,
112
    is_foreign_key => 1,
113
    is_nullable    => 0,
114
  },
115
  "frameworkcode",
116
  { data_type => "varchar", default_value => "", is_nullable => 0, size => 4 },
117
  "holdingbranch",
118
  { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
119
  "location",
120
  { data_type => "varchar", is_nullable => 1, size => 80 },
121
  "callnumber",
122
  { data_type => "varchar", is_nullable => 1, size => 255 },
123
  "suppress",
124
  { data_type => "tinyint", is_nullable => 1 },
125
  "timestamp",
126
  {
127
    data_type => "timestamp",
128
    datetime_undef_if_invalid => 1,
129
    default_value => "current_timestamp()",
130
    is_nullable => 0,
131
  },
132
  "datecreated",
133
  { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 0 },
134
  "deleted_at",
135
  {
136
    data_type => "datetime",
137
    datetime_undef_if_invalid => 1,
138
    is_nullable => 1,
139
  },
140
);
141
142
=head1 PRIMARY KEY
143
144
=over 4
145
146
=item * L</holdingnumber>
147
148
=back
149
150
=cut
151
152
__PACKAGE__->set_primary_key("holdingnumber");
153
154
=head1 RELATIONS
155
156
=head2 biblioitemnumber
157
158
Type: belongs_to
159
160
Related object: L<Koha::Schema::Result::Biblioitem>
161
162
=cut
163
164
__PACKAGE__->belongs_to(
165
  "biblioitemnumber",
166
  "Koha::Schema::Result::Biblioitem",
167
  { biblioitemnumber => "biblioitemnumber" },
168
  { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
169
);
170
171
=head2 biblionumber
172
173
Type: belongs_to
174
175
Related object: L<Koha::Schema::Result::Biblio>
176
177
=cut
178
179
__PACKAGE__->belongs_to(
180
  "biblionumber",
181
  "Koha::Schema::Result::Biblio",
182
  { biblionumber => "biblionumber" },
183
  { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
184
);
185
186
=head2 holdingbranch
187
188
Type: belongs_to
189
190
Related object: L<Koha::Schema::Result::Branch>
191
192
=cut
193
194
__PACKAGE__->belongs_to(
195
  "holdingbranch",
196
  "Koha::Schema::Result::Branch",
197
  { branchcode => "holdingbranch" },
198
  {
199
    is_deferrable => 1,
200
    join_type     => "LEFT",
201
    on_delete     => "RESTRICT",
202
    on_update     => "CASCADE",
203
  },
204
);
205
206
=head2 holdings_metadatas
207
208
Type: has_many
209
210
Related object: L<Koha::Schema::Result::HoldingsMetadata>
211
212
=cut
213
214
__PACKAGE__->has_many(
215
  "holdings_metadatas",
216
  "Koha::Schema::Result::HoldingsMetadata",
217
  { "foreign.holdingnumber" => "self.holdingnumber" },
218
  { cascade_copy => 0, cascade_delete => 0 },
219
);
220
221
=head2 items
222
223
Type: has_many
224
225
Related object: L<Koha::Schema::Result::Item>
226
227
=cut
228
229
__PACKAGE__->has_many(
230
  "items",
231
  "Koha::Schema::Result::Item",
232
  { "foreign.holdingnumber" => "self.holdingnumber" },
233
  { cascade_copy => 0, cascade_delete => 0 },
234
);
235
236
237
# Created by DBIx::Class::Schema::Loader v0.07048 @ 2018-03-27 18:01:32
238
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:IeRYmSgY1Lj0/tl4rM4IVg
239
240
241
# You can replace this text with custom code or comments, and it will be preserved on regeneration
242
1;
(-)a/Koha/Schema/Result/HoldingsMetadata.pm (+138 lines)
Line 0 Link Here
1
use utf8;
2
package Koha::Schema::Result::HoldingsMetadata;
3
4
# Created by DBIx::Class::Schema::Loader
5
# DO NOT MODIFY THE FIRST PART OF THIS FILE
6
7
=head1 NAME
8
9
Koha::Schema::Result::HoldingsMetadata
10
11
=cut
12
13
use strict;
14
use warnings;
15
16
use base 'DBIx::Class::Core';
17
18
=head1 TABLE: C<holdings_metadata>
19
20
=cut
21
22
__PACKAGE__->table("holdings_metadata");
23
24
=head1 ACCESSORS
25
26
=head2 id
27
28
  data_type: 'integer'
29
  is_auto_increment: 1
30
  is_nullable: 0
31
32
=head2 holdingnumber
33
34
  data_type: 'integer'
35
  is_foreign_key: 1
36
  is_nullable: 0
37
38
=head2 format
39
40
  data_type: 'varchar'
41
  is_nullable: 0
42
  size: 16
43
44
=head2 marcflavour
45
46
  data_type: 'varchar'
47
  is_nullable: 0
48
  size: 16
49
50
=head2 metadata
51
52
  data_type: 'longtext'
53
  is_nullable: 0
54
55
=head2 deleted_at
56
57
  data_type: 'datetime'
58
  datetime_undef_if_invalid: 1
59
  is_nullable: 1
60
61
=cut
62
63
__PACKAGE__->add_columns(
64
  "id",
65
  { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
66
  "holdingnumber",
67
  { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
68
  "format",
69
  { data_type => "varchar", is_nullable => 0, size => 16 },
70
  "marcflavour",
71
  { data_type => "varchar", is_nullable => 0, size => 16 },
72
  "metadata",
73
  { data_type => "longtext", is_nullable => 0 },
74
  "deleted_at",
75
  {
76
    data_type => "datetime",
77
    datetime_undef_if_invalid => 1,
78
    is_nullable => 1,
79
  },
80
);
81
82
=head1 PRIMARY KEY
83
84
=over 4
85
86
=item * L</id>
87
88
=back
89
90
=cut
91
92
__PACKAGE__->set_primary_key("id");
93
94
=head1 UNIQUE CONSTRAINTS
95
96
=head2 C<holdings_metadata_uniq_key>
97
98
=over 4
99
100
=item * L</holdingnumber>
101
102
=item * L</format>
103
104
=item * L</marcflavour>
105
106
=back
107
108
=cut
109
110
__PACKAGE__->add_unique_constraint(
111
  "holdings_metadata_uniq_key",
112
  ["holdingnumber", "format", "marcflavour"],
113
);
114
115
=head1 RELATIONS
116
117
=head2 holdingnumber
118
119
Type: belongs_to
120
121
Related object: L<Koha::Schema::Result::Holding>
122
123
=cut
124
125
__PACKAGE__->belongs_to(
126
  "holdingnumber",
127
  "Koha::Schema::Result::Holding",
128
  { holdingnumber => "holdingnumber" },
129
  { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
130
);
131
132
133
# Created by DBIx::Class::Schema::Loader v0.07048 @ 2018-03-27 18:01:32
134
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:LsMBBA9g7uGuPXiXQ94npw
135
136
137
# You can replace this text with custom code or comments, and it will be preserved on regeneration
138
1;
(-)a/Koha/Schema/Result/Item.pm (-4 / +32 lines)
Lines 202-208 __PACKAGE__->table("items"); Link Here
202
202
203
  data_type: 'timestamp'
203
  data_type: 'timestamp'
204
  datetime_undef_if_invalid: 1
204
  datetime_undef_if_invalid: 1
205
  default_value: current_timestamp
205
  default_value: 'current_timestamp()'
206
  is_nullable: 0
206
  is_nullable: 0
207
207
208
=head2 location
208
=head2 location
Lines 286-291 __PACKAGE__->table("items"); Link Here
286
  is_nullable: 1
286
  is_nullable: 1
287
  size: 32
287
  size: 32
288
288
289
=head2 holding_id
290
291
  data_type: 'integer'
292
  is_foreign_key: 1
293
  is_nullable: 1
294
289
=cut
295
=cut
290
296
291
__PACKAGE__->add_columns(
297
__PACKAGE__->add_columns(
Lines 375-381 __PACKAGE__->add_columns( Link Here
375
  {
381
  {
376
    data_type => "timestamp",
382
    data_type => "timestamp",
377
    datetime_undef_if_invalid => 1,
383
    datetime_undef_if_invalid => 1,
378
    default_value => \"current_timestamp",
384
    default_value => "current_timestamp()",
379
    is_nullable => 0,
385
    is_nullable => 0,
380
  },
386
  },
381
  "location",
387
  "location",
Lines 406-411 __PACKAGE__->add_columns( Link Here
406
  { data_type => "varchar", is_nullable => 1, size => 32 },
412
  { data_type => "varchar", is_nullable => 1, size => 32 },
407
  "new_status",
413
  "new_status",
408
  { data_type => "varchar", is_nullable => 1, size => 32 },
414
  { data_type => "varchar", is_nullable => 1, size => 32 },
415
  "holding_id",
416
  { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
409
);
417
);
410
418
411
=head1 PRIMARY KEY
419
=head1 PRIMARY KEY
Lines 576-581 __PACKAGE__->belongs_to( Link Here
576
  },
584
  },
577
);
585
);
578
586
587
=head2 holding_id
588
589
Type: belongs_to
590
591
Related object: L<Koha::Schema::Result::Holding>
592
593
=cut
594
595
__PACKAGE__->belongs_to(
596
  "holding_id",
597
  "Koha::Schema::Result::Holding",
598
  { holding_id => "holding_id" },
599
  {
600
    is_deferrable => 1,
601
    join_type     => "LEFT",
602
    on_delete     => "CASCADE",
603
    on_update     => "CASCADE",
604
  },
605
);
606
579
=head2 homebranch
607
=head2 homebranch
580
608
581
Type: belongs_to
609
Type: belongs_to
Lines 687-694 __PACKAGE__->might_have( Link Here
687
);
715
);
688
716
689
717
690
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-18 16:41:12
718
# Created by DBIx::Class::Schema::Loader v0.07048 @ 2018-03-27 18:01:32
691
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:CrNXvpDUvvcuPZK2Gfzs/Q
719
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:2by51tQSbBWys0cwsoqyMg
692
720
693
__PACKAGE__->belongs_to( biblioitem => "Koha::Schema::Result::Biblioitem", "biblioitemnumber" );
721
__PACKAGE__->belongs_to( biblioitem => "Koha::Schema::Result::Biblioitem", "biblioitemnumber" );
694
722
(-)a/Koha/Template/Plugin/Holdings.pm (+90 lines)
Line 0 Link Here
1
package Koha::Template::Plugin::Holdings;
2
3
# Copyright ByWater Solutions 2012
4
# Copyright BibLibre 2014
5
# Copyright University of Helsinki 2017
6
7
# This file is part of Koha.
8
#
9
# Koha is free software; you can redistribute it and/or modify it
10
# under the terms of the GNU General Public License as published by
11
# the Free Software Foundation; either version 3 of the License, or
12
# (at your option) any later version.
13
#
14
# Koha is distributed in the hope that it will be useful, but
15
# WITHOUT ANY WARRANTY; without even the implied warranty of
16
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
# GNU General Public License for more details.
18
#
19
# You should have received a copy of the GNU General Public License
20
# along with Koha; if not, see <http://www.gnu.org/licenses>.
21
22
use Modern::Perl;
23
24
use Template::Plugin;
25
use base qw( Template::Plugin );
26
27
use C4::Context;
28
use C4::Holdings;
29
30
use Koha::Holdings;
31
32
sub GetLocation {
33
    my ( $self, $holding ) = @_;
34
    my $opac = shift || 0;
35
36
    if ( !$holding ) {
37
        return '';
38
    }
39
40
    if ( ref($holding) ne 'HASH' ) {
41
        $holding = Koha::Holdings->find( $holding )->unblessed;
42
        if ( !$holding ) {
43
            return '';
44
        }
45
    }
46
47
    my @parts;
48
49
    if ( $opac ) {
50
        if ( $holding->{'holdingbranch'}) {
51
            my $query = "SELECT branchname FROM branches WHERE branchcode = ?";
52
            my $sth   = C4::Context->dbh->prepare( $query );
53
            $sth->execute( $holding->{'holdingbranch'} );
54
            my $b = $sth->fetchrow_hashref();
55
            push @parts, $b->{'branchname'} if $b;
56
            $sth->finish();
57
        }
58
        if ( $holding->{'location'} ) {
59
            my $av = Koha::AuthorisedValues->search({ category => 'LOC', authorised_value => $holding->{'location'} });
60
            push @parts, $av->next->opac_description if $av->count;
61
        }
62
        push @parts, $holding->{'callnumber'} if $holding->{'callnumber'};
63
        return join(' - ', @parts);
64
    }
65
66
    push @parts, $holding->{'holding_id'};
67
    push @parts, $holding->{'holdingbranch'} if $holding->{'holdingbranch'};
68
    push @parts, $holding->{'location'} if $holding->{'location'};
69
    push @parts, $holding->{'callnumber'} if $holding->{'callnumber'};
70
    return join(' ', @parts);
71
}
72
73
sub GetDetails {
74
    my ( $self, $holding ) = @_;
75
    my $opac = shift || 0;
76
77
    if ( !$holding ) {
78
        return '';
79
    }
80
81
    if ( ref($holding) eq 'HASH' ) {
82
        $holding = $holding->{'holding_id'};
83
    }
84
85
    my $marcHolding = C4::Holdings::GetMarcHolding( $holding, $opac );
86
87
    return C4::Holdings::TransformMarcHoldingToKoha( $marcHolding );
88
}
89
90
1;
(-)a/acqui/z3950_search.pl (-1 / +1 lines)
Lines 52-58 my $page = $input->param('current_page') || 1; Link Here
52
$page               = $input->param('goto_page') if $input->param('changepage_goto');
52
$page               = $input->param('goto_page') if $input->param('changepage_goto');
53
53
54
# get framework list
54
# get framework list
55
my $frameworks = Koha::BiblioFrameworks->search({}, { order_by => ['frameworktext'] });
55
my $frameworks = Koha::BiblioFrameworks->search({frameworktype => 'bib'}, { order_by => ['frameworktext'] });
56
56
57
my $vendor = Koha::Acquisition::Booksellers->find( $booksellerid );
57
my $vendor = Koha::Acquisition::Booksellers->find( $booksellerid );
58
58
(-)a/admin/biblio_framework.pl (-1 / +4 lines)
Lines 54-64 if ( $op eq 'add_form' ) { Link Here
54
} elsif ( $op eq 'add_validate' ) {
54
} elsif ( $op eq 'add_validate' ) {
55
    my $frameworkcode = $input->param('frameworkcode');
55
    my $frameworkcode = $input->param('frameworkcode');
56
    my $frameworktext = $input->param('frameworktext');
56
    my $frameworktext = $input->param('frameworktext');
57
    my $frameworktype = $input->param('frameworktype');
57
    my $is_a_modif    = $input->param('is_a_modif');
58
    my $is_a_modif    = $input->param('is_a_modif');
58
59
59
    if ($is_a_modif) {
60
    if ($is_a_modif) {
60
        my $framework = Koha::BiblioFrameworks->find($frameworkcode);
61
        my $framework = Koha::BiblioFrameworks->find($frameworkcode);
61
        $framework->frameworktext($frameworktext);
62
        $framework->frameworktext($frameworktext);
63
        $framework->frameworktype($frameworktype);
62
        eval { $framework->store; };
64
        eval { $framework->store; };
63
        if ($@) {
65
        if ($@) {
64
            push @messages, { type => 'error', code => 'error_on_update' };
66
            push @messages, { type => 'error', code => 'error_on_update' };
Lines 69-74 if ( $op eq 'add_form' ) { Link Here
69
        my $framework = Koha::BiblioFramework->new(
71
        my $framework = Koha::BiblioFramework->new(
70
            {   frameworkcode => $frameworkcode,
72
            {   frameworkcode => $frameworkcode,
71
                frameworktext => $frameworktext,
73
                frameworktext => $frameworktext,
74
                frameworktype => $frameworktype,
72
            }
75
            }
73
        );
76
        );
74
        eval { $framework->store; };
77
        eval { $framework->store; };
Lines 117-123 if ( $op eq 'add_form' ) { Link Here
117
}
120
}
118
121
119
if ( $op eq 'list' ) {
122
if ( $op eq 'list' ) {
120
    my $frameworks = Koha::BiblioFrameworks->search( {}, { order_by => ['frameworktext'], } );
123
    my $frameworks = Koha::BiblioFrameworks->search( undef, { order_by => ['frameworktype', 'frameworktext'] } );
121
    $template->param( frameworks => $frameworks, );
124
    $template->param( frameworks => $frameworks, );
122
}
125
}
123
126
(-)a/catalogue/detail.pl (-1 / +9 lines)
Lines 26-31 use C4::Koha; Link Here
26
use C4::Serials;    #uses getsubscriptionfrom biblionumber
26
use C4::Serials;    #uses getsubscriptionfrom biblionumber
27
use C4::Output;
27
use C4::Output;
28
use C4::Biblio;
28
use C4::Biblio;
29
use C4::Holdings;
29
use C4::Items;
30
use C4::Items;
30
use C4::Circulation;
31
use C4::Circulation;
31
use C4::Reserves;
32
use C4::Reserves;
Lines 177-182 foreach my $subscription (@subscriptions) { Link Here
177
    push @subs, \%cell;
178
    push @subs, \%cell;
178
}
179
}
179
180
181
# Summary holdings
182
my $summary_holdings;
183
if (C4::Context->preference('SummaryHoldings')) {
184
    $summary_holdings = C4::Holdings::GetHoldingsByBiblionumber($biblionumber);
185
}
180
186
181
# Get acquisition details
187
# Get acquisition details
182
if ( C4::Context->preference('AcquisitionDetails') ) {
188
if ( C4::Context->preference('AcquisitionDetails') ) {
Lines 365-371 $template->param( Link Here
365
        hostrecords         => $hostrecords,
371
        hostrecords         => $hostrecords,
366
	analytics_flag	=> $analytics_flag,
372
	analytics_flag	=> $analytics_flag,
367
	C4::Search::enabled_staff_search_views,
373
	C4::Search::enabled_staff_search_views,
368
        materials       => $materials_flag,
374
    materials       => $materials_flag,
375
    show_summary_holdings => C4::Context->preference('SummaryHoldings') ? 1 : 0,
376
    summary_holdings => $summary_holdings,
369
);
377
);
370
378
371
if (C4::Context->preference("AlternateHoldingsField") && scalar @items == 0) {
379
if (C4::Context->preference("AlternateHoldingsField") && scalar @items == 0) {
(-)a/cataloguing/addbiblio.pl (-1 / +1 lines)
Lines 749-755 if ($frameworkcode eq 'FA'){ Link Here
749
    exit;
749
    exit;
750
}
750
}
751
751
752
my $frameworks = Koha::BiblioFrameworks->search({}, { order_by => ['frameworktext'] });
752
my $frameworks = Koha::BiblioFrameworks->search({frameworktype => 'bib'}, { order_by => ['frameworktext'] });
753
$template->param(
753
$template->param(
754
    frameworks => $frameworks,
754
    frameworks => $frameworks,
755
    breedingid => $breedingid,
755
    breedingid => $breedingid,
(-)a/cataloguing/addbooks.pl (-1 / +1 lines)
Lines 144-150 my $servers = $schema->resultset('Z3950server')->search( Link Here
144
        },
144
        },
145
);
145
);
146
146
147
my $frameworks = Koha::BiblioFrameworks->search({}, { order_by => ['frameworktext'] });
147
my $frameworks = Koha::BiblioFrameworks->search({frameworktype => 'bib'}, { order_by => ['frameworktext'] });
148
$template->param(
148
$template->param(
149
    servers           => $servers,
149
    servers           => $servers,
150
    frameworks        => $frameworks,
150
    frameworks        => $frameworks,
(-)a/cataloguing/addholding.pl (+728 lines)
Line 0 Link Here
1
#!/usr/bin/perl
2
3
4
# Copyright 2000-2002 Katipo Communications
5
# Copyright 2004-2010 BibLibre
6
#
7
# This file is part of Koha.
8
#
9
# Koha is free software; you can redistribute it and/or modify it
10
# under the terms of the GNU General Public License as published by
11
# the Free Software Foundation; either version 3 of the License, or
12
# (at your option) any later version.
13
#
14
# Koha is distributed in the hope that it will be useful, but
15
# WITHOUT ANY WARRANTY; without even the implied warranty of
16
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
# GNU General Public License for more details.
18
#
19
# You should have received a copy of the GNU General Public License
20
# along with Koha; if not, see <http://www.gnu.org/licenses>.
21
22
# TODO: refactor to avoid duplication from addbiblio
23
24
use strict;
25
#use warnings; FIXME - Bug 2505
26
use CGI q(-utf8);
27
use C4::Output;
28
use C4::Auth;
29
use C4::Holdings;
30
use C4::Search;
31
use C4::Biblio;
32
use C4::Context;
33
use MARC::Record;
34
use C4::Log;
35
use C4::Koha;
36
use C4::ClassSource;
37
use C4::ImportBatch;
38
use C4::Charset;
39
use Koha::BiblioFrameworks;
40
use Koha::DateUtils;
41
use C4::Matcher;
42
43
use Koha::ItemTypes;
44
use Koha::Libraries;
45
46
use Koha::BiblioFrameworks;
47
48
use Date::Calc qw(Today);
49
use MARC::File::USMARC;
50
use MARC::File::XML;
51
use URI::Escape;
52
53
if ( C4::Context->preference('marcflavour') eq 'UNIMARC' ) {
54
    MARC::File::XML->default_record_format('UNIMARC');
55
}
56
57
our($tagslib,$authorised_values_sth,$is_a_modif,$usedTagsLib,$mandatory_z3950);
58
59
=head1 FUNCTIONS
60
61
=head2 build_authorized_values_list
62
63
=cut
64
65
sub build_authorized_values_list {
66
    my ( $tag, $subfield, $value, $dbh, $authorised_values_sth,$index_tag,$index_subfield ) = @_;
67
68
    my @authorised_values;
69
    my %authorised_lib;
70
71
    # builds list, depending on authorised value...
72
73
    #---- branch
74
    if ( $tagslib->{$tag}->{$subfield}->{'authorised_value'} eq "branches" ) {
75
        my $libraries = Koha::Libraries->search_filtered({}, {order_by => ['branchname']});
76
        while ( my $l = $libraries->next ) {
77
            push @authorised_values, $l->branchcode;
78
            $authorised_lib{$l->branchcode} = $l->branchname;
79
        }
80
    }
81
    elsif ( $tagslib->{$tag}->{$subfield}->{authorised_value} eq "LOC" ) {
82
        push @authorised_values, ""
83
          unless ( $tagslib->{$tag}->{$subfield}->{mandatory}
84
            && ( $value || $tagslib->{$tag}->{$subfield}->{defaultvalue} ) );
85
86
87
        my $branch_limit = C4::Context->userenv ? C4::Context->userenv->{"branch"} : "";
88
        my $avs = Koha::AuthorisedValues->search(
89
            {
90
                branchcode => $branch_limit,
91
                category => $tagslib->{$tag}->{$subfield}->{authorised_value},
92
            },
93
            {
94
                order_by => [ 'category', 'lib', 'lib_opac' ],
95
            }
96
        );
97
98
        while ( my $av = $avs->next ) {
99
            push @authorised_values, $av->authorised_value;
100
            $authorised_lib{$av->authorised_value} = $av->lib;
101
        }
102
    }
103
    elsif ( $tagslib->{$tag}->{$subfield}->{authorised_value} eq "cn_source" ) {
104
        push @authorised_values, ""
105
          unless ( $tagslib->{$tag}->{$subfield}->{mandatory} );
106
107
        my $class_sources = GetClassSources();
108
109
        my $default_source = C4::Context->preference("DefaultClassificationSource");
110
111
        foreach my $class_source (sort keys %$class_sources) {
112
            next unless $class_sources->{$class_source}->{'used'} or
113
                        ($value and $class_source eq $value) or
114
                        ($class_source eq $default_source);
115
            push @authorised_values, $class_source;
116
            $authorised_lib{$class_source} = $class_sources->{$class_source}->{'description'};
117
        }
118
        $value = $default_source unless $value;
119
    }
120
    else {
121
        my $branch_limit = C4::Context->userenv ? C4::Context->userenv->{"branch"} : "";
122
        $authorised_values_sth->execute(
123
            $tagslib->{$tag}->{$subfield}->{authorised_value},
124
            $branch_limit ? $branch_limit : (),
125
        );
126
127
        push @authorised_values, ""
128
          unless ( $tagslib->{$tag}->{$subfield}->{mandatory}
129
            && ( $value || $tagslib->{$tag}->{$subfield}->{defaultvalue} ) );
130
131
        while ( my ( $value, $lib ) = $authorised_values_sth->fetchrow_array ) {
132
            push @authorised_values, $value;
133
            $authorised_lib{$value} = $lib;
134
        }
135
    }
136
    $authorised_values_sth->finish;
137
    return {
138
        type     => 'select',
139
        id       => "tag_".$tag."_subfield_".$subfield."_".$index_tag."_".$index_subfield,
140
        name     => "tag_".$tag."_subfield_".$subfield."_".$index_tag."_".$index_subfield,
141
        default  => $value,
142
        values   => \@authorised_values,
143
        labels   => \%authorised_lib,
144
    };
145
146
}
147
148
=head2 CreateKey
149
150
    Create a random value to set it into the input name
151
152
=cut
153
154
sub CreateKey {
155
    return int(rand(1000000));
156
}
157
158
=head2 create_input
159
160
 builds the <input ...> entry for a subfield.
161
162
=cut
163
164
sub create_input {
165
    my ( $tag, $subfield, $value, $index_tag, $tabloop, $rec, $authorised_values_sth,$cgi ) = @_;
166
167
    my $index_subfield = CreateKey(); # create a specific key for each subfield
168
169
    $value =~ s/"/&quot;/g;
170
171
    # if there is no value provided but a default value in parameters, get it
172
    if ( $value eq '' ) {
173
        $value = $tagslib->{$tag}->{$subfield}->{defaultvalue};
174
175
        # get today date & replace <<YYYY>>, <<MM>>, <<DD>> if provided in the default value
176
        my $today_dt = dt_from_string;
177
        my $year = $today_dt->strftime('%Y');
178
        my $month = $today_dt->strftime('%m');
179
        my $day = $today_dt->strftime('%d');
180
        $value =~ s/<<YYYY>>/$year/g;
181
        $value =~ s/<<MM>>/$month/g;
182
        $value =~ s/<<DD>>/$day/g;
183
        # And <<USER>> with surname (?)
184
        my $username=(C4::Context->userenv?C4::Context->userenv->{'surname'}:"superlibrarian");
185
        $value=~s/<<USER>>/$username/g;
186
187
    }
188
    my $dbh = C4::Context->dbh;
189
190
    # map '@' as "subfield" label for fixed fields
191
    # to something that's allowed in a div id.
192
    my $id_subfield = $subfield;
193
    $id_subfield = "00" if $id_subfield eq "@";
194
195
    my %subfield_data = (
196
        tag        => $tag,
197
        subfield   => $id_subfield,
198
        marc_lib       => $tagslib->{$tag}->{$subfield}->{lib},
199
        tag_mandatory  => $tagslib->{$tag}->{mandatory},
200
        mandatory      => $tagslib->{$tag}->{$subfield}->{mandatory},
201
        repeatable     => $tagslib->{$tag}->{$subfield}->{repeatable},
202
        kohafield      => $tagslib->{$tag}->{$subfield}->{kohafield},
203
        index          => $index_tag,
204
        id             => "tag_".$tag."_subfield_".$id_subfield."_".$index_tag."_".$index_subfield,
205
        value          => $value,
206
        maxlength      => $tagslib->{$tag}->{$subfield}->{maxlength},
207
        random         => CreateKey(),
208
    );
209
210
    if(exists $mandatory_z3950->{$tag.$subfield}){
211
        $subfield_data{z3950_mandatory} = $mandatory_z3950->{$tag.$subfield};
212
    }
213
    # Subfield is hidden depending of hidden and mandatory flag, and is always
214
    # shown if it contains anything or if its field is mandatory.
215
    my $tdef = $tagslib->{$tag};
216
    $subfield_data{visibility} = "display:none;"
217
        if $tdef->{$subfield}->{hidden} % 2 == 1 &&
218
           $value eq '' &&
219
           !$tdef->{$subfield}->{mandatory} &&
220
           !$tdef->{mandatory};
221
    # expand all subfields of 773 if there is a host item provided in the input
222
    $subfield_data{visibility} ="" if ($tag eq 773 and $cgi->param('hostitemnumber'));
223
224
225
    # it's an authorised field
226
    if ( $tagslib->{$tag}->{$subfield}->{authorised_value} ) {
227
        $subfield_data{marc_value} =
228
          build_authorized_values_list( $tag, $subfield, $value, $dbh,
229
            $authorised_values_sth,$index_tag,$index_subfield );
230
231
    # it's a subfield $9 linking to an authority record - see bug 2206
232
    }
233
    elsif ($subfield eq "9" and
234
           exists($tagslib->{$tag}->{'a'}->{authtypecode}) and
235
           defined($tagslib->{$tag}->{'a'}->{authtypecode}) and
236
           $tagslib->{$tag}->{'a'}->{authtypecode} ne '') {
237
238
        $subfield_data{marc_value} = {
239
            type      => 'text',
240
            id        => $subfield_data{id},
241
            name      => $subfield_data{id},
242
            value     => $value,
243
            size      => 5,
244
            maxlength => $subfield_data{maxlength},
245
            readonly  => 1,
246
        };
247
248
    # it's a thesaurus / authority field
249
    }
250
    elsif ( $tagslib->{$tag}->{$subfield}->{authtypecode} ) {
251
        # when authorities auto-creation is allowed, do not set readonly
252
        my $is_readonly = !C4::Context->preference("BiblioAddsAuthorities");
253
254
        $subfield_data{marc_value} = {
255
            type      => 'text',
256
            id        => $subfield_data{id},
257
            name      => $subfield_data{id},
258
            value     => $value,
259
            size      => 67,
260
            maxlength => $subfield_data{maxlength},
261
            readonly  => ($is_readonly) ? 1 : 0,
262
            authtype  => $tagslib->{$tag}->{$subfield}->{authtypecode},
263
        };
264
265
    # it's a plugin field
266
    } elsif ( $tagslib->{$tag}->{$subfield}->{'value_builder'} ) {
267
        require Koha::FrameworkPlugin;
268
        my $plugin = Koha::FrameworkPlugin->new( {
269
            name => $tagslib->{$tag}->{$subfield}->{'value_builder'},
270
        });
271
        my $pars= { dbh => $dbh, record => $rec, tagslib => $tagslib,
272
            id => $subfield_data{id}, tabloop => $tabloop };
273
        $plugin->build( $pars );
274
        if( !$plugin->errstr ) {
275
            $subfield_data{marc_value} = {
276
                type           => 'text_complex',
277
                id             => $subfield_data{id},
278
                name           => $subfield_data{id},
279
                value          => $value,
280
                size           => 67,
281
                maxlength      => $subfield_data{maxlength},
282
                javascript     => $plugin->javascript,
283
                noclick        => $plugin->noclick,
284
            };
285
        } else {
286
            warn $plugin->errstr;
287
            # supply default input form
288
            $subfield_data{marc_value} = {
289
                type      => 'text',
290
                id        => $subfield_data{id},
291
                name      => $subfield_data{id},
292
                value     => $value,
293
                size      => 67,
294
                maxlength => $subfield_data{maxlength},
295
                readonly  => 0,
296
            };
297
        }
298
299
    # it's an hidden field
300
    } elsif ( $tag eq '' ) {
301
        $subfield_data{marc_value} = {
302
            type      => 'hidden',
303
            id        => $subfield_data{id},
304
            name      => $subfield_data{id},
305
            value     => $value,
306
            size      => 67,
307
            maxlength => $subfield_data{maxlength},
308
        };
309
310
    }
311
    else {
312
        # it's a standard field
313
        if (
314
            length($value) > 100
315
            or
316
            ( C4::Context->preference("marcflavour") eq "UNIMARC" && $tag >= 300
317
                and $tag < 400 && $subfield eq 'a' )
318
            or (    $tag >= 500
319
                and $tag < 600
320
                && C4::Context->preference("marcflavour") eq "MARC21" )
321
          )
322
        {
323
            $subfield_data{marc_value} = {
324
                type      => 'textarea',
325
                id        => $subfield_data{id},
326
                name      => $subfield_data{id},
327
                value     => $value,
328
            };
329
330
        }
331
        else {
332
            $subfield_data{marc_value} = {
333
                type      => 'text',
334
                id        => $subfield_data{id},
335
                name      => $subfield_data{id},
336
                value     => $value,
337
                size      => 67,
338
                maxlength => $subfield_data{maxlength},
339
                readonly  => 0,
340
            };
341
342
        }
343
    }
344
    $subfield_data{'index_subfield'} = $index_subfield;
345
    return \%subfield_data;
346
}
347
348
349
=head2 format_indicator
350
351
Translate indicator value for output form - specifically, map
352
indicator = ' ' to ''.  This is for the convenience of a cataloger
353
using a mouse to select an indicator input.
354
355
=cut
356
357
sub format_indicator {
358
    my $ind_value = shift;
359
    return '' if not defined $ind_value;
360
    return '' if $ind_value eq ' ';
361
    return $ind_value;
362
}
363
364
sub build_tabs {
365
    my ( $template, $record, $dbh, $encoding,$input ) = @_;
366
367
    # fill arrays
368
    my @loop_data = ();
369
    my $tag;
370
371
    my $branch_limit = C4::Context->userenv ? C4::Context->userenv->{"branch"} : "";
372
    my $query = "SELECT authorised_value, lib
373
                FROM authorised_values";
374
    $query .= qq{ LEFT JOIN authorised_values_branches ON ( id = av_id )} if $branch_limit;
375
    $query .= " WHERE category = ?";
376
    $query .= " AND ( branchcode = ? OR branchcode IS NULL )" if $branch_limit;
377
    $query .= " GROUP BY lib ORDER BY lib, lib_opac";
378
    my $authorised_values_sth = $dbh->prepare( $query );
379
380
    # in this array, we will push all the 10 tabs
381
    # to avoid having 10 tabs in the template : they will all be in the same BIG_LOOP
382
    my @BIG_LOOP;
383
    my %seen;
384
    my @tab_data; # all tags to display
385
386
    foreach my $used ( @$usedTagsLib ){
387
        push @tab_data,$used->{tagfield} if not $seen{$used->{tagfield}};
388
        $seen{$used->{tagfield}}++;
389
    }
390
391
    my $max_num_tab=-1;
392
    foreach(@$usedTagsLib){
393
        if($_->{tab} > -1 && $_->{tab} >= $max_num_tab && $_->{tagfield} != '995'){ # FIXME : MARC21 ?
394
            $max_num_tab = $_->{tab};
395
        }
396
    }
397
    if($max_num_tab >= 9){
398
        $max_num_tab = 9;
399
    }
400
    # loop through each tab 0 through 9
401
    for ( my $tabloop = 0 ; $tabloop <= $max_num_tab ; $tabloop++ ) {
402
        my @loop_data = (); #innerloop in the template.
403
        my $i = 0;
404
        foreach my $tag (@tab_data) {
405
            $i++;
406
            next if ! $tag;
407
            my ($indicator1, $indicator2);
408
            my $index_tag = CreateKey;
409
410
            # if MARC::Record is not empty =>use it as master loop, then add missing subfields that should be in the tab.
411
            # if MARC::Record is empty => use tab as master loop.
412
            if ( $record ne -1 && ( $record->field($tag) || $tag eq '000' ) ) {
413
                my @fields;
414
		if ( $tag ne '000' ) {
415
                    @fields = $record->field($tag);
416
		}
417
		else {
418
		   push @fields, $record->leader(); # if tag == 000
419
		}
420
		# loop through each field
421
                foreach my $field (@fields) {
422
423
                    my @subfields_data;
424
                    if ( $tag < 10 ) {
425
                        my ( $value, $subfield );
426
                        if ( $tag ne '000' ) {
427
                            $value    = $field->data();
428
                            $subfield = "@";
429
                        }
430
                        else {
431
                            $value    = $field;
432
                            $subfield = '@';
433
                        }
434
                        next if ( $tagslib->{$tag}->{$subfield}->{tab} ne $tabloop );
435
                        next
436
                          if ( $tagslib->{$tag}->{$subfield}->{kohafield} eq
437
                            'biblio.biblionumber' );
438
                        push(
439
                            @subfields_data,
440
                            &create_input(
441
                                $tag, $subfield, $value, $index_tag, $tabloop, $record,
442
                                $authorised_values_sth,$input
443
                            )
444
                        );
445
                    }
446
                    else {
447
                        my @subfields = $field->subfields();
448
                        foreach my $subfieldcount ( 0 .. $#subfields ) {
449
                            my $subfield = $subfields[$subfieldcount][0];
450
                            my $value    = $subfields[$subfieldcount][1];
451
                            next if ( length $subfield != 1 );
452
                            next if ( $tagslib->{$tag}->{$subfield}->{tab} ne $tabloop );
453
                            push(
454
                                @subfields_data,
455
                                &create_input(
456
                                    $tag, $subfield, $value, $index_tag, $tabloop,
457
                                    $record, $authorised_values_sth,$input
458
                                )
459
                            );
460
                        }
461
                    }
462
463
                    # now, loop again to add parameter subfield that are not in the MARC::Record
464
                    foreach my $subfield ( sort( keys %{ $tagslib->{$tag} } ) )
465
                    {
466
                        next if ( length $subfield != 1 );
467
                        next if ( $tagslib->{$tag}->{$subfield}->{tab} ne $tabloop );
468
                        next if ( $tag < 10 );
469
                        next
470
                          if ( ( $tagslib->{$tag}->{$subfield}->{hidden} <= -4 )
471
                            or ( $tagslib->{$tag}->{$subfield}->{hidden} >= 5 ) )
472
                            and not ( $subfield eq "9" and
473
                                      exists($tagslib->{$tag}->{'a'}->{authtypecode}) and
474
                                      defined($tagslib->{$tag}->{'a'}->{authtypecode}) and
475
                                      $tagslib->{$tag}->{'a'}->{authtypecode} ne ""
476
                                    )
477
                          ;    #check for visibility flag
478
                               # if subfield is $9 in a field whose $a is authority-controlled,
479
                               # always include in the form regardless of the hidden setting - bug 2206
480
                        next if ( defined( $field->subfield($subfield) ) );
481
                        push(
482
                            @subfields_data,
483
                            &create_input(
484
                                $tag, $subfield, '', $index_tag, $tabloop, $record,
485
                                $authorised_values_sth,$input
486
                            )
487
                        );
488
                    }
489
                    if ( $#subfields_data >= 0 ) {
490
                        # build the tag entry.
491
                        # note that the random() field is mandatory. Otherwise, on repeated fields, you'll
492
                        # have twice the same "name" value, and cgi->param() will return only one, making
493
                        # all subfields to be merged in a single field.
494
                        my %tag_data = (
495
                            tag           => $tag,
496
                            index         => $index_tag,
497
                            tag_lib       => $tagslib->{$tag}->{lib},
498
                            repeatable       => $tagslib->{$tag}->{repeatable},
499
                            mandatory       => $tagslib->{$tag}->{mandatory},
500
                            subfield_loop => \@subfields_data,
501
                            fixedfield    => $tag < 10?1:0,
502
                            random        => CreateKey,
503
                        );
504
                        if ($tag >= 10){ # no indicator for 00x tags
505
                           $tag_data{indicator1} = format_indicator($field->indicator(1)),
506
                           $tag_data{indicator2} = format_indicator($field->indicator(2)),
507
                        }
508
                        push( @loop_data, \%tag_data );
509
                    }
510
                 } # foreach $field end
511
512
            # if breeding is empty
513
            }
514
            else {
515
                my @subfields_data;
516
                foreach my $subfield ( sort( keys %{ $tagslib->{$tag} } ) ) {
517
                    next if ( length $subfield != 1 );
518
                    next
519
                      if ( ( $tagslib->{$tag}->{$subfield}->{hidden} <= -4 )
520
                        or ( $tagslib->{$tag}->{$subfield}->{hidden} >= 5 ) )
521
                      and not ( $subfield eq "9" and
522
                                exists($tagslib->{$tag}->{'a'}->{authtypecode}) and
523
                                defined($tagslib->{$tag}->{'a'}->{authtypecode}) and
524
                                $tagslib->{$tag}->{'a'}->{authtypecode} ne ""
525
                              )
526
                      ;    #check for visibility flag
527
                           # if subfield is $9 in a field whose $a is authority-controlled,
528
                           # always include in the form regardless of the hidden setting - bug 2206
529
                    next
530
                      if ( $tagslib->{$tag}->{$subfield}->{tab} ne $tabloop );
531
			push(
532
                        @subfields_data,
533
                        &create_input(
534
                            $tag, $subfield, '', $index_tag, $tabloop, $record,
535
                            $authorised_values_sth,$input
536
                        )
537
                    );
538
                }
539
                if ( $#subfields_data >= 0 ) {
540
                    my %tag_data = (
541
                        tag              => $tag,
542
                        index            => $index_tag,
543
                        tag_lib          => $tagslib->{$tag}->{lib},
544
                        repeatable       => $tagslib->{$tag}->{repeatable},
545
                        mandatory       => $tagslib->{$tag}->{mandatory},
546
                        indicator1       => $indicator1,
547
                        indicator2       => $indicator2,
548
                        subfield_loop    => \@subfields_data,
549
                        tagfirstsubfield => $subfields_data[0],
550
                        fixedfield       => $tag < 10?1:0,
551
                    );
552
553
                    push @loop_data, \%tag_data ;
554
                }
555
            }
556
        }
557
        if ( $#loop_data >= 0 ) {
558
            push @BIG_LOOP, {
559
                number    => $tabloop,
560
                innerloop => \@loop_data,
561
            };
562
        }
563
    }
564
    $authorised_values_sth->finish;
565
    $template->param( BIG_LOOP => \@BIG_LOOP );
566
}
567
568
# ========================
569
#          MAIN
570
#=========================
571
my $input = new CGI;
572
my $error = $input->param('error');
573
my $biblionumber  = $input->param('biblionumber');
574
my $holding_id = $input->param('holding_id'); # if holding_id exists, it's a modif, not a new holding.
575
my $op            = $input->param('op');
576
my $mode          = $input->param('mode');
577
my $frameworkcode = $input->param('frameworkcode');
578
my $redirect      = $input->param('redirect');
579
my $searchid      = $input->param('searchid');
580
my $dbh           = C4::Context->dbh;
581
582
my $userflags = 'edit_items';
583
584
my $changed_framework = $input->param('changed_framework');
585
$frameworkcode = &C4::Holdings::GetHoldingFrameworkCode($holding_id)
586
  if ( $holding_id and not( defined $frameworkcode) and $op ne 'add' );
587
588
$frameworkcode = C4::Context->preference('DefaultSummaryHoldingsFrameworkCode') || 'HLD' if ( !$frameworkcode || $frameworkcode eq 'Default' );
589
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
590
    {
591
        template_name   => "cataloguing/addholding.tt",
592
        query           => $input,
593
        type            => "intranet",
594
        authnotrequired => 0,
595
        flagsrequired   => { editcatalogue => $userflags },
596
    }
597
);
598
599
# TODO: support in advanced editor?
600
#if ( $op ne "delete" && C4::Context->preference('EnableAdvancedCatalogingEditor') && $input->cookie( 'catalogue_editor_' . $loggedinuser ) eq 'advanced' ) {
601
#    print $input->redirect( '/cgi-bin/koha/cataloguing/editor.pl#catalog/' . $biblionumber . '/holdings/' . ( $holding_id ? $holding_id : '' ) );
602
#    exit;
603
#}
604
605
my $frameworks = Koha::BiblioFrameworks->search({frameworktype => 'hld'}, { order_by => ['frameworktext'] });
606
$template->param(
607
    frameworks => $frameworks
608
);
609
610
# ++ Global
611
$tagslib         = &GetMarcStructure( 1, $frameworkcode );
612
$usedTagsLib     = &GetUsedMarcStructure( $frameworkcode );
613
# -- Global
614
615
my $record   = -1;
616
my $encoding = "";
617
618
if ($holding_id){
619
    $record = C4::Holdings::GetMarcHolding($holding_id);
620
}
621
622
$is_a_modif = 0;
623
624
if ($holding_id) {
625
    $is_a_modif = 1;
626
627
}
628
my ( $biblionumbertagfield, $biblionumbertagsubfield ) =
629
    &GetMarcFromKohaField( "biblio.biblionumber", $frameworkcode );
630
631
#-------------------------------------------------------------------------------------
632
if ( $op eq "add" ) {
633
#-------------------------------------------------------------------------------------
634
    $template->param(
635
        biblionumberdata => $biblionumber,
636
    );
637
    # getting html input
638
    my @params = $input->multi_param();
639
    $record = TransformHtmlToMarc( $input, 1 );
640
    if ( $is_a_modif ) {
641
        ModHolding( $record, $holding_id, $frameworkcode );
642
    }
643
    else {
644
        $holding_id = AddHolding( $record, $frameworkcode, $biblionumber );
645
    }
646
    if ($redirect eq "items" || ($mode ne "popup" && !$is_a_modif && $redirect ne "view" && $redirect ne "just_save")){
647
        print $input->redirect("/cgi-bin/koha/catalogue/detail.pl?biblionumber=$biblionumber&searchid=$searchid");
648
        exit;
649
    }
650
    elsif(($is_a_modif || $redirect eq "view") && $redirect ne "just_save"){
651
        print $input->redirect("/cgi-bin/koha/catalogue/detail.pl?biblionumber=$biblionumber&searchid=$searchid");
652
        exit;
653
    }
654
    elsif ($redirect eq "just_save"){
655
        my $tab = $input->param('current_tab');
656
        print $input->redirect("/cgi-bin/koha/cataloguing/addholding.pl?biblionumber=$biblionumber&holding_id=$holding_id&framework=$frameworkcode&tab=$tab&searchid=$searchid");
657
    }
658
    else {
659
          $template->param(
660
            biblionumber => $biblionumber,
661
            holding_id => $holding_id,
662
            done         =>1,
663
            popup        =>1
664
          );
665
          $template->param(
666
            popup => $mode,
667
            itemtype => $frameworkcode,
668
          );
669
          output_html_with_http_headers $input, $cookie, $template->output;
670
          exit;
671
    }
672
}
673
elsif ( $op eq "delete" ) {
674
675
    my $error = &DelHolding($holding_id);
676
    if ($error) {
677
        warn "ERROR when DELETING HOLDING $holding_id : $error";
678
        print "Content-Type: text/html\n\n<html><body><h1>ERROR when DELETING HOLDING $holding_id : $error</h1></body></html>";
679
        exit;
680
    }
681
682
    print $input->redirect("/cgi-bin/koha/catalogue/detail.pl?biblionumber=$biblionumber&searchid=$searchid");
683
    exit;
684
685
} else {
686
   #----------------------------------------------------------------------------
687
   # If we're in a duplication case, we have to set to "" the holding_id
688
   # as we'll save the holding as a new one.
689
    $template->param(
690
        holding_iddata => $holding_id,
691
        op                => $op,
692
    );
693
    if ( $op eq "duplicate" ) {
694
        $holding_id = "";
695
    }
696
697
    if($changed_framework eq "changed"){
698
        $record = TransformHtmlToMarc( $input, 1 );
699
    }
700
    elsif( $record ne -1 ) {
701
#FIXME: it's kind of silly to go from MARC::Record to MARC::File::XML and then back again just to fix the encoding
702
        eval {
703
            my $uxml = $record->as_xml;
704
            MARC::Record::default_record_format("UNIMARC")
705
            if ( C4::Context->preference("marcflavour") eq "UNIMARC" );
706
            my $urecord = MARC::Record::new_from_xml( $uxml, 'UTF-8' );
707
            $record = $urecord;
708
        };
709
    }
710
    build_tabs( $template, $record, $dbh, $encoding,$input );
711
    $template->param(
712
        holding_id            => $holding_id,
713
        biblionumber             => $biblionumber,
714
        biblionumbertagfield     => $biblionumbertagfield,
715
        biblionumbertagsubfield  => $biblionumbertagsubfield,
716
    );
717
}
718
719
$template->param(
720
    popup => $mode,
721
    frameworkcode => $frameworkcode,
722
    itemtype => $frameworkcode,
723
    borrowernumber => $loggedinuser,
724
    tab => scalar $input->param('tab')
725
);
726
$template->{'VARS'}->{'searchid'} = $searchid;
727
728
output_html_with_http_headers $input, $cookie, $template->output;
(-)a/cataloguing/additem.pl (+11 lines)
Lines 31-36 use C4::Circulation; Link Here
31
use C4::Koha;
31
use C4::Koha;
32
use C4::ClassSource;
32
use C4::ClassSource;
33
use Koha::DateUtils;
33
use Koha::DateUtils;
34
use Koha::Holdings;
34
use Koha::Items;
35
use Koha::Items;
35
use Koha::ItemTypes;
36
use Koha::ItemTypes;
36
use Koha::Libraries;
37
use Koha::Libraries;
Lines 208-213 sub generate_subfield_form { Link Here
208
        
209
        
209
                  #---- "true" authorised value
210
                  #---- "true" authorised value
210
            }
211
            }
212
            elsif ( $subfieldlib->{authorised_value} eq "holdings" ) {
213
                push @authorised_values, "" unless ( $subfieldlib->{mandatory} );
214
                my $holdings = Koha::Holdings->search({biblionumber => $biblionumber}, { order_by => ['holdingbranch'] })->unblessed;
215
                for my $holding ( @$holdings ) {
216
                    push @authorised_values, $holding->{holding_id};
217
                    $authorised_lib{$holding->{holding_id}} = $holding->{holding_id} . ' ' . $holding->{holdingbranch} . ' ' . $holding->{location} . ' ' . $holding->{callnumber};
218
                }
219
		    my $input = new CGI;
220
                $value = $input->param('holding_id') unless ($value);
221
            }
211
            else {
222
            else {
212
                  push @authorised_values, qq{} unless ( $subfieldlib->{mandatory} );
223
                  push @authorised_values, qq{} unless ( $subfieldlib->{mandatory} );
213
                  my $av = GetAuthorisedValues( $subfieldlib->{authorised_value} );
224
                  my $av = GetAuthorisedValues( $subfieldlib->{authorised_value} );
(-)a/cataloguing/value_builder/marc21_field_008_holdings.pl (+120 lines)
Line 0 Link Here
1
#!/usr/bin/perl
2
3
# Copyright 2000-2002 Katipo Communications
4
# Copyright 2017 The University of Helsinki
5
#
6
# This file is part of Koha.
7
#
8
# Koha is free software; you can redistribute it and/or modify it
9
# under the terms of the GNU General Public License as published by
10
# the Free Software Foundation; either version 3 of the License, or
11
# (at your option) any later version.
12
#
13
# Koha is distributed in the hope that it will be useful, but
14
# WITHOUT ANY WARRANTY; without even the implied warranty of
15
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
# GNU General Public License for more details.
17
#
18
# You should have received a copy of the GNU General Public License
19
# along with Koha; if not, see <http://www.gnu.org/licenses>.
20
21
use Modern::Perl;
22
use C4::Auth;
23
use CGI qw ( -utf8 );
24
use C4::Context;
25
26
use C4::Search;
27
use C4::Output;
28
29
use XML::LibXML;
30
use Koha::Util::FrameworkPlugin qw|date_entered|;
31
32
my $builder = sub {
33
    my ( $params ) = @_;
34
35
    my $lang = C4::Context->preference('DefaultLanguageField008' );
36
    $lang = "eng" unless $lang;
37
    $lang = pack("A3", $lang);
38
39
    my $function_name = $params->{id};
40
    my $dateentered = date_entered();
41
    my $res           = "
42
<script type=\"text/javascript\">
43
//<![CDATA[
44
45
function Focus$function_name(event) {
46
    if ( document.getElementById(event.data.id).value ) {
47
	}
48
	else {
49
        document.getElementById(event.data.id).value='$dateentered' + '0u    0   4   uu${lang}0$dateentered';
50
	}
51
    return 1;
52
}
53
54
function Click$function_name(event) {
55
    defaultvalue=document.getElementById(event.data.id).value;
56
    //Retrieve full leader string and pass it to the 008 tag editor
57
    var leader_value = \$(\"input[id^='tag_000']\").val();
58
    var leader_parameter = \"\";
59
    if (leader_value){
60
        //Only add the parameter to the URL if there is a value to add
61
        leader_parameter = \"&leader=\"+leader_value;
62
    }
63
    newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=marc21_field_008_holdings.pl&index=\"+ event.data.id +\"&result=\"+defaultvalue+leader_parameter,\"tag_editor\",'width=1000,height=600,toolbar=false,scrollbars=yes');
64
65
}
66
//]]>
67
</script>
68
";
69
70
    return $res;
71
};
72
73
my $launcher = sub {
74
    my ( $params ) = @_;
75
    my $input = $params->{cgi};
76
    my $index= $input->param('index');
77
    my $result= $input->param('result');
78
79
    my $lang = C4::Context->preference('DefaultLanguageField008' );
80
    $lang = "eng" unless $lang;
81
    $lang = pack("A3", $lang);
82
83
    my ($template, $loggedinuser, $cookie)
84
    = get_template_and_user({template_name => "cataloguing/value_builder/marc21_field_008_holdings.tt",
85
                 query => $input,
86
                 type => "intranet",
87
                 authnotrequired => 0,
88
                 flagsrequired => {editcatalogue => '*'},
89
                 debug => 1,
90
                 });
91
    my $dateentered = date_entered();
92
    $result = $dateentered + '0u    0   0   uu' + $lang + '0' + $dateentered unless $result;
93
    my @f;
94
    for(0,6..8,12..17,20..22,25,26) {
95
        my $len = 1;
96
        if ($_ == 0 || $_ == 26) {
97
            $len = 6;
98
        } elsif ($_ == 8) {
99
            $len = 4;
100
        } elsif ($_ == 17 || $_ == 22) {
101
            $len = 3;
102
        }
103
        warn ($_ . ': ' . $len);
104
        $f[$_]=substr($result,$_,$len);
105
    }
106
    $template->param(index => $index);
107
108
    $f[0]= $dateentered if !$f[0] || $f[0]=~/\s/;
109
    $template->param(f1 => $f[0]);
110
111
    for(6..8,12..17,20..22,25,26) {
112
        $template->param(
113
            "f$_" => $f[$_],
114
            "f$_".($f[$_] eq '|'? 'pipe': $f[$_]) => $f[$_],
115
        );
116
    }
117
    output_html_with_http_headers $input, $cookie, $template->output;
118
};
119
120
return { builder => $builder, launcher => $launcher };
(-)a/cataloguing/value_builder/marc21_leader_holdings.pl (+85 lines)
Line 0 Link Here
1
#!/usr/bin/perl
2
3
# Copyright 2000-2002 Katipo Communications
4
# Copyright 2017 The University of Helsinki
5
#
6
# This file is part of Koha.
7
#
8
# Koha is free software; you can redistribute it and/or modify it
9
# under the terms of the GNU General Public License as published by
10
# the Free Software Foundation; either version 3 of the License, or
11
# (at your option) any later version.
12
#
13
# Koha is distributed in the hope that it will be useful, but
14
# WITHOUT ANY WARRANTY; without even the implied warranty of
15
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
# GNU General Public License for more details.
17
#
18
# You should have received a copy of the GNU General Public License
19
# along with Koha; if not, see <http://www.gnu.org/licenses>.
20
21
use Modern::Perl;
22
use CGI qw ( -utf8 );
23
24
use C4::Auth;
25
use C4::Context;
26
use C4::Output;
27
28
my $builder = sub {
29
    my ( $params ) = @_;
30
    my $function_name = $params->{id};
31
    my $res           = "
32
<script type=\"text/javascript\">
33
//<![CDATA[
34
35
function Focus$function_name(event) {
36
    if(!document.getElementById(event.data.id).value){
37
        document.getElementById(event.data.id).value = '     nu  a22     ui 4500';
38
    }
39
}
40
41
function Click$function_name(event) {
42
    defaultvalue=document.getElementById(event.data.id).value;
43
    newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=marc21_leader_holdings.pl&index=\"+ event.data.id +\"&result=\"+defaultvalue,\"tag_editor\",'width=1000,height=600,toolbar=false,scrollbars=yes');
44
}
45
46
//]]>
47
</script>
48
";
49
50
    return $res;
51
};
52
53
my $launcher = sub {
54
    my ( $params ) = @_;
55
    my $input = $params->{cgi};
56
    my $index   = $input->param('index');
57
    my $result  = $input->param('result');
58
59
    my $dbh = C4::Context->dbh;
60
61
    my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
62
        {   template_name   => "cataloguing/value_builder/marc21_leader_holdings.tt",
63
            query           => $input,
64
            type            => "intranet",
65
            authnotrequired => 0,
66
            flagsrequired   => { editcatalogue => '*' },
67
            debug           => 1,
68
        }
69
    );
70
    $result = "     nu  a22     ui 4500" unless $result;
71
    my $f5    = substr( $result, 5,  1 );
72
    my $f6    = substr( $result, 6,  1 );
73
    my $f17   = substr( $result, 17, 1 );
74
    my $f18   = substr( $result, 18, 1 );
75
    $template->param(
76
        index     => $index,
77
        "f5$f5"   => 1,
78
        "f6$f6"   => 1,
79
        "f17$f17" => 1,
80
        "f18$f18" => 1,
81
    );
82
    output_html_with_http_headers $input, $cookie, $template->output;
83
};
84
85
return { builder => $builder, launcher => $launcher };
(-)a/installer/data/mysql/atomicupdate/bug_20447-add_holdings_tables.sql (+400 lines)
Line 0 Link Here
1
--
2
-- Table structure for table `holdings`
3
--
4
5
CREATE TABLE `holdings` ( -- table that stores summary holdings information
6
    `holding_id` int(11) NOT NULL auto_increment, -- unique identifier assigned to each holdings record
7
    `biblionumber` int(11) NOT NULL default 0, -- foreign key from biblio table used to link this record to the right bib record
8
    `biblioitemnumber` int(11) NOT NULL default 0, -- foreign key from the biblioitems table to link record to additional information
9
    `frameworkcode` varchar(4) NOT NULL default '', -- foreign key from the biblio_framework table to identify which framework was used in cataloging this record
10
    `holdingbranch` varchar(10) default NULL, -- foreign key from the branches table for the library that owns this record (MARC21 852$a)
11
    `location` varchar(80) default NULL, -- authorized value for the shelving location for this record (MARC21 852$b)
12
    `callnumber` varchar(255) default NULL, -- call number (852$h+$i in MARC21)
13
    `suppress` tinyint(1) default NULL, -- Boolean indicating whether the record is suppressed in OPAC
14
    `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- date and time this record was last touched
15
    `datecreated` DATE NOT NULL, -- the date this record was added to Koha
16
    `deleted_at` DATETIME DEFAULT NULL, -- the date this record was deleted
17
    PRIMARY KEY  (`holding_id`),
18
    KEY `hldnoidx` (`holding_id`),
19
    KEY `hldbinoidx` (`biblioitemnumber`),
20
    KEY `hldbibnoidx` (`biblionumber`),
21
    CONSTRAINT `holdings_ibfk_1` FOREIGN KEY (`biblionumber`) REFERENCES `biblio` (`biblionumber`) ON DELETE CASCADE ON UPDATE CASCADE,
22
    CONSTRAINT `holdings_ibfk_2` FOREIGN KEY (`biblioitemnumber`) REFERENCES `biblioitems` (`biblioitemnumber`) ON DELETE CASCADE ON UPDATE CASCADE,
23
    CONSTRAINT `holdings_ibfk_3` FOREIGN KEY (`holdingbranch`) REFERENCES `branches` (`branchcode`) ON UPDATE CASCADE
24
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
25
26
--
27
-- Table structure for table `holdings_metadata`
28
--
29
30
CREATE TABLE holdings_metadata (
31
    `id` INT(11) NOT NULL AUTO_INCREMENT,
32
    `holding_id` INT(11) NOT NULL,
33
    `format` VARCHAR(16) NOT NULL,
34
    `marcflavour` VARCHAR(16) NOT NULL,
35
    `metadata` LONGTEXT NOT NULL,
36
    `deleted_at` DATETIME DEFAULT NULL, -- the date this record was deleted
37
    PRIMARY KEY(id),
38
    UNIQUE KEY `holdings_metadata_uniq_key` (`holding_id`,`format`,`marcflavour`),
39
    KEY `hldnoidx` (`holding_id`),
40
    CONSTRAINT `holdings_metadata_fk_1` FOREIGN KEY (`holding_id`) REFERENCES `holdings` (`holding_id`) ON DELETE CASCADE ON UPDATE CASCADE
41
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
42
43
--
44
-- Add holding_id to items table
45
--
46
47
ALTER TABLE `items` ADD COLUMN `holding_id` int(11) default NULL;
48
ALTER TABLE `items` ADD CONSTRAINT `items_ibfk_5` FOREIGN KEY (`holding_id`) REFERENCES `holdings` (`holding_id`) ON DELETE CASCADE ON UPDATE CASCADE;
49
ALTER TABLE `items` ADD KEY `hldid_idx` (`holding_id`);
50
51
--
52
-- Add holding_id to deleteditems table
53
--
54
55
ALTER TABLE `deleteditems` ADD COLUMN `holding_id` int(11) default NULL;
56
57
--
58
-- Insert a new category to authorised_value_categories table
59
--
60
61
INSERT INTO authorised_value_categories( category_name ) VALUES ('holdings');
62
63
64
--
65
-- Insert 999e to the default framework
66
--
67
68
INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian`, `libopac`, `repeatable`, `mandatory`, `kohafield`, `tab`, `authorised_value`, `authtypecode`, `value_builder`, `isurl`, `hidden`, `frameworkcode`, `seealso`, `link`, `defaultvalue`) VALUES
69
        ('999', 'e', 'Koha holding_id', 'Koha holding_id', 0, 0, 'holdings.holding_id', -1, NULL, NULL, '', NULL, -5, '', '', '', NULL);
70
71
72
--
73
-- Insert 952v to marc_subfield_structure table
74
--
75
76
INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian`, `libopac`, `repeatable`, `mandatory`, `kohafield`, `tab`, `authorised_value`, `authtypecode`, `value_builder`, `isurl`, `hidden`, `frameworkcode`, `seealso`, `link`, `defaultvalue`) VALUES
77
        ('952', 'V', 'Holding record',  'Holding record',  0, 0, 'items.holding_id', 10, 'holdings', '', '', NULL, 0,  '', '', '', NULL);
78
79
-- HOLDINGS RECORD FRAMEWORK
80
81
ALTER TABLE `biblio_framework` ADD COLUMN `frameworktype` ENUM( 'bib', 'hld' ) NOT NULL DEFAULT 'bib';
82
83
INSERT IGNORE INTO `biblio_framework` (`frameworkcode`, `frameworktext`, `frameworktype`) VALUES ('HLD', 'Default holdings framework', 'hld');
84
INSERT IGNORE INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeatable`, `mandatory`, `authorised_value`, `frameworkcode`) VALUES
85
        ('999', 'SYSTEM CONTROL NUMBERS (KOHA)', 'SYSTEM CONTROL NUMBERS (KOHA)', 1, 0, '', 'HLD');
86
87
INSERT IGNORE INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian`, `libopac`, `repeatable`, `mandatory`, `kohafield`, `tab`, `authorised_value`, `authtypecode`, `value_builder`, `isurl`, `hidden`, `frameworkcode`, `seealso`, `link`, `defaultvalue`) VALUES
88
        ('999', 'c', 'Koha biblionumber', 'Koha biblionumber', 0, 0, 'biblio.biblionumber', -1, NULL, NULL, '', NULL, -5, 'HLD', '', '', NULL),
89
        ('999', 'd', 'Koha biblioitemnumber', 'Koha biblioitemnumber', 0, 0, 'biblioitems.biblioitemnumber', -1, NULL, NULL, '', NULL, -5, 'HLD', '', '', NULL),
90
        ('999', 'e', 'Koha holding_id', 'Koha holding_id', 0, 0, 'holdings.holding_id', -1, NULL, NULL, '', NULL, -5, 'HLD', '', '', NULL);
91
92
93
INSERT IGNORE INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian`, `libopac`, `repeatable`, `mandatory`, `kohafield`, `tab`, `authorised_value`, `authtypecode`, `value_builder`, `isurl`, `hidden`, `frameworkcode`, `seealso`, `link`, `defaultvalue`) VALUES
94
        ('942', 'n', 'Suppress in OPAC', 'Suppress in OPAC', 0, 0, 'holdings.suppress', 9, '', '', '', 0, 0, 'HLD', '', '', NULL);
95
96
INSERT IGNORE INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeatable`, `mandatory`, `authorised_value`, `frameworkcode`) VALUES
97
        ('000', 'LEADER', 'LEADER', 0, 1, '', 'HLD'),
98
        ('001', 'CONTROL NUMBER', 'CONTROL NUMBER', 0, 0, '', 'HLD'),
99
        ('003', 'CONTROL NUMBER IDENTIFIER', 'CONTROL NUMBER IDENTIFIER', 0, 1, '', 'HLD'),
100
        ('005', 'DATE AND TIME OF LATEST TRANSACTION', 'DATE AND TIME OF LATEST TRANSACTION', 0, 1, '', 'HLD'),
101
        ('006', 'FIXED-LENGTH DATA ELEMENTS--ADDITIONAL MATERIAL CHARACTERISTICS', 'FIXED-LENGTH DATA ELEMENTS--ADDITIONAL MATERIAL CHARACTERISTICS', 1, 0, '', 'HLD'),
102
        ('007', 'PHYSICAL DESCRIPTION FIXED FIELD--GENERAL INFORMATION', 'PHYSICAL DESCRIPTION FIXED FIELD--GENERAL INFORMATION', 1, 0, '', 'HLD'),
103
        ('008', 'FIXED-LENGTH DATA ELEMENTS--GENERAL INFORMATION', 'FIXED-LENGTH DATA ELEMENTS--GENERAL INFORMATION', 0, 1, '', 'HLD');
104
105
INSERT IGNORE INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeatable`, `mandatory`, `authorised_value`, `frameworkcode`) VALUES
106
        ('850', 'HOLDING INSTITUTION', 'HOLDING INSTITUTION', 1, 0, NULL, 'HLD'),
107
        ('852', 'LOCATION', 'LOCATION', 1, 0, NULL, 'HLD'),
108
        ('853', 'CAPTIONS AND PATTERN--BASIC BIBLIOGRAPHIC UNIT', 'CAPTIONS AND PATTERN--BASIC BIBLIOGRAPHIC UNIT', 1, 0, NULL, 'HLD'),
109
        ('854', 'CAPTIONS AND PATTERN--SUPPLEMENTARY MATERIAL', 'CAPTIONS AND PATTERN--SUPPLEMENTARY MATERIAL', 1, 0, NULL, 'HLD'),
110
        ('855', 'CAPTIONS AND PATTERN--INDEXES', 'CAPTIONS AND PATTERN--INDEXES', 1, 0, NULL, 'HLD'),
111
        ('856', 'ELECTRONIC LOCATION AND ACCESS', 'ELECTRONIC LOCATION AND ACCESS', 1, 0, NULL, 'HLD'),
112
        ('863', 'ENUMERATION AND CHRONOLOGY--BASIC BIBLIOGRAPHIC UNIT', 'ENUMERATION AND CHRONOLOGY--BASIC BIBLIOGRAPHIC UNIT', 1, 0, NULL, 'HLD'),
113
        ('864', 'ENUMERATION AND CHRONOLOGY--SUPPLEMENTARY MATERIAL', 'ENUMERATION AND CHRONOLOGY--SUPPLEMENTARY MATERIAL', 1, 0, NULL, 'HLD'),
114
        ('865', 'ENUMERATION AND CHRONOLOGY--INDEXES', 'ENUMERATION AND CHRONOLOGY--INDEXES', 1, 0, NULL, 'HLD'),
115
        ('866', 'TEXTUAL HOLDINGS--BASIC BIBLIOGRAPHIC UNIT', 'TEXTUAL HOLDINGS--BASIC BIBLIOGRAPHIC UNIT', 1, 0, NULL, 'HLD'),
116
        ('867', 'TEXTUAL HOLDINGS--SUPPLEMENTARY MATERIAL', 'TEXTUAL HOLDINGS--SUPPLEMENTARY MATERIAL', 1, 0, NULL, 'HLD'),
117
        ('868', 'TEXTUAL HOLDINGS--INDEXES', 'TEXTUAL HOLDINGS--INDEXES', 1, 0, NULL, 'HLD'),
118
        ('876', 'ITEM INFORMATION--BASIC BIBLIOGRAPHIC UNIT', 'ITEM INFORMATION--BASIC BIBLIOGRAPHIC UNIT', 1, 0, NULL, 'HLD'),
119
        ('877', 'ITEM INFORMATION--SUPPLEMENTARY MATERIAL', 'ITEM INFORMATION--SUPPLEMENTARY MATERIAL', 1, 0, NULL, 'HLD'),
120
        ('878', 'ITEM INFORMATION--INDEXES', 'ITEM INFORMATION--INDEXES', 1, 0, NULL, 'HLD');
121
122
INSERT IGNORE INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian`, `libopac`, `repeatable`, `mandatory`, `kohafield`, `tab`, `authorised_value`, `authtypecode`, `value_builder`, `isurl`, `hidden`, `frameworkcode`, `seealso`, `link`, `defaultvalue`) VALUES
123
        ('000', '@', 'fixed length control field', 'fixed length control field', 0, 1, '', 0, '', '', 'marc21_leader_holdings.pl', 0, 0, 'HLD', '', '', NULL),
124
        ('001', '@', 'control field', 'control field', 0, 0, '', 0, '', '', '', 0, 0, 'HLD', '', '', NULL),
125
        ('003', '@', 'control field', 'control field', 0, 1, '', 0, '', '', 'marc21_orgcode.pl', 0, 0, 'HLD', '', '', NULL),
126
        ('005', '@', 'control field', 'control field', 0, 1, '', 0, '', '', 'marc21_field_005.pl', 0, 0, 'HLD', '', '', NULL),
127
        ('006', '@', 'fixed length control field', 'fixed length control field', 0, 0, '', 0, '', '', 'marc21_field_006.pl', 0, -1, 'HLD', '', '', NULL),
128
        ('007', '@', 'fixed length control field', 'fixed length control field', 0, 0, '', 0, '', '', 'marc21_field_007.pl', 0, 0, 'HLD', '', '', NULL),
129
        ('008', '@', 'fixed length control field', 'fixed length control field', 0, 1, '', 0, '', '', 'marc21_field_008_holdings.pl', 0, 0, 'HLD', '', '', NULL),
130
        ('850', '8', 'Field link and sequence number', 'Field link and sequence number', 1, 0, NULL, 8, NULL, NULL, '', NULL, 4, 'HLD', '', '', NULL),
131
        ('850', 'a', 'Holding institution', 'Holding institution', 1, 0, NULL, 8, NULL, NULL, '', NULL, 4, 'HLD', '', '', NULL),
132
        ('850', 'b', 'Holdings (NR) (MU VM SE) [OBSOLETE]', 'Holdings (NR) (MU VM SE) [OBSOLETE]', 0, 0, NULL, 8, NULL, NULL, '', NULL, 4, 'HLD', '', '', NULL),
133
        ('850', 'd', 'Inclusive dates (NR) (MU VM SE) [OBSOLETE]', 'Inclusive dates (NR) (MU VM SE) [OBSOLETE]', 0, 0, NULL, 8, NULL, NULL, '', NULL, 4, 'HLD', '', '', NULL),
134
        ('850', 'e', 'Retention statement (NR) (CF MU VM SE) [OBSOLETE]', 'Retention statement (NR) (CF MU VM SE) [OBSOLETE]', 0, 0, NULL, 8, NULL, NULL, '', NULL, 4, 'HLD', '', '', NULL),
135
        ('852', '2', 'Source of classification or shelving scheme', 'Source of classification or shelving scheme', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
136
        ('852', '3', 'Materials specified', 'Materials specified', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
137
        ('852', '6', 'Linkage', 'Linkage', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
138
        ('852', '8', 'Sequence number', 'Sequence number', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
139
        ('852', 'a', 'Location', 'Location', 0, 0, 'holdings.holdingbranch', 8, 'branches', '', '', NULL, 4, 'HLD', '', '', NULL),
140
        ('852', 'b', 'Sublocation or collection', 'Sublocation or collection', 1, 0, 'holdings.location', 8, 'LOC', '', '', NULL, 4, 'HLD', '', '', NULL),
141
        ('852', 'c', 'Shelving location', 'Shelving location', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
142
        ('852', 'd', 'Former shelving location', 'Former shelving location', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
143
        ('852', 'e', 'Address', 'Address', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
144
        ('852', 'f', 'Coded location qualifier', 'Coded location qualifier', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
145
        ('852', 'g', 'Non-coded location qualifier', 'Non-coded location qualifier', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
146
        ('852', 'h', 'Classification part', 'Classification part', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
147
        ('852', 'i', 'Item part', 'Item part', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
148
        ('852', 'j', 'Shelving control number', 'Shelving control number', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
149
        ('852', 'k', 'Call number prefix', 'Call number prefix', 1, 0, 'holdings.callnumber', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
150
        ('852', 'l', 'Shelving form of title', 'Shelving form of title', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
151
        ('852', 'm', 'Call number suffix', 'Call number suffix', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
152
        ('852', 'n', 'Country code', 'Country code', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
153
        ('852', 'p', 'Piece designation', 'Piece designation', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
154
        ('852', 'q', 'Piece physical condition', 'Piece physical condition', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
155
        ('852', 's', 'Copyright article-fee code', 'Copyright article-fee code', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
156
        ('852', 't', 'Copy number', 'Copy number', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
157
        ('852', 'u', 'Uniform Resource Identifier', 'Uniform Resource Identifier', 1, 0, '', 8, '', '', '', 1, 4, 'HLD', '', '', NULL),
158
        ('852', 'x', 'Nonpublic note', 'Nonpublic note', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
159
        ('852', 'z', 'Public note', 'Public note', 1, 0, 'holdings.public_note', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
160
        ('853', '3', 'Materials specified', 'Materials specified', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
161
        ('853', '6', 'Linkage', 'Linkage', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
162
        ('853', '8', 'Field link and sequence number', 'Field link and sequence number', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
163
        ('853', 'a', 'First level of enumeration', 'First level of enumeration', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
164
        ('853', 'b', 'Second level of enumeration', 'Second level of enumeration', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
165
        ('853', 'c', 'Third level of enumeration', 'Third level of enumeration', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
166
        ('853', 'd', 'Fourth level of enumeration', 'Fourth level of enumeration', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
167
        ('853', 'e', 'Fifth level of enumeration', 'Fifth level of enumeration', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
168
        ('853', 'f', 'Sixth level of enumeration', 'Sixth level of enumeration', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
169
        ('853', 'g', 'Alternative numbering scheme, first level of enumeration', 'Alternative numbering scheme, first level of enumeration', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
170
        ('853', 'h', 'Alternative numbering scheme, second level of enumeration', 'Alternative numbering scheme, second level of enumeration', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
171
        ('853', 'i', 'First level of chronology', 'First level of chronology', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
172
        ('853', 'j', 'Second level of chronology', 'Second level of chronology', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
173
        ('853', 'k', 'Third level of chronology', 'Third level of chronology', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
174
        ('853', 'l', 'Fourth level of chronology', 'Fourth level of chronology', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
175
        ('853', 'm', 'Alternative numbering scheme, chronology', 'Alternative numbering scheme, chronology', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
176
        ('853', 'n', 'Pattern note', 'Pattern note', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
177
        ('853', 'p', 'Number of pieces per issuance', 'Number of pieces per issuance', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
178
        ('853', 't', 'Copy', 'Copy', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
179
        ('853', 'u', 'Bibliographic units per next higher level', 'Bibliographic units per next higher level', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
180
        ('853', 'v', 'Numbering continuity', 'Numbering continuity', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
181
        ('853', 'w', 'Frequency', 'Frequency', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
182
        ('853', 'x', 'Calendar change', 'Calendar change', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
183
        ('853', 'y', 'Regularity pattern', 'Regularity pattern', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
184
        ('853', 'z', 'Numbering scheme', 'Numbering scheme', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
185
        ('854', '3', 'Materials specified', 'Materials specified', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
186
        ('854', '6', 'Linkage', 'Linkage', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
187
        ('854', '8', 'Field link and sequence number', 'Field link and sequence number', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
188
        ('854', 'a', 'First level of enumeration', 'First level of enumeration', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
189
        ('854', 'b', 'Second level of enumeration', 'Second level of enumeration', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
190
        ('854', 'c', 'Third level of enumeration', 'Third level of enumeration', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
191
        ('854', 'd', 'Fourth level of enumeration', 'Fourth level of enumeration', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
192
        ('854', 'e', 'Fifth level of enumeration', 'Fifth level of enumeration', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
193
        ('854', 'f', 'Sixth level of enumeration', 'Sixth level of enumeration', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
194
        ('854', 'g', 'Alternative numbering scheme, first level of enumeration', 'Alternative numbering scheme, first level of enumeration', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
195
        ('854', 'h', 'Alternative numbering scheme, second level of enumeration', 'Alternative numbering scheme, second level of enumeration', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
196
        ('854', 'i', 'First level of chronology', 'First level of chronology', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
197
        ('854', 'j', 'Second level of chronology', 'Second level of chronology', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
198
        ('854', 'k', 'Third level of chronology', 'Third level of chronology', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
199
        ('854', 'l', 'Fourth level of chronology', 'Fourth level of chronology', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
200
        ('854', 'm', 'Alternative numbering scheme, chronology', 'Alternative numbering scheme, chronology', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
201
        ('854', 'n', 'Pattern note', 'Pattern note', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
202
        ('854', 'p', 'Number of pieces per issuance', 'Number of pieces per issuance', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
203
        ('854', 't', 'Copy', 'Copy', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
204
        ('854', 'u', 'Bibliographic units per next higher level', 'Bibliographic units per next higher level', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
205
        ('854', 'v', 'Numbering continuity', 'Numbering continuity', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
206
        ('854', 'w', 'Frequency', 'Frequency', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
207
        ('854', 'x', 'Calendar change', 'Calendar change', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
208
        ('854', 'y', 'Regularity pattern', 'Regularity pattern', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
209
        ('854', 'z', 'Numbering scheme', 'Numbering scheme', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
210
        ('855', '3', 'Materials specified', 'Materials specified', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
211
        ('855', '6', 'Linkage', 'Linkage', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
212
        ('855', '8', 'Field link and sequence number', 'Field link and sequence number', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
213
        ('855', 'a', 'First level of enumeration', 'First level of enumeration', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
214
        ('855', 'b', 'Second level of enumeration', 'Second level of enumeration', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
215
        ('855', 'c', 'Third level of enumeration', 'Third level of enumeration', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
216
        ('855', 'd', 'Fourth level of enumeration', 'Fourth level of enumeration', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
217
        ('855', 'e', 'Fifth level of enumeration', 'Fifth level of enumeration', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
218
        ('855', 'f', 'Sixth level of enumeration', 'Sixth level of enumeration', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
219
        ('855', 'g', 'Alternative numbering scheme, first level of enumeration', 'Alternative numbering scheme, first level of enumeration', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
220
        ('855', 'h', 'Alternative numbering scheme, second level of enumeration', 'Alternative numbering scheme, second level of enumeration', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
221
        ('855', 'i', 'First level of chronology', 'First level of chronology', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
222
        ('855', 'j', 'Second level of chronology', 'Second level of chronology', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
223
        ('855', 'k', 'Third level of chronology', 'Third level of chronology', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
224
        ('855', 'l', 'Fourth level of chronology', 'Fourth level of chronology', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
225
        ('855', 'm', 'Alternative numbering scheme, chronology', 'Alternative numbering scheme, chronology', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
226
        ('855', 'n', 'Pattern note', 'Pattern note', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
227
        ('855', 'p', 'Number of pieces per issuance', 'Number of pieces per issuance', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
228
        ('855', 't', 'Copy', 'Copy', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
229
        ('855', 'u', 'Bibliographic units per next higher level', 'Bibliographic units per next higher level', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
230
        ('855', 'v', 'Numbering continuity', 'Numbering continuity', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
231
        ('855', 'w', 'Frequency', 'Frequency', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
232
        ('855', 'x', 'Calendar change', 'Calendar change', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
233
        ('855', 'y', 'Regularity pattern', 'Regularity pattern', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
234
        ('855', 'z', 'Numbering scheme', 'Numbering scheme', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
235
        ('856', '2', 'Access method', 'Access method', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
236
        ('856', '3', 'Materials specified', 'Materials specified', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
237
        ('856', '6', 'Linkage', 'Linkage', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
238
        ('856', '8', 'Field link and sequence number', 'Field link and sequence number', 1, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
239
        ('856', 'a', 'Host name', 'Host name', 1, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
240
        ('856', 'b', 'Access number', 'Access number', 1, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
241
        ('856', 'c', 'Compression information', 'Compression information', 1, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
242
        ('856', 'd', 'Path', 'Path', 1, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
243
        ('856', 'f', 'Electronic name', 'Electronic name', 1, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
244
        ('856', 'h', 'Processor of request', 'Processor of request', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
245
        ('856', 'i', 'Instruction', 'Instruction', 1, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
246
        ('856', 'j', 'Bits per second', 'Bits per second', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
247
        ('856', 'k', 'Password', 'Password', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
248
        ('856', 'l', 'Logon', 'Logon', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
249
        ('856', 'm', 'Contact for access assistance', 'Contact for access assistance', 1, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
250
        ('856', 'n', 'Name of location of host', 'Name of location of host', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
251
        ('856', 'o', 'Operating system', 'Operating system', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
252
        ('856', 'p', 'Port', 'Port', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
253
        ('856', 'q', 'Electronic format type', 'Electronic format type', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
254
        ('856', 'r', 'Settings', 'Settings', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
255
        ('856', 's', 'File size', 'File size', 1, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
256
        ('856', 't', 'Terminal emulation', 'Terminal emulation', 1, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
257
        ('856', 'u', 'Uniform Resource Identifier', 'Uniform Resource Identifier', 1, 0, 'biblioitems.url', 8, '', '', '', 1, 4, 'HLD', '', '', NULL),
258
        ('856', 'v', 'Hours access method available', 'Hours access method available', 1, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
259
        ('856', 'w', 'Record control number', 'Record control number', 1, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
260
        ('856', 'x', 'Nonpublic note', 'Nonpublic note', 1, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
261
        ('856', 'y', 'Link text', 'Link text', 1, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
262
        ('856', 'z', 'Public note', 'Public note', 1, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
263
        ('863', '6', 'Linkage', 'Linkage', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
264
        ('863', '8', 'Field link and sequence number', 'Field link and sequence number', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
265
        ('863', 'a', 'First level of enumeration', 'First level of enumeration', 0, 0, 'holdings.summary', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
266
        ('863', 'b', 'Second level of enumeration', 'Second level of enumeration', 0, 0, 'holdings.summary', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
267
        ('863', 'c', 'Third level of enumeration', 'Third level of enumeration', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
268
        ('863', 'd', 'Fourth level of enumeration', 'Fourth level of enumeration', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
269
        ('863', 'e', 'Fifth level of enumeration', 'Fifth level of enumeration', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
270
        ('863', 'f', 'Sixth level of enumeration', 'Sixth level of enumeration', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
271
        ('863', 'g', 'Alternative numbering scheme, first level of enumeration', 'Alternative numbering scheme, first level of enumeration', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
272
        ('863', 'h', 'Alternative numbering scheme, second level of enumeration', 'Alternative numbering scheme, second level of enumeration', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
273
        ('863', 'i', 'First level of chronology', 'First level of chronology', 0, 0, 'holdings.summary', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
274
        ('863', 'j', 'Second level of chronology', 'Second level of chronology', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
275
        ('863', 'k', 'Third level of chronology', 'Third level of chronology', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
276
        ('863', 'l', 'Fourth level of chronology', 'Fourth level of chronology', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
277
        ('863', 'm', 'Alternative numbering scheme, chronology', 'Alternative numbering scheme, chronology', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
278
        ('863', 'n', 'Converted Gregorian year', 'Converted Gregorian year', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
279
        ('863', 'o', 'Type of unit', 'Type of unit', 1, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
280
        ('863', 'p', 'Piece designation', 'Piece designation', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
281
        ('863', 'q', 'Piece physical condition', 'Piece physical condition', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
282
        ('863', 's', 'Copyright article-fee code', 'Copyright article-fee code', 1, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
283
        ('863', 't', 'Copy number', 'Copy number', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
284
        ('863', 'v', 'Issuing date', 'Issuing date', 1, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
285
        ('863', 'w', 'Break indicator', 'Break indicator', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
286
        ('863', 'x', 'Nonpublic note', 'Nonpublic note', 1, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
287
        ('863', 'z', 'Public note', 'Public note', 1, 0, 'holdings.summary', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
288
        ('864', '6', 'Linkage', 'Linkage', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
289
        ('864', '8', 'Field link and sequence number', 'Field link and sequence number', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
290
        ('864', 'a', 'First level of enumeration', 'First level of enumeration', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
291
        ('864', 'b', 'Second level of enumeration', 'Second level of enumeration', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
292
        ('864', 'c', 'Third level of enumeration', 'Third level of enumeration', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
293
        ('864', 'd', 'Fourth level of enumeration', 'Fourth level of enumeration', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
294
        ('864', 'e', 'Fifth level of enumeration', 'Fifth level of enumeration', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
295
        ('864', 'f', 'Sixth level of enumeration', 'Sixth level of enumeration', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
296
        ('864', 'g', 'Alternative numbering scheme, first level of enumeration', 'Alternative numbering scheme, first level of enumeration', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
297
        ('864', 'h', 'Alternative numbering scheme, second level of enumeration', 'Alternative numbering scheme, second level of enumeration', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
298
        ('864', 'i', 'First level of chronology', 'First level of chronology', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
299
        ('864', 'j', 'Second level of chronology', 'Second level of chronology', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
300
        ('864', 'k', 'Third level of chronology', 'Third level of chronology', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
301
        ('864', 'l', 'Fourth level of chronology', 'Fourth level of chronology', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
302
        ('864', 'm', 'Alternative numbering scheme, chronology', 'Alternative numbering scheme, chronology', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
303
        ('864', 'n', 'Converted Gregorian year', 'Converted Gregorian year', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
304
        ('864', 'o', 'Type of unit', 'Type of unit', 1, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
305
        ('864', 'p', 'Piece designation', 'Piece designation', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
306
        ('864', 'q', 'Piece physical condition', 'Piece physical condition', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
307
        ('864', 's', 'Copyright article-fee code', 'Copyright article-fee code', 1, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
308
        ('864', 't', 'Copy number', 'Copy number', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
309
        ('864', 'v', 'Issuing date', 'Issuing date', 1, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
310
        ('864', 'w', 'Break indicator', 'Break indicator', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
311
        ('864', 'x', 'Nonpublic note', 'Nonpublic note', 1, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
312
        ('864', 'z', 'Public note', 'Public note', 1, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
313
        ('865', '6', 'Linkage', 'Linkage', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
314
        ('865', '8', 'Field link and sequence number', 'Field link and sequence number', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
315
        ('865', 'a', 'First level of enumeration', 'First level of enumeration', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
316
        ('865', 'b', 'Second level of enumeration', 'Second level of enumeration', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
317
        ('865', 'c', 'Third level of enumeration', 'Third level of enumeration', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
318
        ('865', 'd', 'Fourth level of enumeration', 'Fourth level of enumeration', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
319
        ('865', 'e', 'Fifth level of enumeration', 'Fifth level of enumeration', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
320
        ('865', 'f', 'Sixth level of enumeration', 'Sixth level of enumeration', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
321
        ('865', 'g', 'Alternative numbering scheme, first level of enumeration', 'Alternative numbering scheme, first level of enumeration', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
322
        ('865', 'h', 'Alternative numbering scheme, second level of enumeration', 'Alternative numbering scheme, second level of enumeration', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
323
        ('865', 'i', 'First level of chronology', 'First level of chronology', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
324
        ('865', 'j', 'Second level of chronology', 'Second level of chronology', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
325
        ('865', 'k', 'Third level of chronology', 'Third level of chronology', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
326
        ('865', 'l', 'Fourth level of chronology', 'Fourth level of chronology', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
327
        ('865', 'm', 'Alternative numbering scheme, chronology', 'Alternative numbering scheme, chronology', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
328
        ('865', 'n', 'Converted Gregorian year', 'Converted Gregorian year', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
329
        ('865', 'o', 'Type of unit', 'Type of unit', 1, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
330
        ('865', 'p', 'Piece designation', 'Piece designation', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
331
        ('865', 'q', 'Piece physical condition', 'Piece physical condition', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
332
        ('865', 's', 'Copyright article-fee code', 'Copyright article-fee code', 1, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
333
        ('865', 't', 'Copy number', 'Copy number', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
334
        ('865', 'v', 'Issuing date', 'Issuing date', 1, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
335
        ('865', 'w', 'Break indicator', 'Break indicator', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
336
        ('865', 'x', 'Nonpublic note', 'Nonpublic note', 1, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
337
        ('865', 'z', 'Public note', 'Public note', 1, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
338
        ('866', '6', 'Linkage', 'Linkage', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
339
        ('866', '8', 'Field link and sequence number', 'Field link and sequence number', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
340
        ('866', 'a', 'Textual string', 'Textual string', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
341
        ('866', 'x', 'Nonpublic note', 'Nonpublic note', 1, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
342
        ('866', 'z', 'Public note', 'Public note', 1, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
343
        ('867', '6', 'Linkage', 'Linkage', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
344
        ('867', '8', 'Field link and sequence number', 'Field link and sequence number', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
345
        ('867', 'a', 'Textual string', 'Textual string', 0, 0, 'holdings.supplements', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
346
        ('867', 'x', 'Nonpublic note', 'Nonpublic note', 1, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
347
        ('867', 'z', 'Public note', 'Public note', 1, 0, 'holdings.supplements', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
348
        ('868', '6', 'Linkage', 'Linkage', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
349
        ('868', '8', 'Field link and sequence number', 'Field link and sequence number', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
350
        ('868', 'a', 'Textual string', 'Textual string', 0, 0, 'holdings.indexes', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
351
        ('868', 'x', 'Nonpublic note', 'Nonpublic note', 1, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
352
        ('868', 'z', 'Public note', 'Public note', 1, 0, 'holdings.indexes', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
353
        ('876', '3', 'Materials specified', 'Materials specified', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
354
        ('876', '6', 'Linkage', 'Linkage', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
355
        ('876', '8', 'Sequence number', 'Sequence number', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
356
        ('876', 'a', 'Internal item number', 'Internal item number', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
357
        ('876', 'b', 'Invalid or canceled internal item number', 'Invalid or canceled internal item number', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
358
        ('876', 'c', 'Cost', 'Cost', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
359
        ('876', 'd', 'Date acquired', 'Date acquired', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
360
        ('876', 'e', 'Source of acquisition', 'Source of acquisition', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
361
        ('876', 'h', 'Use restrictions', 'Use restrictions', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
362
        ('876', 'j', 'Item status', 'Item status', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
363
        ('876', 'l', 'Temporary location', 'Temporary location', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
364
        ('876', 'p', 'Piece designation', 'Piece designation', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
365
        ('876', 'r', 'Invalid or canceled piece designation', 'Invalid or canceled piece designation', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
366
        ('876', 't', 'Copy number', 'Copy number', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
367
        ('876', 'x', 'Nonpublic note', 'Nonpublic note', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
368
        ('876', 'z', 'Public note', 'Public note', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
369
        ('877', '3', 'Materials specified', 'Materials specified', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
370
        ('877', '6', 'Linkage', 'Linkage', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
371
        ('877', '8', 'Sequence number', 'Sequence number', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
372
        ('877', 'a', 'Internal item number', 'Internal item number', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
373
        ('877', 'b', 'Invalid or canceled internal item number', 'Invalid or canceled internal item number', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
374
        ('877', 'c', 'Cost', 'Cost', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
375
        ('877', 'd', 'Date acquired', 'Date acquired', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
376
        ('877', 'e', 'Source of acquisition', 'Source of acquisition', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
377
        ('877', 'h', 'Use restrictions', 'Use restrictions', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
378
        ('877', 'j', 'Item status', 'Item status', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
379
        ('877', 'l', 'Temporary location', 'Temporary location', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
380
        ('877', 'p', 'Piece designation', 'Piece designation', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
381
        ('877', 'r', 'Invalid or canceled piece designation', 'Invalid or canceled piece designation', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
382
        ('877', 't', 'Copy number', 'Copy number', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
383
        ('877', 'x', 'Nonpublic note', 'Nonpublic note', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
384
        ('877', 'z', 'Public note', 'Public note', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
385
        ('878', '3', 'Materials specified', 'Materials specified', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
386
        ('878', '6', 'Linkage', 'Linkage', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
387
        ('878', '8', 'Sequence number', 'Sequence number', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
388
        ('878', 'a', 'Internal item number', 'Internal item number', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
389
        ('878', 'b', 'Invalid or canceled internal item number', 'Invalid or canceled internal item number', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
390
        ('878', 'c', 'Cost', 'Cost', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
391
        ('878', 'd', 'Date acquired', 'Date acquired', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
392
        ('878', 'e', 'Source of acquisition', 'Source of acquisition', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
393
        ('878', 'h', 'Use restrictions', 'Use restrictions', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
394
        ('878', 'j', 'Item status', 'Item status', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
395
        ('878', 'l', 'Temporary location', 'Temporary location', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
396
        ('878', 'p', 'Piece designation', 'Piece designation', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
397
        ('878', 'r', 'Invalid or canceled piece designation', 'Invalid or canceled piece designation', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
398
        ('878', 't', 'Copy number', 'Copy number', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
399
        ('878', 'x', 'Nonpublic note', 'Nonpublic note', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
400
        ('878', 'z', 'Public note', 'Public note', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL);
(-)a/installer/data/mysql/de-DE/marcflavour/marc21/optional/marc21_sample_fastadd_framework.sql (-1 / +1 lines)
Lines 1-4 Link Here
1
INSERT IGNORE INTO biblio_framework VALUES
1
INSERT IGNORE INTO biblio_framework (frameworkcode, frameworktext) VALUES
2
		('FA', 'Schnellaufnahme');
2
		('FA', 'Schnellaufnahme');
3
3
4
INSERT IGNORE INTO marc_tag_structure (tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, frameworkcode)
4
INSERT IGNORE INTO marc_tag_structure (tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, frameworkcode)
(-)a/installer/data/mysql/de-DE/marcflavour/marc21/optional/marc21_simple_bib_frameworks.sql (-9 / +9 lines)
Lines 6-12 Link Here
6
-- *******************************************************************
6
-- *******************************************************************
7
-- SIMPLE BOOKS KOHA RECORD AND HOLDINGS MANAGEMENT FIELDS/SUBFIELDS.
7
-- SIMPLE BOOKS KOHA RECORD AND HOLDINGS MANAGEMENT FIELDS/SUBFIELDS.
8
-- *******************************************************************
8
-- *******************************************************************
9
INSERT IGNORE INTO biblio_framework VALUES
9
INSERT IGNORE INTO biblio_framework (frameworkcode, frameworktext) VALUES
10
		( 'BKS', 'Monographien, Broschüren, Arbeitsbücher' );
10
		( 'BKS', 'Monographien, Broschüren, Arbeitsbücher' );
11
11
12
INSERT IGNORE INTO marc_tag_structure (
12
INSERT IGNORE INTO marc_tag_structure (
Lines 29-35 INSERT IGNORE INTO marc_subfield_structure ( Link Here
29
-- ****************************************************************************
29
-- ****************************************************************************
30
-- SIMPLE COMPUTER FILES KOHA RECORD AND HOLDINGS MANAGEMENT FIELDS/SUBFIELDS.
30
-- SIMPLE COMPUTER FILES KOHA RECORD AND HOLDINGS MANAGEMENT FIELDS/SUBFIELDS.
31
-- ****************************************************************************
31
-- ****************************************************************************
32
INSERT IGNORE INTO biblio_framework VALUES
32
INSERT IGNORE INTO biblio_framework (frameworkcode, frameworktext) VALUES
33
		( 'CF', 'CD-ROMs, DVD-ROMs, Online-Ressourcen' );
33
		( 'CF', 'CD-ROMs, DVD-ROMs, Online-Ressourcen' );
34
INSERT IGNORE INTO marc_tag_structure (
34
INSERT IGNORE INTO marc_tag_structure (
35
		tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, frameworkcode)
35
		tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, frameworkcode)
Lines 52-58 INSERT IGNORE INTO marc_subfield_structure ( Link Here
52
-- *****************************************************************************
52
-- *****************************************************************************
53
-- SIMPLE SOUND RECORDINGS KOHA RECORD AND HOLDINGS MANAGEMENT FIELDS/SUBFIELDS.
53
-- SIMPLE SOUND RECORDINGS KOHA RECORD AND HOLDINGS MANAGEMENT FIELDS/SUBFIELDS.
54
-- *****************************************************************************
54
-- *****************************************************************************
55
INSERT IGNORE INTO biblio_framework VALUES
55
INSERT IGNORE INTO biblio_framework (frameworkcode, frameworktext) VALUES
56
		( 'SR', 'Audiokassetten, CDs' );
56
		( 'SR', 'Audiokassetten, CDs' );
57
57
58
INSERT IGNORE INTO marc_tag_structure (
58
INSERT IGNORE INTO marc_tag_structure (
Lines 76-82 INSERT IGNORE INTO marc_subfield_structure ( Link Here
76
-- ****************************************************************************
76
-- ****************************************************************************
77
-- SIMPLE VIDEORECORDINGS KOHA RECORD AND HOLDINGS MANAGEMENT FIELDS/SUBFIELDS.
77
-- SIMPLE VIDEORECORDINGS KOHA RECORD AND HOLDINGS MANAGEMENT FIELDS/SUBFIELDS.
78
-- ****************************************************************************
78
-- ****************************************************************************
79
INSERT IGNORE INTO biblio_framework VALUES
79
INSERT IGNORE INTO biblio_framework (frameworkcode, frameworktext) VALUES
80
		( 'VR', 'DVDs, Videokassetten' );
80
		( 'VR', 'DVDs, Videokassetten' );
81
81
82
INSERT IGNORE INTO marc_tag_structure (
82
INSERT IGNORE INTO marc_tag_structure (
Lines 100-106 INSERT IGNORE INTO marc_subfield_structure ( Link Here
100
-- **************************************************************************
100
-- **************************************************************************
101
-- SIMPLE 3D ARTIFACTS KOHA RECORD AND HOLDINGS MANAGEMENT FIELDS/SUBFIELDS.
101
-- SIMPLE 3D ARTIFACTS KOHA RECORD AND HOLDINGS MANAGEMENT FIELDS/SUBFIELDS.
102
-- **************************************************************************
102
-- **************************************************************************
103
INSERT IGNORE INTO biblio_framework VALUES
103
INSERT IGNORE INTO biblio_framework (frameworkcode, frameworktext) VALUES
104
		( 'AR', 'Artefakte, Gegenstände' );
104
		( 'AR', 'Artefakte, Gegenstände' );
105
105
106
INSERT IGNORE INTO marc_tag_structure (
106
INSERT IGNORE INTO marc_tag_structure (
Lines 124-130 INSERT IGNORE INTO marc_subfield_structure ( Link Here
124
-- ******************************************************************
124
-- ******************************************************************
125
-- SIMPLE KITS KOHA RECORD AND HOLDINGS MANAGEMENT FIELDS/SUBFIELDS.
125
-- SIMPLE KITS KOHA RECORD AND HOLDINGS MANAGEMENT FIELDS/SUBFIELDS.
126
-- ******************************************************************
126
-- ******************************************************************
127
INSERT IGNORE INTO biblio_framework VALUES
127
INSERT IGNORE INTO biblio_framework (frameworkcode, frameworktext) VALUES
128
		( 'KT', 'Medienkombinationen' );
128
		( 'KT', 'Medienkombinationen' );
129
129
130
INSERT IGNORE INTO marc_tag_structure (
130
INSERT IGNORE INTO marc_tag_structure (
Lines 148-154 INSERT IGNORE INTO marc_subfield_structure ( Link Here
148
-- **********************************************************************************
148
-- **********************************************************************************
149
-- SIMPLE INTEGRATING RESOURCES KOHA RECORD AND HOLDINGS MANAGEMENT FIELDS/SUBFIELDS.
149
-- SIMPLE INTEGRATING RESOURCES KOHA RECORD AND HOLDINGS MANAGEMENT FIELDS/SUBFIELDS.
150
-- **********************************************************************************
150
-- **********************************************************************************
151
INSERT IGNORE INTO biblio_framework VALUES
151
INSERT IGNORE INTO biblio_framework (frameworkcode, frameworktext) VALUES
152
		( 'IR', 'Loseblattsammlungen' );
152
		( 'IR', 'Loseblattsammlungen' );
153
153
154
INSERT IGNORE INTO marc_tag_structure (
154
INSERT IGNORE INTO marc_tag_structure (
Lines 172-178 INSERT IGNORE INTO marc_subfield_structure ( Link Here
172
-- *********************************************************************
172
-- *********************************************************************
173
-- SIMPLE SERIALS KOHA RECORD AND HOLDINGS MANAGEMENT FIELDS/SUBFIELDS.
173
-- SIMPLE SERIALS KOHA RECORD AND HOLDINGS MANAGEMENT FIELDS/SUBFIELDS.
174
-- *********************************************************************
174
-- *********************************************************************
175
INSERT IGNORE INTO biblio_framework VALUES
175
INSERT IGNORE INTO biblio_framework (frameworkcode, frameworktext) VALUES
176
		( 'SER', 'Zeitschriften' );
176
		( 'SER', 'Zeitschriften' );
177
177
178
INSERT IGNORE INTO marc_tag_structure (
178
INSERT IGNORE INTO marc_tag_structure (
Lines 494-500 UPDATE marc_subfield_structure SET hidden = 9 WHERE tagfield = '942' AND tagsubf Link Here
494
UPDATE marc_subfield_structure SET hidden = 0 WHERE tagfield = '952' AND tagsubfield = '1' AND frameworkcode IN ('AR','BKS','CF','IR','KT','SER','SR','VR');
494
UPDATE marc_subfield_structure SET hidden = 0 WHERE tagfield = '952' AND tagsubfield = '1' AND frameworkcode IN ('AR','BKS','CF','IR','KT','SER','SR','VR');
495
495
496
-- Create the ACQ framework based on the default framework, fields 952 only
496
-- Create the ACQ framework based on the default framework, fields 952 only
497
INSERT IGNORE INTO biblio_framework VALUES( 'ACQ', 'Acquisition framework' );
497
INSERT IGNORE INTO biblio_framework (frameworkcode, frameworktext) VALUES( 'ACQ', 'Acquisition framework' );
498
INSERT INTO marc_tag_structure(tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, frameworkcode)
498
INSERT INTO marc_tag_structure(tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, frameworkcode)
499
SELECT tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, 'ACQ' FROM marc_tag_structure WHERE tagfield='952' AND frameworkcode='';
499
SELECT tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, 'ACQ' FROM marc_tag_structure WHERE tagfield='952' AND frameworkcode='';
500
500
(-)a/installer/data/mysql/en/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql (-2 / +325 lines)
Lines 34-40 INSERT IGNORE INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblib Link Here
34
		('999', 'a', 'Item type [OBSOLETE]', 'Item type [OBSOLETE]', 0, 0, NULL, -1, NULL, NULL, '', NULL, -5, '', '', '', NULL),
34
		('999', 'a', 'Item type [OBSOLETE]', 'Item type [OBSOLETE]', 0, 0, NULL, -1, NULL, NULL, '', NULL, -5, '', '', '', NULL),
35
		('999', 'b', 'Koha Dewey Subclass [OBSOLETE]', 'Koha Dewey Subclass [OBSOLETE]', 0, 0, NULL, 0, NULL, NULL, '', NULL, -5, '', '', '', NULL),
35
		('999', 'b', 'Koha Dewey Subclass [OBSOLETE]', 'Koha Dewey Subclass [OBSOLETE]', 0, 0, NULL, 0, NULL, NULL, '', NULL, -5, '', '', '', NULL),
36
		('999', 'c', 'Koha biblionumber', 'Koha biblionumber', 0, 0, 'biblio.biblionumber', -1, NULL, NULL, '', NULL, -5, '', '', '', NULL),
36
		('999', 'c', 'Koha biblionumber', 'Koha biblionumber', 0, 0, 'biblio.biblionumber', -1, NULL, NULL, '', NULL, -5, '', '', '', NULL),
37
		('999', 'd', 'Koha biblioitemnumber', 'Koha biblioitemnumber', 0, 0, 'biblioitems.biblioitemnumber', -1, NULL, NULL, '', NULL, -5, '', '', '', NULL);
37
		('999', 'd', 'Koha biblioitemnumber', 'Koha biblioitemnumber', 0, 0, 'biblioitems.biblioitemnumber', -1, NULL, NULL, '', NULL, -5, '', '', '', NULL),
38
		('999', 'e', 'Koha holding_id', 'Koha holding_id', 0, 0, 'holdings.holding_id', -1, NULL, NULL, '', NULL, -5, '', '', '', NULL);
38
39
39
40
40
-- ******************************************************
41
-- ******************************************************
Lines 97-102 INSERT IGNORE INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblib Link Here
97
		('952', '7', 'Not for loan', 'Not for loan', 0, 0, 'items.notforloan', 10, 'NOT_LOAN', '', '', 0, 0, '', '', '', NULL),
98
		('952', '7', 'Not for loan', 'Not for loan', 0, 0, 'items.notforloan', 10, 'NOT_LOAN', '', '', 0, 0, '', '', '', NULL),
98
		('952', '8', 'Collection code', 'Collection code', 0, 0, 'items.ccode', 10, 'CCODE', '', '', 0, 0, '', '', '', NULL),
99
		('952', '8', 'Collection code', 'Collection code', 0, 0, 'items.ccode', 10, 'CCODE', '', '', 0, 0, '', '', '', NULL),
99
		('952', '9', 'Koha itemnumber (autogenerated)', 'Koha itemnumber', 0, 0, 'items.itemnumber', -1, '', '', '', 0, 7, '', '', '', NULL),
100
		('952', '9', 'Koha itemnumber (autogenerated)', 'Koha itemnumber', 0, 0, 'items.itemnumber', -1, '', '', '', 0, 7, '', '', '', NULL),
101
        ('952', 'V', 'Holding record',  'Holding record',  0, 0, 'items.holding_id', 10, 'holdings', '', '', NULL, 0,  '', '', '', NULL),
100
		('952', 'a', 'Permanent location', 'Permanent Location', 0, 0, 'items.homebranch', 10, 'branches', '', '', 0, 0, '', '', '', NULL),
102
		('952', 'a', 'Permanent location', 'Permanent Location', 0, 0, 'items.homebranch', 10, 'branches', '', '', 0, 0, '', '', '', NULL),
101
		('952', 'b', 'Current location', 'Current Location', 0, 0, 'items.holdingbranch', 10, 'branches', '', '', 0, 0, '', '', '', NULL),
103
		('952', 'b', 'Current location', 'Current Location', 0, 0, 'items.holdingbranch', 10, 'branches', '', '', 0, 0, '', '', '', NULL),
102
		('952', 'c', 'Shelving location', 'Shelving location', 0, 0, 'items.location', 10, 'LOC', '', '', 0, 0, '', '', '', NULL),
104
		('952', 'c', 'Shelving location', 'Shelving location', 0, 0, 'items.location', 10, 'LOC', '', '', 0, 0, '', '', '', NULL),
Lines 4466-4474 UPDATE `marc_subfield_structure` SET maxlength=24 WHERE tagfield='000'; Link Here
4466
UPDATE `marc_subfield_structure` SET maxlength=40 WHERE tagfield='008';
4468
UPDATE `marc_subfield_structure` SET maxlength=40 WHERE tagfield='008';
4467
4469
4468
-- Create the ACQ framework based on the default framework, fields 952 only
4470
-- Create the ACQ framework based on the default framework, fields 952 only
4469
INSERT IGNORE INTO biblio_framework VALUES( 'ACQ', 'Acquisition framework' );
4471
INSERT IGNORE INTO biblio_framework (frameworkcode, frameworktext) VALUES( 'ACQ', 'Acquisition framework' );
4470
INSERT INTO marc_tag_structure(tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, frameworkcode)
4472
INSERT INTO marc_tag_structure(tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, frameworkcode)
4471
SELECT tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, 'ACQ' FROM marc_tag_structure WHERE tagfield='952' AND frameworkcode='';
4473
SELECT tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, 'ACQ' FROM marc_tag_structure WHERE tagfield='952' AND frameworkcode='';
4472
4474
4473
INSERT INTO marc_subfield_structure(tagfield, tagsubfield, liblibrarian, libopac, repeatable, mandatory, kohafield, tab, authorised_value, authtypecode, value_builder, isurl, hidden, frameworkcode, seealso, link, defaultvalue, maxlength)
4475
INSERT INTO marc_subfield_structure(tagfield, tagsubfield, liblibrarian, libopac, repeatable, mandatory, kohafield, tab, authorised_value, authtypecode, value_builder, isurl, hidden, frameworkcode, seealso, link, defaultvalue, maxlength)
4474
SELECT tagfield, tagsubfield, liblibrarian, libopac, repeatable, mandatory, kohafield, tab, authorised_value, authtypecode, value_builder, isurl, hidden, 'ACQ', seealso, link, defaultvalue, maxlength FROM marc_subfield_structure WHERE tagfield='952' AND frameworkcode='';
4476
SELECT tagfield, tagsubfield, liblibrarian, libopac, repeatable, mandatory, kohafield, tab, authorised_value, authtypecode, value_builder, isurl, hidden, 'ACQ', seealso, link, defaultvalue, maxlength FROM marc_subfield_structure WHERE tagfield='952' AND frameworkcode='';
4477
4478
-- HOLDINGS RECORD FRAMEWORK
4479
4480
INSERT IGNORE INTO `biblio_framework` VALUES ('HLD', 'Default holdings framework', 'hld');
4481
INSERT IGNORE INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeatable`, `mandatory`, `authorised_value`, `frameworkcode`) VALUES
4482
		('999', 'SYSTEM CONTROL NUMBERS (KOHA)', 'SYSTEM CONTROL NUMBERS (KOHA)', 1, 0, '', 'HLD');
4483
4484
INSERT IGNORE INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian`, `libopac`, `repeatable`, `mandatory`, `kohafield`, `tab`, `authorised_value`, `authtypecode`, `value_builder`, `isurl`, `hidden`, `frameworkcode`, `seealso`, `link`, `defaultvalue`) VALUES
4485
		('999', 'c', 'Koha biblionumber', 'Koha biblionumber', 0, 0, 'biblio.biblionumber', -1, NULL, NULL, '', NULL, -5, 'HLD', '', '', NULL),
4486
		('999', 'd', 'Koha biblioitemnumber', 'Koha biblioitemnumber', 0, 0, 'biblioitems.biblioitemnumber', -1, NULL, NULL, '', NULL, -5, 'HLD', '', '', NULL),
4487
		('999', 'e', 'Koha holding_id', 'Koha holding_id', 0, 0, 'holdings.holding_id', -1, NULL, NULL, '', NULL, -5, 'HLD', '', '', NULL);
4488
4489
4490
INSERT IGNORE INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian`, `libopac`, `repeatable`, `mandatory`, `kohafield`, `tab`, `authorised_value`, `authtypecode`, `value_builder`, `isurl`, `hidden`, `frameworkcode`, `seealso`, `link`, `defaultvalue`) VALUES
4491
		('942', 'n', 'Suppress in OPAC', 'Suppress in OPAC', 0, 0, 'holdings.suppress', 9, '', '', '', 0, 0, 'HLD', '', '', NULL);
4492
4493
INSERT IGNORE INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeatable`, `mandatory`, `authorised_value`, `frameworkcode`) VALUES
4494
		('000', 'LEADER', 'LEADER', 0, 1, '', 'HLD'),
4495
		('001', 'CONTROL NUMBER', 'CONTROL NUMBER', 0, 0, '', 'HLD'),
4496
		('003', 'CONTROL NUMBER IDENTIFIER', 'CONTROL NUMBER IDENTIFIER', 0, 1, '', 'HLD'),
4497
		('005', 'DATE AND TIME OF LATEST TRANSACTION', 'DATE AND TIME OF LATEST TRANSACTION', 0, 1, '', 'HLD'),
4498
		('006', 'FIXED-LENGTH DATA ELEMENTS--ADDITIONAL MATERIAL CHARACTERISTICS', 'FIXED-LENGTH DATA ELEMENTS--ADDITIONAL MATERIAL CHARACTERISTICS', 1, 0, '', 'HLD'),
4499
		('007', 'PHYSICAL DESCRIPTION FIXED FIELD--GENERAL INFORMATION', 'PHYSICAL DESCRIPTION FIXED FIELD--GENERAL INFORMATION', 1, 0, '', 'HLD'),
4500
		('008', 'FIXED-LENGTH DATA ELEMENTS--GENERAL INFORMATION', 'FIXED-LENGTH DATA ELEMENTS--GENERAL INFORMATION', 0, 1, '', 'HLD');
4501
4502
INSERT IGNORE INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeatable`, `mandatory`, `authorised_value`, `frameworkcode`) VALUES
4503
		('850', 'HOLDING INSTITUTION', 'HOLDING INSTITUTION', 1, 0, NULL, 'HLD'),
4504
		('852', 'LOCATION', 'LOCATION', 1, 0, NULL, 'HLD'),
4505
		('853', 'CAPTIONS AND PATTERN--BASIC BIBLIOGRAPHIC UNIT', 'CAPTIONS AND PATTERN--BASIC BIBLIOGRAPHIC UNIT', 1, 0, NULL, 'HLD'),
4506
		('854', 'CAPTIONS AND PATTERN--SUPPLEMENTARY MATERIAL', 'CAPTIONS AND PATTERN--SUPPLEMENTARY MATERIAL', 1, 0, NULL, 'HLD'),
4507
		('855', 'CAPTIONS AND PATTERN--INDEXES', 'CAPTIONS AND PATTERN--INDEXES', 1, 0, NULL, 'HLD'),
4508
		('856', 'ELECTRONIC LOCATION AND ACCESS', 'ELECTRONIC LOCATION AND ACCESS', 1, 0, NULL, 'HLD'),
4509
		('863', 'ENUMERATION AND CHRONOLOGY--BASIC BIBLIOGRAPHIC UNIT', 'ENUMERATION AND CHRONOLOGY--BASIC BIBLIOGRAPHIC UNIT', 1, 0, NULL, 'HLD'),
4510
		('864', 'ENUMERATION AND CHRONOLOGY--SUPPLEMENTARY MATERIAL', 'ENUMERATION AND CHRONOLOGY--SUPPLEMENTARY MATERIAL', 1, 0, NULL, 'HLD'),
4511
		('865', 'ENUMERATION AND CHRONOLOGY--INDEXES', 'ENUMERATION AND CHRONOLOGY--INDEXES', 1, 0, NULL, 'HLD'),
4512
		('866', 'TEXTUAL HOLDINGS--BASIC BIBLIOGRAPHIC UNIT', 'TEXTUAL HOLDINGS--BASIC BIBLIOGRAPHIC UNIT', 1, 0, NULL, 'HLD'),
4513
		('867', 'TEXTUAL HOLDINGS--SUPPLEMENTARY MATERIAL', 'TEXTUAL HOLDINGS--SUPPLEMENTARY MATERIAL', 1, 0, NULL, 'HLD'),
4514
		('868', 'TEXTUAL HOLDINGS--INDEXES', 'TEXTUAL HOLDINGS--INDEXES', 1, 0, NULL, 'HLD'),
4515
		('876', 'ITEM INFORMATION--BASIC BIBLIOGRAPHIC UNIT', 'ITEM INFORMATION--BASIC BIBLIOGRAPHIC UNIT', 1, 0, NULL, 'HLD'),
4516
		('877', 'ITEM INFORMATION--SUPPLEMENTARY MATERIAL', 'ITEM INFORMATION--SUPPLEMENTARY MATERIAL', 1, 0, NULL, 'HLD'),
4517
		('878', 'ITEM INFORMATION--INDEXES', 'ITEM INFORMATION--INDEXES', 1, 0, NULL, 'HLD');
4518
4519
INSERT IGNORE INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian`, `libopac`, `repeatable`, `mandatory`, `kohafield`, `tab`, `authorised_value`, `authtypecode`, `value_builder`, `isurl`, `hidden`, `frameworkcode`, `seealso`, `link`, `defaultvalue`) VALUES
4520
		('000', '@', 'fixed length control field', 'fixed length control field', 0, 1, '', 0, '', '', 'marc21_leader_holdings.pl', 0, 0, 'HLD', '', '', NULL),
4521
		('001', '@', 'control field', 'control field', 0, 0, '', 0, '', '', '', 0, 0, 'HLD', '', '', NULL),
4522
		('003', '@', 'control field', 'control field', 0, 1, '', 0, '', '', 'marc21_orgcode.pl', 0, 0, 'HLD', '', '', NULL),
4523
		('005', '@', 'control field', 'control field', 0, 1, '', 0, '', '', 'marc21_field_005.pl', 0, 0, 'HLD', '', '', NULL),
4524
		('006', '@', 'fixed length control field', 'fixed length control field', 0, 0, '', 0, '', '', 'marc21_field_006.pl', 0, -1, 'HLD', '', '', NULL),
4525
		('007', '@', 'fixed length control field', 'fixed length control field', 0, 0, '', 0, '', '', 'marc21_field_007.pl', 0, 0, 'HLD', '', '', NULL),
4526
		('008', '@', 'fixed length control field', 'fixed length control field', 0, 1, '', 0, '', '', 'marc21_field_008_holdings.pl', 0, 0, 'HLD', '', '', NULL),
4527
		('850', '8', 'Field link and sequence number', 'Field link and sequence number', 1, 0, NULL, 8, NULL, NULL, '', NULL, 4, 'HLD', '', '', NULL),
4528
		('850', 'a', 'Holding institution', 'Holding institution', 1, 0, NULL, 8, NULL, NULL, '', NULL, 4, 'HLD', '', '', NULL),
4529
		('850', 'b', 'Holdings (NR) (MU VM SE) [OBSOLETE]', 'Holdings (NR) (MU VM SE) [OBSOLETE]', 0, 0, NULL, 8, NULL, NULL, '', NULL, 4, 'HLD', '', '', NULL),
4530
		('850', 'd', 'Inclusive dates (NR) (MU VM SE) [OBSOLETE]', 'Inclusive dates (NR) (MU VM SE) [OBSOLETE]', 0, 0, NULL, 8, NULL, NULL, '', NULL, 4, 'HLD', '', '', NULL),
4531
		('850', 'e', 'Retention statement (NR) (CF MU VM SE) [OBSOLETE]', 'Retention statement (NR) (CF MU VM SE) [OBSOLETE]', 0, 0, NULL, 8, NULL, NULL, '', NULL, 4, 'HLD', '', '', NULL),
4532
		('852', '2', 'Source of classification or shelving scheme', 'Source of classification or shelving scheme', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4533
		('852', '3', 'Materials specified', 'Materials specified', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4534
		('852', '6', 'Linkage', 'Linkage', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4535
		('852', '8', 'Sequence number', 'Sequence number', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4536
		('852', 'a', 'Location', 'Location', 0, 0, 'holdings.holdingbranch', 8, 'branches', '', '', NULL, 4, 'HLD', '', '', NULL),
4537
		('852', 'b', 'Sublocation or collection', 'Sublocation or collection', 1, 0, 'holdings.location', 8, 'LOC', '', '', NULL, 4, 'HLD', '', '', NULL),
4538
		('852', 'c', 'Shelving location', 'Shelving location', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4539
		('852', 'd', 'Former shelving location', 'Former shelving location', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4540
		('852', 'e', 'Address', 'Address', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4541
		('852', 'f', 'Coded location qualifier', 'Coded location qualifier', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4542
		('852', 'g', 'Non-coded location qualifier', 'Non-coded location qualifier', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4543
		('852', 'h', 'Classification part', 'Classification part', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4544
		('852', 'i', 'Item part', 'Item part', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4545
		('852', 'j', 'Shelving control number', 'Shelving control number', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4546
		('852', 'k', 'Call number prefix', 'Call number prefix', 1, 0, 'holdings.callnumber', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4547
		('852', 'l', 'Shelving form of title', 'Shelving form of title', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4548
		('852', 'm', 'Call number suffix', 'Call number suffix', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4549
		('852', 'n', 'Country code', 'Country code', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4550
		('852', 'p', 'Piece designation', 'Piece designation', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4551
		('852', 'q', 'Piece physical condition', 'Piece physical condition', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4552
		('852', 's', 'Copyright article-fee code', 'Copyright article-fee code', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4553
		('852', 't', 'Copy number', 'Copy number', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4554
		('852', 'u', 'Uniform Resource Identifier', 'Uniform Resource Identifier', 1, 0, '', 8, '', '', '', 1, 4, 'HLD', '', '', NULL),
4555
		('852', 'x', 'Nonpublic note', 'Nonpublic note', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4556
		('852', 'z', 'Public note', 'Public note', 1, 0, 'holdings.public_note', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4557
		('853', '3', 'Materials specified', 'Materials specified', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4558
		('853', '6', 'Linkage', 'Linkage', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4559
		('853', '8', 'Field link and sequence number', 'Field link and sequence number', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4560
		('853', 'a', 'First level of enumeration', 'First level of enumeration', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4561
		('853', 'b', 'Second level of enumeration', 'Second level of enumeration', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4562
		('853', 'c', 'Third level of enumeration', 'Third level of enumeration', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4563
		('853', 'd', 'Fourth level of enumeration', 'Fourth level of enumeration', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4564
		('853', 'e', 'Fifth level of enumeration', 'Fifth level of enumeration', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4565
		('853', 'f', 'Sixth level of enumeration', 'Sixth level of enumeration', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4566
		('853', 'g', 'Alternative numbering scheme, first level of enumeration', 'Alternative numbering scheme, first level of enumeration', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4567
		('853', 'h', 'Alternative numbering scheme, second level of enumeration', 'Alternative numbering scheme, second level of enumeration', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4568
		('853', 'i', 'First level of chronology', 'First level of chronology', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4569
		('853', 'j', 'Second level of chronology', 'Second level of chronology', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4570
		('853', 'k', 'Third level of chronology', 'Third level of chronology', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4571
		('853', 'l', 'Fourth level of chronology', 'Fourth level of chronology', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4572
		('853', 'm', 'Alternative numbering scheme, chronology', 'Alternative numbering scheme, chronology', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4573
		('853', 'n', 'Pattern note', 'Pattern note', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4574
		('853', 'p', 'Number of pieces per issuance', 'Number of pieces per issuance', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4575
		('853', 't', 'Copy', 'Copy', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4576
		('853', 'u', 'Bibliographic units per next higher level', 'Bibliographic units per next higher level', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4577
		('853', 'v', 'Numbering continuity', 'Numbering continuity', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4578
		('853', 'w', 'Frequency', 'Frequency', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4579
		('853', 'x', 'Calendar change', 'Calendar change', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4580
		('853', 'y', 'Regularity pattern', 'Regularity pattern', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4581
		('853', 'z', 'Numbering scheme', 'Numbering scheme', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4582
		('854', '3', 'Materials specified', 'Materials specified', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4583
		('854', '6', 'Linkage', 'Linkage', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4584
		('854', '8', 'Field link and sequence number', 'Field link and sequence number', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4585
		('854', 'a', 'First level of enumeration', 'First level of enumeration', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4586
		('854', 'b', 'Second level of enumeration', 'Second level of enumeration', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4587
		('854', 'c', 'Third level of enumeration', 'Third level of enumeration', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4588
		('854', 'd', 'Fourth level of enumeration', 'Fourth level of enumeration', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4589
		('854', 'e', 'Fifth level of enumeration', 'Fifth level of enumeration', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4590
		('854', 'f', 'Sixth level of enumeration', 'Sixth level of enumeration', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4591
		('854', 'g', 'Alternative numbering scheme, first level of enumeration', 'Alternative numbering scheme, first level of enumeration', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4592
		('854', 'h', 'Alternative numbering scheme, second level of enumeration', 'Alternative numbering scheme, second level of enumeration', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4593
		('854', 'i', 'First level of chronology', 'First level of chronology', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4594
		('854', 'j', 'Second level of chronology', 'Second level of chronology', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4595
		('854', 'k', 'Third level of chronology', 'Third level of chronology', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4596
		('854', 'l', 'Fourth level of chronology', 'Fourth level of chronology', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4597
		('854', 'm', 'Alternative numbering scheme, chronology', 'Alternative numbering scheme, chronology', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4598
		('854', 'n', 'Pattern note', 'Pattern note', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4599
		('854', 'p', 'Number of pieces per issuance', 'Number of pieces per issuance', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4600
		('854', 't', 'Copy', 'Copy', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4601
		('854', 'u', 'Bibliographic units per next higher level', 'Bibliographic units per next higher level', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4602
		('854', 'v', 'Numbering continuity', 'Numbering continuity', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4603
		('854', 'w', 'Frequency', 'Frequency', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4604
		('854', 'x', 'Calendar change', 'Calendar change', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4605
		('854', 'y', 'Regularity pattern', 'Regularity pattern', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4606
		('854', 'z', 'Numbering scheme', 'Numbering scheme', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4607
		('855', '3', 'Materials specified', 'Materials specified', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4608
		('855', '6', 'Linkage', 'Linkage', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4609
		('855', '8', 'Field link and sequence number', 'Field link and sequence number', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4610
		('855', 'a', 'First level of enumeration', 'First level of enumeration', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4611
		('855', 'b', 'Second level of enumeration', 'Second level of enumeration', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4612
		('855', 'c', 'Third level of enumeration', 'Third level of enumeration', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4613
		('855', 'd', 'Fourth level of enumeration', 'Fourth level of enumeration', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4614
		('855', 'e', 'Fifth level of enumeration', 'Fifth level of enumeration', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4615
		('855', 'f', 'Sixth level of enumeration', 'Sixth level of enumeration', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4616
		('855', 'g', 'Alternative numbering scheme, first level of enumeration', 'Alternative numbering scheme, first level of enumeration', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4617
		('855', 'h', 'Alternative numbering scheme, second level of enumeration', 'Alternative numbering scheme, second level of enumeration', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4618
		('855', 'i', 'First level of chronology', 'First level of chronology', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4619
		('855', 'j', 'Second level of chronology', 'Second level of chronology', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4620
		('855', 'k', 'Third level of chronology', 'Third level of chronology', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4621
		('855', 'l', 'Fourth level of chronology', 'Fourth level of chronology', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4622
		('855', 'm', 'Alternative numbering scheme, chronology', 'Alternative numbering scheme, chronology', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4623
		('855', 'n', 'Pattern note', 'Pattern note', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4624
		('855', 'p', 'Number of pieces per issuance', 'Number of pieces per issuance', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4625
		('855', 't', 'Copy', 'Copy', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4626
		('855', 'u', 'Bibliographic units per next higher level', 'Bibliographic units per next higher level', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4627
		('855', 'v', 'Numbering continuity', 'Numbering continuity', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4628
		('855', 'w', 'Frequency', 'Frequency', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4629
		('855', 'x', 'Calendar change', 'Calendar change', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4630
		('855', 'y', 'Regularity pattern', 'Regularity pattern', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4631
		('855', 'z', 'Numbering scheme', 'Numbering scheme', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4632
		('856', '2', 'Access method', 'Access method', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4633
		('856', '3', 'Materials specified', 'Materials specified', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4634
		('856', '6', 'Linkage', 'Linkage', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4635
		('856', '8', 'Field link and sequence number', 'Field link and sequence number', 1, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4636
		('856', 'a', 'Host name', 'Host name', 1, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4637
		('856', 'b', 'Access number', 'Access number', 1, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4638
		('856', 'c', 'Compression information', 'Compression information', 1, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4639
		('856', 'd', 'Path', 'Path', 1, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4640
		('856', 'f', 'Electronic name', 'Electronic name', 1, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4641
		('856', 'h', 'Processor of request', 'Processor of request', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4642
		('856', 'i', 'Instruction', 'Instruction', 1, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4643
		('856', 'j', 'Bits per second', 'Bits per second', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4644
		('856', 'k', 'Password', 'Password', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4645
		('856', 'l', 'Logon', 'Logon', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4646
		('856', 'm', 'Contact for access assistance', 'Contact for access assistance', 1, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4647
		('856', 'n', 'Name of location of host', 'Name of location of host', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4648
		('856', 'o', 'Operating system', 'Operating system', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4649
		('856', 'p', 'Port', 'Port', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4650
		('856', 'q', 'Electronic format type', 'Electronic format type', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4651
		('856', 'r', 'Settings', 'Settings', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4652
		('856', 's', 'File size', 'File size', 1, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4653
		('856', 't', 'Terminal emulation', 'Terminal emulation', 1, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4654
		('856', 'u', 'Uniform Resource Identifier', 'Uniform Resource Identifier', 1, 0, 'biblioitems.url', 8, '', '', '', 1, 4, 'HLD', '', '', NULL),
4655
		('856', 'v', 'Hours access method available', 'Hours access method available', 1, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4656
		('856', 'w', 'Record control number', 'Record control number', 1, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4657
		('856', 'x', 'Nonpublic note', 'Nonpublic note', 1, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4658
		('856', 'y', 'Link text', 'Link text', 1, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4659
		('856', 'z', 'Public note', 'Public note', 1, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4660
		('863', '6', 'Linkage', 'Linkage', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4661
		('863', '8', 'Field link and sequence number', 'Field link and sequence number', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4662
		('863', 'a', 'First level of enumeration', 'First level of enumeration', 0, 0, 'holdings.summary', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4663
		('863', 'b', 'Second level of enumeration', 'Second level of enumeration', 0, 0, 'holdings.summary', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4664
		('863', 'c', 'Third level of enumeration', 'Third level of enumeration', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4665
		('863', 'd', 'Fourth level of enumeration', 'Fourth level of enumeration', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4666
		('863', 'e', 'Fifth level of enumeration', 'Fifth level of enumeration', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4667
		('863', 'f', 'Sixth level of enumeration', 'Sixth level of enumeration', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4668
		('863', 'g', 'Alternative numbering scheme, first level of enumeration', 'Alternative numbering scheme, first level of enumeration', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4669
		('863', 'h', 'Alternative numbering scheme, second level of enumeration', 'Alternative numbering scheme, second level of enumeration', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4670
		('863', 'i', 'First level of chronology', 'First level of chronology', 0, 0, 'holdings.summary', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4671
		('863', 'j', 'Second level of chronology', 'Second level of chronology', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4672
		('863', 'k', 'Third level of chronology', 'Third level of chronology', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4673
		('863', 'l', 'Fourth level of chronology', 'Fourth level of chronology', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4674
		('863', 'm', 'Alternative numbering scheme, chronology', 'Alternative numbering scheme, chronology', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4675
		('863', 'n', 'Converted Gregorian year', 'Converted Gregorian year', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4676
		('863', 'o', 'Type of unit', 'Type of unit', 1, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4677
		('863', 'p', 'Piece designation', 'Piece designation', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4678
		('863', 'q', 'Piece physical condition', 'Piece physical condition', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4679
		('863', 's', 'Copyright article-fee code', 'Copyright article-fee code', 1, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4680
		('863', 't', 'Copy number', 'Copy number', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4681
		('863', 'v', 'Issuing date', 'Issuing date', 1, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4682
		('863', 'w', 'Break indicator', 'Break indicator', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4683
		('863', 'x', 'Nonpublic note', 'Nonpublic note', 1, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4684
		('863', 'z', 'Public note', 'Public note', 1, 0, 'holdings.summary', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4685
		('864', '6', 'Linkage', 'Linkage', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4686
		('864', '8', 'Field link and sequence number', 'Field link and sequence number', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4687
		('864', 'a', 'First level of enumeration', 'First level of enumeration', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4688
		('864', 'b', 'Second level of enumeration', 'Second level of enumeration', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4689
		('864', 'c', 'Third level of enumeration', 'Third level of enumeration', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4690
		('864', 'd', 'Fourth level of enumeration', 'Fourth level of enumeration', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4691
		('864', 'e', 'Fifth level of enumeration', 'Fifth level of enumeration', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4692
		('864', 'f', 'Sixth level of enumeration', 'Sixth level of enumeration', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4693
		('864', 'g', 'Alternative numbering scheme, first level of enumeration', 'Alternative numbering scheme, first level of enumeration', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4694
		('864', 'h', 'Alternative numbering scheme, second level of enumeration', 'Alternative numbering scheme, second level of enumeration', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4695
		('864', 'i', 'First level of chronology', 'First level of chronology', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4696
		('864', 'j', 'Second level of chronology', 'Second level of chronology', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4697
		('864', 'k', 'Third level of chronology', 'Third level of chronology', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4698
		('864', 'l', 'Fourth level of chronology', 'Fourth level of chronology', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4699
		('864', 'm', 'Alternative numbering scheme, chronology', 'Alternative numbering scheme, chronology', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4700
		('864', 'n', 'Converted Gregorian year', 'Converted Gregorian year', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4701
		('864', 'o', 'Type of unit', 'Type of unit', 1, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4702
		('864', 'p', 'Piece designation', 'Piece designation', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4703
		('864', 'q', 'Piece physical condition', 'Piece physical condition', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4704
		('864', 's', 'Copyright article-fee code', 'Copyright article-fee code', 1, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4705
		('864', 't', 'Copy number', 'Copy number', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4706
		('864', 'v', 'Issuing date', 'Issuing date', 1, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4707
		('864', 'w', 'Break indicator', 'Break indicator', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4708
		('864', 'x', 'Nonpublic note', 'Nonpublic note', 1, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4709
		('864', 'z', 'Public note', 'Public note', 1, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4710
		('865', '6', 'Linkage', 'Linkage', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4711
		('865', '8', 'Field link and sequence number', 'Field link and sequence number', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4712
		('865', 'a', 'First level of enumeration', 'First level of enumeration', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4713
		('865', 'b', 'Second level of enumeration', 'Second level of enumeration', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4714
		('865', 'c', 'Third level of enumeration', 'Third level of enumeration', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4715
		('865', 'd', 'Fourth level of enumeration', 'Fourth level of enumeration', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4716
		('865', 'e', 'Fifth level of enumeration', 'Fifth level of enumeration', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4717
		('865', 'f', 'Sixth level of enumeration', 'Sixth level of enumeration', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4718
		('865', 'g', 'Alternative numbering scheme, first level of enumeration', 'Alternative numbering scheme, first level of enumeration', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4719
		('865', 'h', 'Alternative numbering scheme, second level of enumeration', 'Alternative numbering scheme, second level of enumeration', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4720
		('865', 'i', 'First level of chronology', 'First level of chronology', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4721
		('865', 'j', 'Second level of chronology', 'Second level of chronology', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4722
		('865', 'k', 'Third level of chronology', 'Third level of chronology', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4723
		('865', 'l', 'Fourth level of chronology', 'Fourth level of chronology', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4724
		('865', 'm', 'Alternative numbering scheme, chronology', 'Alternative numbering scheme, chronology', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4725
		('865', 'n', 'Converted Gregorian year', 'Converted Gregorian year', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4726
		('865', 'o', 'Type of unit', 'Type of unit', 1, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4727
		('865', 'p', 'Piece designation', 'Piece designation', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4728
		('865', 'q', 'Piece physical condition', 'Piece physical condition', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4729
		('865', 's', 'Copyright article-fee code', 'Copyright article-fee code', 1, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4730
		('865', 't', 'Copy number', 'Copy number', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4731
		('865', 'v', 'Issuing date', 'Issuing date', 1, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4732
		('865', 'w', 'Break indicator', 'Break indicator', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4733
		('865', 'x', 'Nonpublic note', 'Nonpublic note', 1, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4734
		('865', 'z', 'Public note', 'Public note', 1, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4735
		('866', '6', 'Linkage', 'Linkage', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4736
		('866', '8', 'Field link and sequence number', 'Field link and sequence number', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4737
		('866', 'a', 'Textual string', 'Textual string', 0, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4738
		('866', 'x', 'Nonpublic note', 'Nonpublic note', 1, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4739
		('866', 'z', 'Public note', 'Public note', 1, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4740
		('867', '6', 'Linkage', 'Linkage', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4741
		('867', '8', 'Field link and sequence number', 'Field link and sequence number', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4742
		('867', 'a', 'Textual string', 'Textual string', 0, 0, 'holdings.supplements', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4743
		('867', 'x', 'Nonpublic note', 'Nonpublic note', 1, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4744
		('867', 'z', 'Public note', 'Public note', 1, 0, 'holdings.supplements', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4745
		('868', '6', 'Linkage', 'Linkage', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4746
		('868', '8', 'Field link and sequence number', 'Field link and sequence number', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4747
		('868', 'a', 'Textual string', 'Textual string', 0, 0, 'holdings.indexes', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4748
		('868', 'x', 'Nonpublic note', 'Nonpublic note', 1, 0, '', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4749
		('868', 'z', 'Public note', 'Public note', 1, 0, 'holdings.indexes', 8, '', '', '', 0, 4, 'HLD', '', '', NULL),
4750
		('876', '3', 'Materials specified', 'Materials specified', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4751
		('876', '6', 'Linkage', 'Linkage', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4752
		('876', '8', 'Sequence number', 'Sequence number', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4753
		('876', 'a', 'Internal item number', 'Internal item number', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4754
		('876', 'b', 'Invalid or canceled internal item number', 'Invalid or canceled internal item number', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4755
		('876', 'c', 'Cost', 'Cost', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4756
		('876', 'd', 'Date acquired', 'Date acquired', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4757
		('876', 'e', 'Source of acquisition', 'Source of acquisition', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4758
		('876', 'h', 'Use restrictions', 'Use restrictions', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4759
		('876', 'j', 'Item status', 'Item status', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4760
		('876', 'l', 'Temporary location', 'Temporary location', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4761
		('876', 'p', 'Piece designation', 'Piece designation', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4762
		('876', 'r', 'Invalid or canceled piece designation', 'Invalid or canceled piece designation', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4763
		('876', 't', 'Copy number', 'Copy number', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4764
		('876', 'x', 'Nonpublic note', 'Nonpublic note', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4765
		('876', 'z', 'Public note', 'Public note', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4766
		('877', '3', 'Materials specified', 'Materials specified', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4767
		('877', '6', 'Linkage', 'Linkage', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4768
		('877', '8', 'Sequence number', 'Sequence number', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4769
		('877', 'a', 'Internal item number', 'Internal item number', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4770
		('877', 'b', 'Invalid or canceled internal item number', 'Invalid or canceled internal item number', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4771
		('877', 'c', 'Cost', 'Cost', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4772
		('877', 'd', 'Date acquired', 'Date acquired', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4773
		('877', 'e', 'Source of acquisition', 'Source of acquisition', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4774
		('877', 'h', 'Use restrictions', 'Use restrictions', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4775
		('877', 'j', 'Item status', 'Item status', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4776
		('877', 'l', 'Temporary location', 'Temporary location', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4777
		('877', 'p', 'Piece designation', 'Piece designation', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4778
		('877', 'r', 'Invalid or canceled piece designation', 'Invalid or canceled piece designation', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4779
		('877', 't', 'Copy number', 'Copy number', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4780
		('877', 'x', 'Nonpublic note', 'Nonpublic note', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4781
		('877', 'z', 'Public note', 'Public note', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4782
		('878', '3', 'Materials specified', 'Materials specified', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4783
		('878', '6', 'Linkage', 'Linkage', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4784
		('878', '8', 'Sequence number', 'Sequence number', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4785
		('878', 'a', 'Internal item number', 'Internal item number', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4786
		('878', 'b', 'Invalid or canceled internal item number', 'Invalid or canceled internal item number', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4787
		('878', 'c', 'Cost', 'Cost', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4788
		('878', 'd', 'Date acquired', 'Date acquired', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4789
		('878', 'e', 'Source of acquisition', 'Source of acquisition', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4790
		('878', 'h', 'Use restrictions', 'Use restrictions', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4791
		('878', 'j', 'Item status', 'Item status', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4792
		('878', 'l', 'Temporary location', 'Temporary location', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4793
		('878', 'p', 'Piece designation', 'Piece designation', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4794
		('878', 'r', 'Invalid or canceled piece designation', 'Invalid or canceled piece designation', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4795
		('878', 't', 'Copy number', 'Copy number', 0, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4796
		('878', 'x', 'Nonpublic note', 'Nonpublic note', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL),
4797
		('878', 'z', 'Public note', 'Public note', 1, 0, '', 8, '', '', '', NULL, 4, 'HLD', '', '', NULL);
(-)a/installer/data/mysql/en/marcflavour/marc21/optional/marc21_sample_fastadd_framework.sql (-1 / +1 lines)
Lines 1-4 Link Here
1
INSERT IGNORE INTO biblio_framework VALUES
1
INSERT IGNORE INTO biblio_framework (frameworkcode, frameworktext) VALUES
2
		('FA', 'Fast Add Framework');
2
		('FA', 'Fast Add Framework');
3
3
4
INSERT IGNORE INTO marc_tag_structure (tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, frameworkcode)
4
INSERT IGNORE INTO marc_tag_structure (tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, frameworkcode)
(-)a/installer/data/mysql/en/marcflavour/marc21/optional/marc21_simple_bib_frameworks.sql (-8 / +8 lines)
Lines 6-12 Link Here
6
-- *******************************************************************
6
-- *******************************************************************
7
-- SIMPLE BOOKS KOHA RECORD AND HOLDINGS MANAGEMENT FIELDS/SUBFIELDS.
7
-- SIMPLE BOOKS KOHA RECORD AND HOLDINGS MANAGEMENT FIELDS/SUBFIELDS.
8
-- *******************************************************************
8
-- *******************************************************************
9
INSERT IGNORE INTO biblio_framework VALUES
9
INSERT IGNORE INTO biblio_framework (frameworkcode, frameworktext) VALUES
10
		( 'BKS', 'Books, Booklets, Workbooks' );
10
		( 'BKS', 'Books, Booklets, Workbooks' );
11
11
12
INSERT IGNORE INTO marc_tag_structure (
12
INSERT IGNORE INTO marc_tag_structure (
Lines 29-35 INSERT IGNORE INTO marc_subfield_structure ( Link Here
29
-- ****************************************************************************
29
-- ****************************************************************************
30
-- SIMPLE COMPUTER FILES KOHA RECORD AND HOLDINGS MANAGEMENT FIELDS/SUBFIELDS.
30
-- SIMPLE COMPUTER FILES KOHA RECORD AND HOLDINGS MANAGEMENT FIELDS/SUBFIELDS.
31
-- ****************************************************************************
31
-- ****************************************************************************
32
INSERT IGNORE INTO biblio_framework VALUES
32
INSERT IGNORE INTO biblio_framework (frameworkcode, frameworktext) VALUES
33
		( 'CF', 'CD-ROMs, DVD-ROMs, General Online Resources' );
33
		( 'CF', 'CD-ROMs, DVD-ROMs, General Online Resources' );
34
INSERT IGNORE INTO marc_tag_structure (
34
INSERT IGNORE INTO marc_tag_structure (
35
		tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, frameworkcode)
35
		tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, frameworkcode)
Lines 52-58 INSERT IGNORE INTO marc_subfield_structure ( Link Here
52
-- *****************************************************************************
52
-- *****************************************************************************
53
-- SIMPLE SOUND RECORDINGS KOHA RECORD AND HOLDINGS MANAGEMENT FIELDS/SUBFIELDS.
53
-- SIMPLE SOUND RECORDINGS KOHA RECORD AND HOLDINGS MANAGEMENT FIELDS/SUBFIELDS.
54
-- *****************************************************************************
54
-- *****************************************************************************
55
INSERT IGNORE INTO biblio_framework VALUES
55
INSERT IGNORE INTO biblio_framework (frameworkcode, frameworktext) VALUES
56
		( 'SR', 'Audio Cassettes, CDs' );
56
		( 'SR', 'Audio Cassettes, CDs' );
57
57
58
INSERT IGNORE INTO marc_tag_structure (
58
INSERT IGNORE INTO marc_tag_structure (
Lines 76-82 INSERT IGNORE INTO marc_subfield_structure ( Link Here
76
-- ****************************************************************************
76
-- ****************************************************************************
77
-- SIMPLE VIDEORECORDINGS KOHA RECORD AND HOLDINGS MANAGEMENT FIELDS/SUBFIELDS.
77
-- SIMPLE VIDEORECORDINGS KOHA RECORD AND HOLDINGS MANAGEMENT FIELDS/SUBFIELDS.
78
-- ****************************************************************************
78
-- ****************************************************************************
79
INSERT IGNORE INTO biblio_framework VALUES
79
INSERT IGNORE INTO biblio_framework (frameworkcode, frameworktext) VALUES
80
		( 'VR', 'DVDs, VHS' );
80
		( 'VR', 'DVDs, VHS' );
81
81
82
INSERT IGNORE INTO marc_tag_structure (
82
INSERT IGNORE INTO marc_tag_structure (
Lines 100-106 INSERT IGNORE INTO marc_subfield_structure ( Link Here
100
-- **************************************************************************
100
-- **************************************************************************
101
-- SIMPLE 3D ARTIFACTS KOHA RECORD AND HOLDINGS MANAGEMENT FIELDS/SUBFIELDS.
101
-- SIMPLE 3D ARTIFACTS KOHA RECORD AND HOLDINGS MANAGEMENT FIELDS/SUBFIELDS.
102
-- **************************************************************************
102
-- **************************************************************************
103
INSERT IGNORE INTO biblio_framework VALUES
103
INSERT IGNORE INTO biblio_framework (frameworkcode, frameworktext) VALUES
104
		( 'AR', 'Models' );
104
		( 'AR', 'Models' );
105
105
106
INSERT IGNORE INTO marc_tag_structure (
106
INSERT IGNORE INTO marc_tag_structure (
Lines 124-130 INSERT IGNORE INTO marc_subfield_structure ( Link Here
124
-- ******************************************************************
124
-- ******************************************************************
125
-- SIMPLE KITS KOHA RECORD AND HOLDINGS MANAGEMENT FIELDS/SUBFIELDS.
125
-- SIMPLE KITS KOHA RECORD AND HOLDINGS MANAGEMENT FIELDS/SUBFIELDS.
126
-- ******************************************************************
126
-- ******************************************************************
127
INSERT IGNORE INTO biblio_framework VALUES
127
INSERT IGNORE INTO biblio_framework (frameworkcode, frameworktext) VALUES
128
		( 'KT', 'Kits' );
128
		( 'KT', 'Kits' );
129
129
130
INSERT IGNORE INTO marc_tag_structure (
130
INSERT IGNORE INTO marc_tag_structure (
Lines 148-154 INSERT IGNORE INTO marc_subfield_structure ( Link Here
148
-- **********************************************************************************
148
-- **********************************************************************************
149
-- SIMPLE INTEGRATING RESOURCES KOHA RECORD AND HOLDINGS MANAGEMENT FIELDS/SUBFIELDS.
149
-- SIMPLE INTEGRATING RESOURCES KOHA RECORD AND HOLDINGS MANAGEMENT FIELDS/SUBFIELDS.
150
-- **********************************************************************************
150
-- **********************************************************************************
151
INSERT IGNORE INTO biblio_framework VALUES
151
INSERT IGNORE INTO biblio_framework (frameworkcode, frameworktext) VALUES
152
		( 'IR', 'Binders' );
152
		( 'IR', 'Binders' );
153
153
154
INSERT IGNORE INTO marc_tag_structure (
154
INSERT IGNORE INTO marc_tag_structure (
Lines 172-178 INSERT IGNORE INTO marc_subfield_structure ( Link Here
172
-- *********************************************************************
172
-- *********************************************************************
173
-- SIMPLE SERIALS KOHA RECORD AND HOLDINGS MANAGEMENT FIELDS/SUBFIELDS.
173
-- SIMPLE SERIALS KOHA RECORD AND HOLDINGS MANAGEMENT FIELDS/SUBFIELDS.
174
-- *********************************************************************
174
-- *********************************************************************
175
INSERT IGNORE INTO biblio_framework VALUES
175
INSERT IGNORE INTO biblio_framework (frameworkcode, frameworktext) VALUES
176
		( 'SER', 'Serials' );
176
		( 'SER', 'Serials' );
177
177
178
INSERT IGNORE INTO marc_tag_structure (
178
INSERT IGNORE INTO marc_tag_structure (
(-)a/installer/data/mysql/es-ES/marcflavour/marc21/optional/marc21_sample_fastadd_framework.sql (-1 / +1 lines)
Lines 1-4 Link Here
1
INSERT IGNORE INTO biblio_framework VALUES
1
INSERT IGNORE INTO biblio_framework (frameworkcode, frameworktext) VALUES
2
		('FA', 'Plantilla de carga rápida');
2
		('FA', 'Plantilla de carga rápida');
3
3
4
INSERT IGNORE INTO marc_tag_structure (tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, frameworkcode)
4
INSERT IGNORE INTO marc_tag_structure (tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, frameworkcode)
(-)a/installer/data/mysql/es-ES/marcflavour/marc21/optional/marc21_simple_bib_frameworks.sql (-9 / +9 lines)
Lines 6-12 Link Here
6
-- *******************************************************************
6
-- *******************************************************************
7
-- SIMPLE BOOKS KOHA RECORD AND HOLDINGS MANAGEMENT FIELDS/SUBFIELDS.
7
-- SIMPLE BOOKS KOHA RECORD AND HOLDINGS MANAGEMENT FIELDS/SUBFIELDS.
8
-- *******************************************************************
8
-- *******************************************************************
9
INSERT IGNORE INTO biblio_framework VALUES
9
INSERT IGNORE INTO biblio_framework (frameworkcode, frameworktext) VALUES
10
		( 'BKS', 'Libros' );
10
		( 'BKS', 'Libros' );
11
11
12
INSERT IGNORE INTO marc_tag_structure (
12
INSERT IGNORE INTO marc_tag_structure (
Lines 29-35 INSERT IGNORE INTO marc_subfield_structure ( Link Here
29
-- ****************************************************************************
29
-- ****************************************************************************
30
-- SIMPLE COMPUTER FILES KOHA RECORD AND HOLDINGS MANAGEMENT FIELDS/SUBFIELDS.
30
-- SIMPLE COMPUTER FILES KOHA RECORD AND HOLDINGS MANAGEMENT FIELDS/SUBFIELDS.
31
-- ****************************************************************************
31
-- ****************************************************************************
32
INSERT IGNORE INTO biblio_framework VALUES
32
INSERT IGNORE INTO biblio_framework (frameworkcode, frameworktext) VALUES
33
		( 'CF', 'CD-ROMs, DVD-ROMs, Recursos en línea' );
33
		( 'CF', 'CD-ROMs, DVD-ROMs, Recursos en línea' );
34
INSERT IGNORE INTO marc_tag_structure (
34
INSERT IGNORE INTO marc_tag_structure (
35
		tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, frameworkcode)
35
		tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, frameworkcode)
Lines 52-58 INSERT IGNORE INTO marc_subfield_structure ( Link Here
52
-- *****************************************************************************
52
-- *****************************************************************************
53
-- SIMPLE SOUND RECORDINGS KOHA RECORD AND HOLDINGS MANAGEMENT FIELDS/SUBFIELDS.
53
-- SIMPLE SOUND RECORDINGS KOHA RECORD AND HOLDINGS MANAGEMENT FIELDS/SUBFIELDS.
54
-- *****************************************************************************
54
-- *****************************************************************************
55
INSERT IGNORE INTO biblio_framework VALUES
55
INSERT IGNORE INTO biblio_framework (frameworkcode, frameworktext) VALUES
56
		( 'SR', 'Audio Casetes, CD' );
56
		( 'SR', 'Audio Casetes, CD' );
57
57
58
INSERT IGNORE INTO marc_tag_structure (
58
INSERT IGNORE INTO marc_tag_structure (
Lines 76-82 INSERT IGNORE INTO marc_subfield_structure ( Link Here
76
-- ****************************************************************************
76
-- ****************************************************************************
77
-- SIMPLE VIDEORECORDINGS KOHA RECORD AND HOLDINGS MANAGEMENT FIELDS/SUBFIELDS.
77
-- SIMPLE VIDEORECORDINGS KOHA RECORD AND HOLDINGS MANAGEMENT FIELDS/SUBFIELDS.
78
-- ****************************************************************************
78
-- ****************************************************************************
79
INSERT IGNORE INTO biblio_framework VALUES
79
INSERT IGNORE INTO biblio_framework (frameworkcode, frameworktext) VALUES
80
		( 'VR', 'DVDs, VHS' );
80
		( 'VR', 'DVDs, VHS' );
81
81
82
INSERT IGNORE INTO marc_tag_structure (
82
INSERT IGNORE INTO marc_tag_structure (
Lines 100-106 INSERT IGNORE INTO marc_subfield_structure ( Link Here
100
-- **************************************************************************
100
-- **************************************************************************
101
-- SIMPLE 3D ARTIFACTS KOHA RECORD AND HOLDINGS MANAGEMENT FIELDS/SUBFIELDS.
101
-- SIMPLE 3D ARTIFACTS KOHA RECORD AND HOLDINGS MANAGEMENT FIELDS/SUBFIELDS.
102
-- **************************************************************************
102
-- **************************************************************************
103
INSERT IGNORE INTO biblio_framework VALUES
103
INSERT IGNORE INTO biblio_framework (frameworkcode, frameworktext) VALUES
104
		( 'AR', 'Modelos' );
104
		( 'AR', 'Modelos' );
105
105
106
INSERT IGNORE INTO marc_tag_structure (
106
INSERT IGNORE INTO marc_tag_structure (
Lines 124-130 INSERT IGNORE INTO marc_subfield_structure ( Link Here
124
-- ******************************************************************
124
-- ******************************************************************
125
-- SIMPLE KITS KOHA RECORD AND HOLDINGS MANAGEMENT FIELDS/SUBFIELDS.
125
-- SIMPLE KITS KOHA RECORD AND HOLDINGS MANAGEMENT FIELDS/SUBFIELDS.
126
-- ******************************************************************
126
-- ******************************************************************
127
INSERT IGNORE INTO biblio_framework VALUES
127
INSERT IGNORE INTO biblio_framework (frameworkcode, frameworktext) VALUES
128
		( 'KT', 'Conjuntos' );
128
		( 'KT', 'Conjuntos' );
129
129
130
INSERT IGNORE INTO marc_tag_structure (
130
INSERT IGNORE INTO marc_tag_structure (
Lines 148-154 INSERT IGNORE INTO marc_subfield_structure ( Link Here
148
-- **********************************************************************************
148
-- **********************************************************************************
149
-- SIMPLE INTEGRATING RESOURCES KOHA RECORD AND HOLDINGS MANAGEMENT FIELDS/SUBFIELDS.
149
-- SIMPLE INTEGRATING RESOURCES KOHA RECORD AND HOLDINGS MANAGEMENT FIELDS/SUBFIELDS.
150
-- **********************************************************************************
150
-- **********************************************************************************
151
INSERT IGNORE INTO biblio_framework VALUES
151
INSERT IGNORE INTO biblio_framework (frameworkcode, frameworktext) VALUES
152
		( 'IR', 'Carpetas' );
152
		( 'IR', 'Carpetas' );
153
153
154
INSERT IGNORE INTO marc_tag_structure (
154
INSERT IGNORE INTO marc_tag_structure (
Lines 172-178 INSERT IGNORE INTO marc_subfield_structure ( Link Here
172
-- *********************************************************************
172
-- *********************************************************************
173
-- SIMPLE SERIALS KOHA RECORD AND HOLDINGS MANAGEMENT FIELDS/SUBFIELDS.
173
-- SIMPLE SERIALS KOHA RECORD AND HOLDINGS MANAGEMENT FIELDS/SUBFIELDS.
174
-- *********************************************************************
174
-- *********************************************************************
175
INSERT IGNORE INTO biblio_framework VALUES
175
INSERT IGNORE INTO biblio_framework (frameworkcode, frameworktext) VALUES
176
		( 'SER', 'Seriadas' );
176
		( 'SER', 'Seriadas' );
177
177
178
INSERT IGNORE INTO marc_tag_structure (
178
INSERT IGNORE INTO marc_tag_structure (
Lines 494-500 UPDATE marc_subfield_structure SET hidden = 9 WHERE tagfield = '942' AND tagsubf Link Here
494
UPDATE marc_subfield_structure SET hidden = 0 WHERE tagfield = '952' AND tagsubfield = '1' AND frameworkcode IN ('AR','BKS','CF','IR','KT','SER','SR','VR');
494
UPDATE marc_subfield_structure SET hidden = 0 WHERE tagfield = '952' AND tagsubfield = '1' AND frameworkcode IN ('AR','BKS','CF','IR','KT','SER','SR','VR');
495
495
496
-- Create the ACQ framework based on the default framework, fields 952 only
496
-- Create the ACQ framework based on the default framework, fields 952 only
497
INSERT IGNORE INTO biblio_framework VALUES( 'ACQ', 'Acquisition framework' );
497
INSERT IGNORE INTO biblio_framework (frameworkcode, frameworktext) VALUES( 'ACQ', 'Acquisition framework' );
498
INSERT INTO marc_tag_structure(tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, frameworkcode)
498
INSERT INTO marc_tag_structure(tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, frameworkcode)
499
SELECT tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, 'ACQ' FROM marc_tag_structure WHERE tagfield='952' AND frameworkcode='';
499
SELECT tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, 'ACQ' FROM marc_tag_structure WHERE tagfield='952' AND frameworkcode='';
500
500
(-)a/installer/data/mysql/fr-CA/marcflavour/marc21/facultatif/marc21_grille_simple.sql (-1 / +1 lines)
Lines 1-4 Link Here
1
INSERT IGNORE INTO biblio_framework VALUES
1
INSERT IGNORE INTO biblio_framework (frameworkcode, frameworktext) VALUES
2
		('SIMP', 'Grille simplifiée');
2
		('SIMP', 'Grille simplifiée');
3
3
4
INSERT IGNORE INTO marc_tag_structure (tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, frameworkcode)
4
INSERT IGNORE INTO marc_tag_structure (tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, frameworkcode)
(-)a/installer/data/mysql/fr-CA/marcflavour/marc21/obligatoire/marc21_sample_acq_framework.sql (-1 / +1 lines)
Lines 1-4 Link Here
1
INSERT IGNORE INTO biblio_framework VALUES
1
INSERT IGNORE INTO biblio_framework (frameworkcode, frameworktext) VALUES
2
		('ACQ', 'Grille d\'acquisitions');
2
		('ACQ', 'Grille d\'acquisitions');
3
3
4
INSERT IGNORE INTO marc_tag_structure (tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, frameworkcode)
4
INSERT IGNORE INTO marc_tag_structure (tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, frameworkcode)
(-)a/installer/data/mysql/fr-CA/marcflavour/marc21/obligatoire/marc21_sample_fastadd_framework.sql (-1 / +1 lines)
Lines 1-4 Link Here
1
INSERT IGNORE INTO biblio_framework VALUES
1
INSERT IGNORE INTO biblio_framework (frameworkcode, frameworktext) VALUES
2
		('FA', 'Grille d\'ajout rapide');
2
		('FA', 'Grille d\'ajout rapide');
3
3
4
INSERT IGNORE INTO marc_tag_structure (tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, frameworkcode)
4
INSERT IGNORE INTO marc_tag_structure (tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, frameworkcode)
(-)a/installer/data/mysql/fr-FR/marcflavour/marc21/Optionnel/marc21_simple_bib_frameworks.sql (-1 / +1 lines)
Lines 31488-31494 INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian` Link Here
31488
		('998', 'w', 'PLINK (RLIN)', 'PLINK (RLIN)', 0, 0, '', 9, '', '', '', 0, 5, 'SER', '', '', NULL);
31488
		('998', 'w', 'PLINK (RLIN)', 'PLINK (RLIN)', 0, 0, '', 9, '', '', '', 0, 5, 'SER', '', '', NULL);
31489
31489
31490
-- Create the ACQ framework based on the default framework, fields 995 only
31490
-- Create the ACQ framework based on the default framework, fields 995 only
31491
INSERT IGNORE INTO biblio_framework VALUES( 'ACQ', 'Acquisition framework' );
31491
INSERT IGNORE INTO biblio_framework (frameworkcode, frameworktext) VALUES( 'ACQ', 'Acquisition framework' );
31492
INSERT INTO marc_tag_structure(tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, frameworkcode)
31492
INSERT INTO marc_tag_structure(tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, frameworkcode)
31493
SELECT tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, 'ACQ' FROM marc_tag_structure WHERE tagfield='995' AND frameworkcode='';
31493
SELECT tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, 'ACQ' FROM marc_tag_structure WHERE tagfield='995' AND frameworkcode='';
31494
31494
(-)a/installer/data/mysql/fr-FR/marcflavour/unimarc_complet/Obligatoire/framework_DEFAULT.sql (-1 / +1 lines)
Lines 2138-2144 UPDATE `marc_subfield_structure` SET maxlength=24 WHERE tagfield='000'; Link Here
2138
UPDATE `marc_subfield_structure` SET maxlength=36 WHERE tagfield='100';
2138
UPDATE `marc_subfield_structure` SET maxlength=36 WHERE tagfield='100';
2139
2139
2140
-- Create the ACQ framework based on the default framework, fields 995 only
2140
-- Create the ACQ framework based on the default framework, fields 995 only
2141
INSERT IGNORE INTO biblio_framework VALUES( 'ACQ', 'Acquisition framework' );
2141
INSERT IGNORE INTO biblio_framework (frameworkcode, frameworktext) VALUES( 'ACQ', 'Acquisition framework' );
2142
INSERT INTO marc_tag_structure(tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, frameworkcode)
2142
INSERT INTO marc_tag_structure(tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, frameworkcode)
2143
SELECT tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, 'ACQ' FROM marc_tag_structure WHERE tagfield='995' AND frameworkcode='';
2143
SELECT tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, 'ACQ' FROM marc_tag_structure WHERE tagfield='995' AND frameworkcode='';
2144
2144
(-)a/installer/data/mysql/fr-FR/marcflavour/unimarc_lecture_pub/Obligatoire/framework_DEFAULT.sql (-1 / +1 lines)
Lines 7888-7894 UPDATE `marc_subfield_structure` SET maxlength=24 WHERE tagfield='000'; Link Here
7888
UPDATE `marc_subfield_structure` SET maxlength=36 WHERE tagfield='100';
7888
UPDATE `marc_subfield_structure` SET maxlength=36 WHERE tagfield='100';
7889
7889
7890
-- Create the ACQ framework based on the default framework, fields 995 only
7890
-- Create the ACQ framework based on the default framework, fields 995 only
7891
INSERT IGNORE INTO biblio_framework VALUES( 'ACQ', 'Acquisition framework' );
7891
INSERT IGNORE INTO biblio_framework (frameworkcode, frameworktext) VALUES( 'ACQ', 'Acquisition framework' );
7892
INSERT INTO marc_tag_structure(tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, frameworkcode)
7892
INSERT INTO marc_tag_structure(tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, frameworkcode)
7893
SELECT tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, 'ACQ' FROM marc_tag_structure WHERE tagfield='995' AND frameworkcode='';
7893
SELECT tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, 'ACQ' FROM marc_tag_structure WHERE tagfield='995' AND frameworkcode='';
7894
7894
(-)a/installer/data/mysql/it-IT/marcflavour/marc21/optional/marc21_sample_fastadd_framework.sql (-1 / +1 lines)
Lines 1-4 Link Here
1
INSERT IGNORE INTO biblio_framework VALUES
1
INSERT IGNORE INTO biblio_framework (frameworkcode, frameworktext) VALUES
2
		('FA', 'Cat. veloce');
2
		('FA', 'Cat. veloce');
3
3
4
INSERT IGNORE INTO marc_tag_structure (tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, frameworkcode)
4
INSERT IGNORE INTO marc_tag_structure (tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, frameworkcode)
(-)a/installer/data/mysql/it-IT/marcflavour/marc21/optional/marc21_simple_bib_frameworks.sql (-9 / +9 lines)
Lines 6-12 Link Here
6
-- *******************************************************************
6
-- *******************************************************************
7
-- SIMPLE BOOKS KOHA RECORD AND HOLDINGS MANAGEMENT FIELDS/SUBFIELDS.
7
-- SIMPLE BOOKS KOHA RECORD AND HOLDINGS MANAGEMENT FIELDS/SUBFIELDS.
8
-- *******************************************************************
8
-- *******************************************************************
9
INSERT IGNORE INTO biblio_framework VALUES
9
INSERT IGNORE INTO biblio_framework (frameworkcode, frameworktext) VALUES
10
		( 'BKS', 'Libri' );
10
		( 'BKS', 'Libri' );
11
11
12
INSERT IGNORE INTO marc_tag_structure (
12
INSERT IGNORE INTO marc_tag_structure (
Lines 29-35 INSERT IGNORE INTO marc_subfield_structure ( Link Here
29
-- ****************************************************************************
29
-- ****************************************************************************
30
-- SIMPLE COMPUTER FILES KOHA RECORD AND HOLDINGS MANAGEMENT FIELDS/SUBFIELDS.
30
-- SIMPLE COMPUTER FILES KOHA RECORD AND HOLDINGS MANAGEMENT FIELDS/SUBFIELDS.
31
-- ****************************************************************************
31
-- ****************************************************************************
32
INSERT IGNORE INTO biblio_framework VALUES
32
INSERT IGNORE INTO biblio_framework (frameworkcode, frameworktext) VALUES
33
		( 'CF', 'Risorse elettroniche' );
33
		( 'CF', 'Risorse elettroniche' );
34
INSERT IGNORE INTO marc_tag_structure (
34
INSERT IGNORE INTO marc_tag_structure (
35
		tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, frameworkcode)
35
		tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, frameworkcode)
Lines 52-58 INSERT IGNORE INTO marc_subfield_structure ( Link Here
52
-- *****************************************************************************
52
-- *****************************************************************************
53
-- SIMPLE SOUND RECORDINGS KOHA RECORD AND HOLDINGS MANAGEMENT FIELDS/SUBFIELDS.
53
-- SIMPLE SOUND RECORDINGS KOHA RECORD AND HOLDINGS MANAGEMENT FIELDS/SUBFIELDS.
54
-- *****************************************************************************
54
-- *****************************************************************************
55
INSERT IGNORE INTO biblio_framework VALUES
55
INSERT IGNORE INTO biblio_framework (frameworkcode, frameworktext) VALUES
56
		( 'SR', 'CD e cassette audio' );
56
		( 'SR', 'CD e cassette audio' );
57
57
58
INSERT IGNORE INTO marc_tag_structure (
58
INSERT IGNORE INTO marc_tag_structure (
Lines 76-82 INSERT IGNORE INTO marc_subfield_structure ( Link Here
76
-- ****************************************************************************
76
-- ****************************************************************************
77
-- SIMPLE VIDEORECORDINGS KOHA RECORD AND HOLDINGS MANAGEMENT FIELDS/SUBFIELDS.
77
-- SIMPLE VIDEORECORDINGS KOHA RECORD AND HOLDINGS MANAGEMENT FIELDS/SUBFIELDS.
78
-- ****************************************************************************
78
-- ****************************************************************************
79
INSERT IGNORE INTO biblio_framework VALUES
79
INSERT IGNORE INTO biblio_framework (frameworkcode, frameworktext) VALUES
80
		( 'VR', 'DVD, VHS' );
80
		( 'VR', 'DVD, VHS' );
81
81
82
INSERT IGNORE INTO marc_tag_structure (
82
INSERT IGNORE INTO marc_tag_structure (
Lines 100-106 INSERT IGNORE INTO marc_subfield_structure ( Link Here
100
-- **************************************************************************
100
-- **************************************************************************
101
-- SIMPLE 3D ARTIFACTS KOHA RECORD AND HOLDINGS MANAGEMENT FIELDS/SUBFIELDS.
101
-- SIMPLE 3D ARTIFACTS KOHA RECORD AND HOLDINGS MANAGEMENT FIELDS/SUBFIELDS.
102
-- **************************************************************************
102
-- **************************************************************************
103
INSERT IGNORE INTO biblio_framework VALUES
103
INSERT IGNORE INTO biblio_framework (frameworkcode, frameworktext) VALUES
104
		( 'AR', 'Modelli' );
104
		( 'AR', 'Modelli' );
105
105
106
INSERT IGNORE INTO marc_tag_structure (
106
INSERT IGNORE INTO marc_tag_structure (
Lines 124-130 INSERT IGNORE INTO marc_subfield_structure ( Link Here
124
-- ******************************************************************
124
-- ******************************************************************
125
-- SIMPLE KITS KOHA RECORD AND HOLDINGS MANAGEMENT FIELDS/SUBFIELDS.
125
-- SIMPLE KITS KOHA RECORD AND HOLDINGS MANAGEMENT FIELDS/SUBFIELDS.
126
-- ******************************************************************
126
-- ******************************************************************
127
INSERT IGNORE INTO biblio_framework VALUES
127
INSERT IGNORE INTO biblio_framework (frameworkcode, frameworktext) VALUES
128
		( 'KT', 'Kits' );
128
		( 'KT', 'Kits' );
129
129
130
INSERT IGNORE INTO marc_tag_structure (
130
INSERT IGNORE INTO marc_tag_structure (
Lines 148-154 INSERT IGNORE INTO marc_subfield_structure ( Link Here
148
-- **********************************************************************************
148
-- **********************************************************************************
149
-- SIMPLE INTEGRATING RESOURCES KOHA RECORD AND HOLDINGS MANAGEMENT FIELDS/SUBFIELDS.
149
-- SIMPLE INTEGRATING RESOURCES KOHA RECORD AND HOLDINGS MANAGEMENT FIELDS/SUBFIELDS.
150
-- **********************************************************************************
150
-- **********************************************************************************
151
INSERT IGNORE INTO biblio_framework VALUES
151
INSERT IGNORE INTO biblio_framework (frameworkcode, frameworktext) VALUES
152
		( 'IR', 'Raccolte' );
152
		( 'IR', 'Raccolte' );
153
153
154
INSERT IGNORE INTO marc_tag_structure (
154
INSERT IGNORE INTO marc_tag_structure (
Lines 172-178 INSERT IGNORE INTO marc_subfield_structure ( Link Here
172
-- *********************************************************************
172
-- *********************************************************************
173
-- SIMPLE SERIALS KOHA RECORD AND HOLDINGS MANAGEMENT FIELDS/SUBFIELDS.
173
-- SIMPLE SERIALS KOHA RECORD AND HOLDINGS MANAGEMENT FIELDS/SUBFIELDS.
174
-- *********************************************************************
174
-- *********************************************************************
175
INSERT IGNORE INTO biblio_framework VALUES
175
INSERT IGNORE INTO biblio_framework (frameworkcode, frameworktext) VALUES
176
		( 'SER', 'Seriali' );
176
		( 'SER', 'Seriali' );
177
177
178
INSERT IGNORE INTO marc_tag_structure (
178
INSERT IGNORE INTO marc_tag_structure (
Lines 494-500 UPDATE marc_subfield_structure SET hidden = 9 WHERE tagfield = '942' AND tagsubf Link Here
494
UPDATE marc_subfield_structure SET hidden = 0 WHERE tagfield = '952' AND tagsubfield = '1' AND frameworkcode IN ('AR','BKS','CF','IR','KT','SER','SR','VR');
494
UPDATE marc_subfield_structure SET hidden = 0 WHERE tagfield = '952' AND tagsubfield = '1' AND frameworkcode IN ('AR','BKS','CF','IR','KT','SER','SR','VR');
495
495
496
-- Create the ACQ framework based on the default framework, fields 952 only
496
-- Create the ACQ framework based on the default framework, fields 952 only
497
INSERT IGNORE INTO biblio_framework VALUES( 'ACQ', 'Acquisition framework' );
497
INSERT IGNORE INTO biblio_framework (frameworkcode, frameworktext) VALUES( 'ACQ', 'Acquisition framework' );
498
INSERT INTO marc_tag_structure(tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, frameworkcode)
498
INSERT INTO marc_tag_structure(tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, frameworkcode)
499
SELECT tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, 'ACQ' FROM marc_tag_structure WHERE tagfield='952' AND frameworkcode='';
499
SELECT tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, 'ACQ' FROM marc_tag_structure WHERE tagfield='952' AND frameworkcode='';
500
500
(-)a/installer/data/mysql/kohastructure.sql (-2 / +51 lines)
Lines 152-157 DROP TABLE IF EXISTS `biblio_framework`; Link Here
152
CREATE TABLE `biblio_framework` ( -- information about MARC frameworks
152
CREATE TABLE `biblio_framework` ( -- information about MARC frameworks
153
  `frameworkcode` varchar(4) NOT NULL default '', -- the unique code assigned to the framework
153
  `frameworkcode` varchar(4) NOT NULL default '', -- the unique code assigned to the framework
154
  `frameworktext` varchar(255) NOT NULL default '', -- the description/name given to the framework
154
  `frameworktext` varchar(255) NOT NULL default '', -- the description/name given to the framework
155
  `frameworktype` ENUM( 'bib', 'hld' ) NOT NULL DEFAULT 'bib', -- Framework type: biblio or holdings
155
  PRIMARY KEY  (`frameworkcode`)
156
  PRIMARY KEY  (`frameworkcode`)
156
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
157
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
157
158
Lines 668-673 CREATE TABLE `deleteditems` ( Link Here
668
  `copynumber` varchar(32) default NULL, -- copy number (MARC21 952$t)
669
  `copynumber` varchar(32) default NULL, -- copy number (MARC21 952$t)
669
  `stocknumber` varchar(32) default NULL, -- inventory number (MARC21 952$i)
670
  `stocknumber` varchar(32) default NULL, -- inventory number (MARC21 952$i)
670
  `new_status` VARCHAR(32) DEFAULT NULL, -- 'new' value, you can put whatever free-text information. This field is intented to be managed by the automatic_item_modification_by_age cronjob.
671
  `new_status` VARCHAR(32) DEFAULT NULL, -- 'new' value, you can put whatever free-text information. This field is intented to be managed by the automatic_item_modification_by_age cronjob.
672
  `holding_id` int(11) default NULL, -- foreign key from holdings table used to link this item to the right holdings record
671
  PRIMARY KEY  (`itemnumber`),
673
  PRIMARY KEY  (`itemnumber`),
672
  KEY `delitembarcodeidx` (`barcode`),
674
  KEY `delitembarcodeidx` (`barcode`),
673
  KEY `delitemstocknumberidx` (`stocknumber`),
675
  KEY `delitemstocknumberidx` (`stocknumber`),
Lines 879-889 CREATE TABLE `refund_lost_item_fee_rules` ( -- refund lost item fee rules tbale Link Here
879
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
881
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
880
882
881
--
883
--
884
-- Table structure for table `holdings`
885
--
886
887
DROP TABLE IF EXISTS `holdings`;
888
CREATE TABLE `holdings` ( -- table that stores summary holdings information
889
  `holding_id` int(11) NOT NULL auto_increment, -- unique identifier assigned to each holdings record
890
  `biblionumber` int(11) NOT NULL default 0, -- foreign key from biblio table used to link this record to the right bib record
891
  `biblioitemnumber` int(11) NOT NULL default 0, -- foreign key from the biblioitems table to link record to additional information
892
  `frameworkcode` varchar(4) NOT NULL default '', -- foreign key from the biblio_framework table to identify which framework was used in cataloging this record
893
  `holdingbranch` varchar(10) default NULL, -- foreign key from the branches table for the library that owns this record (MARC21 852$a)
894
  `location` varchar(80) default NULL, -- authorized value for the shelving location for this record (MARC21 852$b)
895
  `callnumber` varchar(255) default NULL, -- call number (852$h+$i in MARC21)
896
  `suppress` tinyint(1) default NULL, -- Boolean indicating whether the record is suppressed in OPAC
897
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- date and time this record was last touched
898
  `datecreated` DATE NOT NULL, -- the date this record was added to Koha
899
	`deleted_at` DATETIME DEFAULT NULL, -- the date this record was deleted
900
  PRIMARY KEY  (`holding_id`),
901
  KEY `hldnoidx` (`holding_id`),
902
  KEY `hldbinoidx` (`biblioitemnumber`),
903
  KEY `hldbibnoidx` (`biblionumber`),
904
  CONSTRAINT `holdings_ibfk_1` FOREIGN KEY (`biblionumber`) REFERENCES `biblio` (`biblionumber`) ON DELETE CASCADE ON UPDATE CASCADE,
905
  CONSTRAINT `holdings_ibfk_2` FOREIGN KEY (`biblioitemnumber`) REFERENCES `biblioitems` (`biblioitemnumber`) ON DELETE CASCADE ON UPDATE CASCADE,
906
  CONSTRAINT `holdings_ibfk_3` FOREIGN KEY (`holdingbranch`) REFERENCES `branches` (`branchcode`) ON UPDATE CASCADE
907
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
908
909
--
910
-- Table structure for table `holdings_metadata`
911
--
912
913
DROP TABLE IF EXISTS `holdings_metadata`;
914
CREATE TABLE holdings_metadata (
915
  `id` INT(11) NOT NULL AUTO_INCREMENT,
916
  `holding_id` INT(11) NOT NULL,
917
  `format` VARCHAR(16) NOT NULL,
918
  `marcflavour` VARCHAR(16) NOT NULL,
919
  `metadata` LONGTEXT NOT NULL,
920
	`deleted_at` DATETIME DEFAULT NULL, -- the date this record was deleted
921
  PRIMARY KEY(id),
922
  UNIQUE KEY `holdings_metadata_uniq_key` (`holding_id`,`format`,`marcflavour`),
923
  KEY `hldnoidx` (`holding_id`),
924
  CONSTRAINT `holdings_metadata_fk_1` FOREIGN KEY (`holding_id`) REFERENCES `holdings` (`holding_id`) ON DELETE CASCADE ON UPDATE CASCADE
925
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
926
927
--
882
-- Table structure for table `items`
928
-- Table structure for table `items`
883
--
929
--
884
930
885
DROP TABLE IF EXISTS `items`;
931
DROP TABLE IF EXISTS `items`;
886
CREATE TABLE `items` ( -- holdings/item information
932
CREATE TABLE `items` ( -- item information
887
  `itemnumber` int(11) NOT NULL auto_increment, -- primary key and unique identifier added by Koha
933
  `itemnumber` int(11) NOT NULL auto_increment, -- primary key and unique identifier added by Koha
888
  `biblionumber` int(11) NOT NULL default 0, -- foreign key from biblio table used to link this item to the right bib record
934
  `biblionumber` int(11) NOT NULL default 0, -- foreign key from biblio table used to link this item to the right bib record
889
  `biblioitemnumber` int(11) NOT NULL default 0, -- foreign key from the biblioitems table to link to item to additional information
935
  `biblioitemnumber` int(11) NOT NULL default 0, -- foreign key from the biblioitems table to link to item to additional information
Lines 929-934 CREATE TABLE `items` ( -- holdings/item information Link Here
929
  `copynumber` varchar(32) default NULL, -- copy number (MARC21 952$t)
975
  `copynumber` varchar(32) default NULL, -- copy number (MARC21 952$t)
930
  `stocknumber` varchar(32) default NULL, -- inventory number (MARC21 952$i)
976
  `stocknumber` varchar(32) default NULL, -- inventory number (MARC21 952$i)
931
  `new_status` VARCHAR(32) DEFAULT NULL, -- 'new' value, you can put whatever free-text information. This field is intented to be managed by the automatic_item_modification_by_age cronjob.
977
  `new_status` VARCHAR(32) DEFAULT NULL, -- 'new' value, you can put whatever free-text information. This field is intented to be managed by the automatic_item_modification_by_age cronjob.
978
  `holding_id` int(11) default NULL, -- foreign key from holdings table used to link this item to the right holdings record
932
  PRIMARY KEY  (`itemnumber`),
979
  PRIMARY KEY  (`itemnumber`),
933
  UNIQUE KEY `itembarcodeidx` (`barcode`),
980
  UNIQUE KEY `itembarcodeidx` (`barcode`),
934
  KEY `itemstocknumberidx` (`stocknumber`),
981
  KEY `itemstocknumberidx` (`stocknumber`),
Lines 941-950 CREATE TABLE `items` ( -- holdings/item information Link Here
941
  KEY `items_ccode` (`ccode`),
988
  KEY `items_ccode` (`ccode`),
942
  KEY `itype_idx` (`itype`),
989
  KEY `itype_idx` (`itype`),
943
  KEY `timestamp` (`timestamp`),
990
  KEY `timestamp` (`timestamp`),
991
  KEY `hldid_idx` (`holding_id`),
944
  CONSTRAINT `items_ibfk_1` FOREIGN KEY (`biblioitemnumber`) REFERENCES `biblioitems` (`biblioitemnumber`) ON DELETE CASCADE ON UPDATE CASCADE,
992
  CONSTRAINT `items_ibfk_1` FOREIGN KEY (`biblioitemnumber`) REFERENCES `biblioitems` (`biblioitemnumber`) ON DELETE CASCADE ON UPDATE CASCADE,
945
  CONSTRAINT `items_ibfk_2` FOREIGN KEY (`homebranch`) REFERENCES `branches` (`branchcode`) ON UPDATE CASCADE,
993
  CONSTRAINT `items_ibfk_2` FOREIGN KEY (`homebranch`) REFERENCES `branches` (`branchcode`) ON UPDATE CASCADE,
946
  CONSTRAINT `items_ibfk_3` FOREIGN KEY (`holdingbranch`) REFERENCES `branches` (`branchcode`) ON UPDATE CASCADE,
994
  CONSTRAINT `items_ibfk_3` FOREIGN KEY (`holdingbranch`) REFERENCES `branches` (`branchcode`) ON UPDATE CASCADE,
947
  CONSTRAINT `items_ibfk_4` FOREIGN KEY (`biblionumber`) REFERENCES `biblio` (`biblionumber`) ON DELETE CASCADE ON UPDATE CASCADE
995
  CONSTRAINT `items_ibfk_4` FOREIGN KEY (`biblionumber`) REFERENCES `biblio` (`biblionumber`) ON DELETE CASCADE ON UPDATE CASCADE,
996
  CONSTRAINT `items_ibfk_5` FOREIGN KEY (`holding_id`) REFERENCES `holdings` (`holding_id`) ON DELETE CASCADE ON UPDATE CASCADE
948
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
997
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
949
998
950
--
999
--
(-)a/installer/data/mysql/mandatory/auth_val_cat.sql (+1 lines)
Lines 18-23 INSERT IGNORE INTO authorised_value_categories( category_name ) Link Here
18
INSERT IGNORE INTO authorised_value_categories( category_name )
18
INSERT IGNORE INTO authorised_value_categories( category_name )
19
    VALUES
19
    VALUES
20
    ('branches'),
20
    ('branches'),
21
    ('holdings'),
21
    ('itemtypes'),
22
    ('itemtypes'),
22
    ('cn_source');
23
    ('cn_source');
23
24
(-)a/installer/data/mysql/nb-NO/marcflavour/marc21/optional/marc21_sample_fastadd_framework.sql (-1 / +1 lines)
Lines 1-4 Link Here
1
INSERT IGNORE INTO biblio_framework VALUES ( 'FA','Fast Add Framework' );
1
INSERT IGNORE INTO biblio_framework (frameworkcode, frameworktext) VALUES ( 'FA','Fast Add Framework' );
2
INSERT IGNORE INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeatable`, `mandatory`, `authorised_value`, `frameworkcode`) VALUES
2
INSERT IGNORE INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeatable`, `mandatory`, `authorised_value`, `frameworkcode`) VALUES
3
                ('000', 'LEADER', 'LEADER', 0, 1, '', 'FA'),
3
                ('000', 'LEADER', 'LEADER', 0, 1, '', 'FA'),
4
                ('008', 'FIXED-LENGTH DATA ELEMENTS--GENERAL INFORMATION', 'FIXED-LENGTH DATA ELEMENTS--GENERAL INFORMATION', 0, 1, '', 'FA'),
4
                ('008', 'FIXED-LENGTH DATA ELEMENTS--GENERAL INFORMATION', 'FIXED-LENGTH DATA ELEMENTS--GENERAL INFORMATION', 0, 1, '', 'FA'),
(-)a/installer/data/mysql/nb-NO/marcflavour/marc21/optional/marc21_simple_bib_frameworks.sql (-1 / +1 lines)
Lines 31480-31486 INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian` Link Here
31480
		('998', 'w', 'PLINK (RLIN)', 'PLINK (RLIN)', 0, 0, '', 9, '', '', '', 0, 5, 'SER', '', '', NULL);
31480
		('998', 'w', 'PLINK (RLIN)', 'PLINK (RLIN)', 0, 0, '', 9, '', '', '', 0, 5, 'SER', '', '', NULL);
31481
31481
31482
-- Create the ACQ framework based on the default framework, fields 952 only
31482
-- Create the ACQ framework based on the default framework, fields 952 only
31483
INSERT IGNORE INTO biblio_framework VALUES( 'ACQ', 'Acquisition framework' );
31483
INSERT IGNORE INTO biblio_framework (frameworkcode, frameworktext) VALUES( 'ACQ', 'Acquisition framework' );
31484
INSERT INTO marc_tag_structure(tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, frameworkcode)
31484
INSERT INTO marc_tag_structure(tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, frameworkcode)
31485
SELECT tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, 'ACQ' FROM marc_tag_structure WHERE tagfield='952' AND frameworkcode='';
31485
SELECT tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, 'ACQ' FROM marc_tag_structure WHERE tagfield='952' AND frameworkcode='';
31486
31486
(-)a/installer/data/mysql/nb-NO/marcflavour/normarc/Valgfritt/normarc_fastadd_framework.sql (-1 / +1 lines)
Lines 15-21 Link Here
15
-- with this program; if not, write to the Free Software Foundation, Inc.,
15
-- with this program; if not, write to the Free Software Foundation, Inc.,
16
-- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16
-- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17
17
18
INSERT IGNORE INTO biblio_framework VALUES ( 'FA','Hurtigkatalogisering' );
18
INSERT IGNORE INTO biblio_framework (frameworkcode, frameworktext) VALUES ( 'FA','Hurtigkatalogisering' );
19
19
20
DELETE FROM marc_tag_structure WHERE frameworkcode='FA';
20
DELETE FROM marc_tag_structure WHERE frameworkcode='FA';
21
INSERT INTO marc_tag_structure (tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value,frameworkcode) VALUES ('000','Postens hode','Postens hode','0','1','','FA');
21
INSERT INTO marc_tag_structure (tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value,frameworkcode) VALUES ('000','Postens hode','Postens hode','0','1','','FA');
(-)a/installer/data/mysql/pl-PL/marcflavour/marc21/optional/marc21_sample_fastadd_framework.sql (-1 / +1 lines)
Lines 1-4 Link Here
1
INSERT IGNORE INTO biblio_framework VALUES ( 'FA','Fast Add Framework' );
1
INSERT IGNORE INTO biblio_framework (frameworkcode, frameworktext) VALUES ( 'FA','Fast Add Framework' );
2
INSERT IGNORE INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeatable`, `mandatory`, `authorised_value`, `frameworkcode`) VALUES
2
INSERT IGNORE INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeatable`, `mandatory`, `authorised_value`, `frameworkcode`) VALUES
3
                ('000', 'LEADER', 'LEADER', 0, 1, '', 'FA'),
3
                ('000', 'LEADER', 'LEADER', 0, 1, '', 'FA'),
4
                ('008', 'FIXED-LENGTH DATA ELEMENTS--GENERAL INFORMATION', 'FIXED-LENGTH DATA ELEMENTS--GENERAL INFORMATION', 0, 1, '', 'FA'),
4
                ('008', 'FIXED-LENGTH DATA ELEMENTS--GENERAL INFORMATION', 'FIXED-LENGTH DATA ELEMENTS--GENERAL INFORMATION', 0, 1, '', 'FA'),
(-)a/installer/data/mysql/ru-RU/marcflavour/unimarc/mandatory/unimarc_bibliographic_DEFAULT_general.sql (-1 / +1 lines)
Lines 2212-2218 INSERT INTO marc_subfield_structure (frameworkcode, authtypecode, tagfield, tag Link Here
2212
 ('', '', '899', 'z', 0, 1, 'Публикуемое примечание', 'Публикуемое примечание', 8, 0, '', '', '', 0, NULL, '', '');
2212
 ('', '', '899', 'z', 0, 1, 'Публикуемое примечание', 'Публикуемое примечание', 8, 0, '', '', '', 0, NULL, '', '');
2213
2213
2214
-- Create the ACQ framework based on the default framework, fields 995 only
2214
-- Create the ACQ framework based on the default framework, fields 995 only
2215
INSERT IGNORE INTO biblio_framework VALUES( 'ACQ', 'Acquisition framework' );
2215
INSERT IGNORE INTO biblio_framework (frameworkcode, frameworktext) VALUES( 'ACQ', 'Acquisition framework' );
2216
INSERT INTO marc_tag_structure(tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, frameworkcode)
2216
INSERT INTO marc_tag_structure(tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, frameworkcode)
2217
SELECT tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, 'ACQ' FROM marc_tag_structure WHERE tagfield='995' AND frameworkcode='';
2217
SELECT tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, 'ACQ' FROM marc_tag_structure WHERE tagfield='995' AND frameworkcode='';
2218
2218
(-)a/installer/data/mysql/uk-UA/marcflavour/marc21/mandatory/marc21_bibliographic_DEFAULT_general.sql (-1 / +1 lines)
Lines 4222-4228 INSERT INTO marc_subfield_structure (frameworkcode, authtypecode, tagfield, tag Link Here
4222
 ('', '', '899', 'v', 0, 0, 'Позначення та номер тому / порядкове позначення', '', 8, 5, '', '', '', NULL, '', '', NULL);
4222
 ('', '', '899', 'v', 0, 0, 'Позначення та номер тому / порядкове позначення', '', 8, 5, '', '', '', NULL, '', '', NULL);
4223
4223
4224
-- Create the ACQ framework based on the default framework, fields 952 only
4224
-- Create the ACQ framework based on the default framework, fields 952 only
4225
INSERT IGNORE INTO biblio_framework VALUES( 'ACQ', 'Acquisition framework' );
4225
INSERT IGNORE INTO biblio_framework (frameworkcode, frameworktext) VALUES( 'ACQ', 'Acquisition framework' );
4226
INSERT INTO marc_tag_structure(tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, frameworkcode)
4226
INSERT INTO marc_tag_structure(tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, frameworkcode)
4227
SELECT tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, 'ACQ' FROM marc_tag_structure WHERE tagfield='952' AND frameworkcode='';
4227
SELECT tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, 'ACQ' FROM marc_tag_structure WHERE tagfield='952' AND frameworkcode='';
4228
4228
(-)a/installer/data/mysql/uk-UA/marcflavour/unimarc/mandatory/unimarc_bibliographic_DEFAULT_general.sql (-1 / +1 lines)
Lines 2214-2220 INSERT INTO marc_subfield_structure (frameworkcode, authtypecode, tagfield, tag Link Here
2214
 ('', '', '886', 'b', 1, 0, 'Індикатори та підполя вихідного формату', '', -1, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL);
2214
 ('', '', '886', 'b', 1, 0, 'Індикатори та підполя вихідного формату', '', -1, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL);
2215
2215
2216
-- Create the ACQ framework based on the default framework, fields 995 only
2216
-- Create the ACQ framework based on the default framework, fields 995 only
2217
INSERT IGNORE INTO biblio_framework VALUES( 'ACQ', 'Acquisition framework' );
2217
INSERT IGNORE INTO biblio_framework (frameworkcode, frameworktext) VALUES( 'ACQ', 'Acquisition framework' );
2218
INSERT INTO marc_tag_structure(tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, frameworkcode)
2218
INSERT INTO marc_tag_structure(tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, frameworkcode)
2219
SELECT tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, 'ACQ' FROM marc_tag_structure WHERE tagfield='995' AND frameworkcode='';
2219
SELECT tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, 'ACQ' FROM marc_tag_structure WHERE tagfield='995' AND frameworkcode='';
2220
2220
(-)a/koha-tmpl/intranet-tmpl/prog/css/addholding.css (+171 lines)
Line 0 Link Here
1
#addholdingtabs {
2
	margin-top : 1em;
3
}
4
5
#addholdingtabs .ui-tabs-panel {
6
	float : left;
7
}
8
9
.buttonPlus {
10
	font-weight : bold;
11
	text-decoration : none;
12
}
13
14
.buttonMinus {
15
	font-weight : bold;
16
	text-decoration : none;
17
}
18
19
a.expandfield {
20
	text-decoration : none;
21
}
22
23
#authoritytabs {
24
	margin-top : 1em;
25
	margin-bottom : 1em;
26
}
27
28
.toptabs .ui-tabs-nav li a {
29
	padding : .2em 1.2em;
30
}
31
32
div.tag {
33
    clear: both;
34
}
35
36
div.subfield_line {
37
    padding-bottom: .3em;
38
    float: left;
39
    clear: left;
40
    width: 100%;
41
}
42
43
div.subfield_line label {
44
    font-size:89%;
45
    float: left;
46
	 padding-right : .4em;
47
    width: 16em;
48
    text-align: left;
49
    clear:left;
50
}
51
52
.subfieldcode img {
53
    cursor: pointer;
54
}
55
56
.tag_title {
57
	font-size : 90%;
58
	padding : .2em 0;
59
}
60
61
.tagnum {
62
	font-size : 110%;
63
	font-weight : bold;
64
	color : #000;
65
	padding : .1em .3em .1em 0;
66
}
67
68
a.tagnum {
69
	font-size : 110%;
70
	font-weight : bold;
71
	color : #000;
72
	padding : .1em .3em .1em 0;
73
	text-decoration : none;
74
}
75
76
.subfield {
77
	color : #00698a;
78
	float: left;
79
	width: 10em;
80
	text-align:right;
81
}
82
83
.subfieldcode {
84
	display: block;
85
	float: left;
86
}
87
88
.labelsubfield {
89
	float:left;
90
}
91
92
.input_marceditor {
93
	float:left;
94
	width:30em;
95
}
96
97
.indicator {
98
    width: 1em;
99
    box-sizing: content-box;
100
}
101
102
*html .input_marceditor {
103
	width : 15em;
104
}
105
106
#cataloguing_additem_newitem fieldset.rows label, #cataloguing_additem_newitem fieldset.rows span.label {
107
	font-size : 100%;
108
	width : 25%;
109
}
110
111
#cataloguing_additem_newitem fieldset.rows li {
112
	padding-bottom : 3px;
113
}
114
#cataloguing_additem_newitem .input_marceditor {
115
	width : auto;
116
}
117
118
#cataloguing_additem_newitem textarea.input_marceditor {
119
     width : 31em;
120
}
121
122
.mandatory_marker {
123
	color: red;
124
}
125
.linktools { display: block; white-space: nowrap; }
126
.linktools a { font-size : 75%; display:block;text-decoration:none;}
127
.linktools a {margin:0 2px;padding:2px;background-color:#FFF;text-align:center; }
128
.linktools a:first-child { border-bottom: 1px solid #DDD; }
129
.linktools a:hover { background-color: #FFC; }
130
.subfield_controls { margin : 0 .5em; }
131
.readonly { border-width : 1px; border-style: inset; padding-left : 15px; background: #EEE url(../img/locked.png) center left no-repeat; width:29em; }
132
133
#cataloguing_additem_itemlist {
134
	margin-bottom : 1em;
135
}
136
.yui-gf div.first {
137
	width : 19%;
138
}
139
140
.yui-gf .yui-u {
141
	width: 79.2%;
142
}
143
144
tbody tr.active:nth-child(2n+1) td,
145
tbody tr.active td {
146
    background-color: #FFFFCC;
147
}
148
149
#loading {
150
    background-color: #FFF;
151
    cursor: wait;
152
    height: 100%;
153
    left: 0;
154
    opacity: .7;
155
    position: fixed;
156
    top: 0;
157
    width: 100%;
158
    z-index: 1000;
159
}
160
#loading div {
161
    background : transparent url(../img/loading.gif) top left no-repeat;
162
    font-size : 175%;
163
    font-weight: bold;
164
    height: 2em;
165
    left: 50%;
166
    margin: -1em 0 0 -2.5em;
167
    padding-left : 50px;
168
    position: absolute;
169
    top: 50%;
170
    width: 15em;
171
}
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc (+4 lines)
Lines 10-15 CAN_user_serials_create_subscription ) %] Link Here
10
             <li><a id="newbiblio" href="/cgi-bin/koha/cataloguing/addbiblio.pl">New record</a></li>
10
             <li><a id="newbiblio" href="/cgi-bin/koha/cataloguing/addbiblio.pl">New record</a></li>
11
            [% END %]
11
            [% END %]
12
12
13
            [% IF show_summary_holdings and CAN_user_editcatalogue_edit_items %]
14
            <li><a id="newholding" href="/cgi-bin/koha/cataloguing/addholding.pl?biblionumber=[% biblionumber %]#addholding">New holding</a></li>
15
            [% END %]
16
13
            [% IF ( CAN_user_editcatalogue_edit_items ) %]
17
            [% IF ( CAN_user_editcatalogue_edit_items ) %]
14
             <li><a id="newitem" href="/cgi-bin/koha/cataloguing/additem.pl?biblionumber=[% biblionumber %]#additema">New item</a></li>
18
             <li><a id="newitem" href="/cgi-bin/koha/cataloguing/additem.pl?biblionumber=[% biblionumber %]#additema">New item</a></li>
15
            [% END %]
19
            [% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/biblio_framework.tt (-5 / +17 lines)
Lines 63-69 Link Here
63
[% END %]
63
[% END %]
64
64
65
[% IF op == 'add_form' %]
65
[% IF op == 'add_form' %]
66
    <h1>[% IF framework %]Modify framework text[% ELSE %]Add framework[% END %]</h1>
66
    <h1>[% IF framework %]Modify framework[% ELSE %]Add framework[% END %]</h1>
67
    <form action="/cgi-bin/koha/admin/biblio_framework.pl" name="Aform" method="post" class="validated">
67
    <form action="/cgi-bin/koha/admin/biblio_framework.pl" name="Aform" method="post" class="validated">
68
        <input type="hidden" name="op" value="add_validate" />
68
        <input type="hidden" name="op" value="add_validate" />
69
        <fieldset class="rows">
69
        <fieldset class="rows">
Lines 86-91 Link Here
86
                    <input type="text" name="frameworktext" id="description" size="40" maxlength="80" value="[% framework.frameworktext |html %]" required="required" class="required" />
86
                    <input type="text" name="frameworktext" id="description" size="40" maxlength="80" value="[% framework.frameworktext |html %]" required="required" class="required" />
87
                    <span class="required">Required</span>
87
                    <span class="required">Required</span>
88
                </li>
88
                </li>
89
                <li>
90
                    <label for="type" class="required">Type: </label>
91
                    <select name="frameworktype" id="type" required="required" class="required">
92
                      <option value="bib"[% IF framework and framework.frameworktype == 'bib' %] selected="selected"[% END %]>Bibliographic</option>
93
                      <option value="hld"[% IF framework and framework.frameworktype == 'hld' %] selected="selected"[% END %]>Holding</option>
94
                    </select>
95
                    <span class="required">Required</span>
96
                </li>
89
            </ol>
97
            </ol>
90
        </fieldset>
98
        </fieldset>
91
        <fieldset class="action">
99
        <fieldset class="action">
Lines 123-128 Link Here
123
<table id="table_biblio_frameworks">
131
<table id="table_biblio_frameworks">
124
    <thead>
132
    <thead>
125
    <tr>
133
    <tr>
134
        <th>Type</th>
126
        <th>Code</th>
135
        <th>Code</th>
127
        <th>Description</th>
136
        <th>Description</th>
128
        <th>&nbsp;</th>
137
        <th>&nbsp;</th>
Lines 130-135 Link Here
130
    </thead>
139
    </thead>
131
    <tbody>
140
    <tbody>
132
    <tr>
141
    <tr>
142
        <td>Bibliographic</td>
133
        <td>&nbsp;</td>
143
        <td>&nbsp;</td>
134
        <td>Default framework</td>
144
        <td>Default framework</td>
135
        <td>
145
        <td>
Lines 196-206 Link Here
196
          </div>
206
          </div>
197
        </td>
207
        </td>
198
    </tr>
208
    </tr>
199
200
    [% FOREACH loo IN frameworks %]
209
    [% FOREACH loo IN frameworks %]
201
        <tr>
210
        <tr>
211
            <td>[% IF loo.frameworktype == 'hld' %]Holdings[% ELSE %]Bibliographic[% END %]</td>
202
            <td>[% loo.frameworkcode %]</td>
212
            <td>[% loo.frameworkcode %]</td>
203
            <td>[% loo.frameworktext |html %]</td>
213
            <td>[% IF loo.frameworktype == 'hld' and loo.frameworkcode == 'HLD' %]Default holdings framework[% ELSE %][% loo.frameworktext |html %][% END %]</td>
204
            <td>
214
            <td>
205
              <div class="dropdown">
215
              <div class="dropdown">
206
                <a class="btn btn-default btn-xs dropdown-toggle" id="frameworkactions[% loo.frameworkcode %]" role="button" data-toggle="dropdown" href="#">
216
                <a class="btn btn-default btn-xs dropdown-toggle" id="frameworkactions[% loo.frameworkcode %]" role="button" data-toggle="dropdown" href="#">
Lines 208-215 Link Here
208
                </a>
218
                </a>
209
                <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="frameworkactions[% loo.frameworkcode %]">
219
                <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="frameworkactions[% loo.frameworkcode %]">
210
                  <li><a href="marctagstructure.pl?frameworkcode=[% loo.frameworkcode %]"><i class="fa fa-eye"></i> MARC structure</a></li>
220
                  <li><a href="marctagstructure.pl?frameworkcode=[% loo.frameworkcode %]"><i class="fa fa-eye"></i> MARC structure</a></li>
211
                  <li><a href="/cgi-bin/koha/admin/biblio_framework.pl?op=add_form&amp;frameworkcode=[% loo.frameworkcode |html %]"><i class="fa fa-pencil"></i> Edit</a></li>
221
                  [% IF loo.frameworktype != 'hld' || loo.frameworkcode != 'HLD' %]
212
                  <li><a href="/cgi-bin/koha/admin/biblio_framework.pl?op=delete_confirm&amp;frameworkcode=[% loo.frameworkcode |html %]"><i class="fa fa-trash"></i> Delete</a></li>
222
                    <li><a href="/cgi-bin/koha/admin/biblio_framework.pl?op=add_form&amp;frameworkcode=[% loo.frameworkcode |html %]"><i class="fa fa-pencil"></i> Edit</a></li>
223
                    <li><a href="/cgi-bin/koha/admin/biblio_framework.pl?op=delete_confirm&amp;frameworkcode=[% loo.frameworkcode |html %]"><i class="fa fa-trash"></i> Delete</a></li>
224
                  [% END %]
213
                  <!-- Trigger modal -->
225
                  <!-- Trigger modal -->
214
                  <li><a href="#" data-toggle="modal" data-target="#exportModal_[% loo.frameworkcode %][% loop.count %]" title="Export framework structure (fields, subfields) to a spreadsheet file (.csv, .xml, .ods)"><i class="fa fa-upload"></i> Export</a></li>
226
                  <li><a href="#" data-toggle="modal" data-target="#exportModal_[% loo.frameworkcode %][% loop.count %]" title="Export framework structure (fields, subfields) to a spreadsheet file (.csv, .xml, .ods)"><i class="fa fa-upload"></i> Export</a></li>
215
                  <!-- Trigger modal -->
227
                  <!-- Trigger modal -->
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref (+7 lines)
Lines 259-261 Cataloging: Link Here
259
            - "All values of repeating tags and subfields will be printed with the given RIS tag."
259
            - "All values of repeating tags and subfields will be printed with the given RIS tag."
260
            - "<br/>"
260
            - "<br/>"
261
            - "Use of TY ( record type ) as a key will <i>replace</i> the default TY with the field value of your choosing."
261
            - "Use of TY ( record type ) as a key will <i>replace</i> the default TY with the field value of your choosing."
262
    Holdings:
263
        -
264
            - pref: SummaryHoldings
265
              choices:
266
                  yes: Use
267
                  no: "Don't use"
268
            - summary holdings records.
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt (-5 / +68 lines)
Lines 3-8 Link Here
3
[% USE AuthorisedValues %]
3
[% USE AuthorisedValues %]
4
[% USE Branches %]
4
[% USE Branches %]
5
[% USE Biblio %]
5
[% USE Biblio %]
6
[% USE Holdings %]
6
7
7
[% IF Koha.Preference('AmazonAssocTag') %]
8
[% IF Koha.Preference('AmazonAssocTag') %]
8
    [% AmazonAssocTag = '?tag=' _ Koha.Preference('AmazonAssocTag') %]
9
    [% AmazonAssocTag = '?tag=' _ Koha.Preference('AmazonAssocTag') %]
Lines 290-300 Link Here
290
<div id="bibliodetails" class="toptabs">
291
<div id="bibliodetails" class="toptabs">
291
292
292
<ul>
293
<ul>
293
    [% IF (SeparateHoldings) %]
294
    [% IF (show_summary_holdings) %]
294
        <li><a href="#holdings">[% LoginBranchname %] holdings</a></li>
295
        <li><a href="#summaryholdings">Holdings</a></li>
295
        <li><a href="#otherholdings">Other holdings</a></li>
296
        [% IF (SeparateHoldings) %]
297
            <li><a href="#holdings">[% LoginBranchname %] itemss</a></li>
298
            <li><a href="#otherholdings">Other items</a></li>
299
        [% ELSE %]
300
            <li><a href="#holdings">Items</a></li>
301
        [% END %]
296
    [% ELSE %]
302
    [% ELSE %]
297
        <li><a href="#holdings">Holdings</a></li>
303
        [% IF (SeparateHoldings) %]
304
            <li><a href="#holdings">[% LoginBranchname %] holdings</a></li>
305
            <li><a href="#otherholdings">Other holdings</a></li>
306
        [% ELSE %]
307
            <li><a href="#holdings">Holdings</a></li>
308
        [% END %]
298
    [% END %]
309
    [% END %]
299
[% IF ( MARCNOTES || notes ) %]<li><a href="#description">Descriptions</a></li>[% END %]
310
[% IF ( MARCNOTES || notes ) %]<li><a href="#description">Descriptions</a></li>[% END %]
300
[% IF ( subscriptionsnumber ) %]<li><a href="#subscriptions">Subscriptions</a></li>[% END %]
311
[% IF ( subscriptionsnumber ) %]<li><a href="#subscriptions">Subscriptions</a></li>[% END %]
Lines 307-312 Link Here
307
[% END %]
318
[% END %]
308
</ul>
319
</ul>
309
320
321
[% IF ( show_summary_holdings ) %]
322
    <div id="summaryholdings">
323
324
    [% IF ( summary_holdings ) %]
325
        <div class="summaryholdings_table_controls">
326
        </div>
327
        <table class="summaryholdings_table">
328
            <thead>
329
                <tr>
330
                    <th>Library</th>
331
                    <th>Location</th>
332
                    <th>Call number</th>
333
                    <th>Status</th>
334
                    [% IF ( CAN_user_editcatalogue_edit_items ) %]<th class="NoSort">&nbsp;</th>[% END %]
335
                </tr>
336
            </thead>
337
            <tbody>
338
                [% FOREACH holding IN summary_holdings %]
339
                    <tr>
340
                        <td class="branch">[% UNLESS ( singlebranchmode ) %][% Branches.GetName( holding.holdingbranch ) %] [% END %]</td>
341
                        <td class="location"><span class="shelvingloc">[% holding.location %][% IF ( holding.sub_location ) %] ([% holding.sub_location %])[% END %]</span>
342
                        <td class="itemcallnumber">[% IF ( holding.callnumber ) %] [% holding.callnumber %][% END %]</td>
343
                        <td class="status">
344
                            [% IF ( holding.suppress ) %]
345
                                <span class="suppressed">Suppressed in OPAC</span>
346
                            [% END %]
347
                        </td>
348
                    [% IF CAN_user_editcatalogue_edit_items %]
349
                        <td class="actions">
350
                            <a class="btn btn-default btn-xs" href="/cgi-bin/koha/cataloguing/addholding.pl?op=edit&biblionumber=[% holding.biblionumber %]&holding_id=[% holding.holding_id %]#editholding"><i class="fa fa-pencil"></i> Edit</a>
351
                            <a class="btn btn-default btn-xs delete" href="/cgi-bin/koha/cataloguing/addholding.pl?op=delete&biblionumber=[% holding.biblionumber %]&holding_id=[% holding.holding_id %]"><i class="fa fa-eraser"></i> Delete</a>
352
                        </td>
353
                    [% END %]
354
                    </tr>
355
                [% END %]
356
            </tbody>
357
        </table>
358
    [% ELSE %]
359
        <div id="noitems">No holdings records</div>
360
    [% END %]
361
362
    </div>
363
[% END %]
364
310
[% items_table_block_iter = 0 %]
365
[% items_table_block_iter = 0 %]
311
[% BLOCK items_table %]
366
[% BLOCK items_table %]
312
    [% items_table_block_iter = items_table_block_iter + 1 %]
367
    [% items_table_block_iter = items_table_block_iter + 1 %]
Lines 330-335 Link Here
330
            <tr>
385
            <tr>
331
                [% IF (StaffDetailItemSelection) %]<th class="NoSort"></th>[% END %]
386
                [% IF (StaffDetailItemSelection) %]<th class="NoSort"></th>[% END %]
332
                [% IF ( item_level_itypes ) %]<th>Item type</th>[% END %]
387
                [% IF ( item_level_itypes ) %]<th>Item type</th>[% END %]
388
                [% IF ( show_summary_holdings ) %]<th>Holding</th>[% END %]
333
                <th>Current location</th>
389
                <th>Current location</th>
334
                <th>Home library</th>
390
                <th>Home library</th>
335
                [% IF ( itemdata_ccode ) %]<th>Collection</th>[% END %]
391
                [% IF ( itemdata_ccode ) %]<th>Collection</th>[% END %]
Lines 367-372 Link Here
367
                            [% item.translated_description %]
423
                            [% item.translated_description %]
368
                        </td>
424
                        </td>
369
                    [% END %]
425
                    [% END %]
426
                    [% IF ( show_summary_holdings ) %]
427
                        <td class="holding">[% Holdings.GetLocation(item.holding_id) | html %]</td>
428
                    [% END %]
370
                    <td class="location">[% UNLESS ( singlebranchmode ) %][% Branches.GetName( item.branchcode ) %] [% END %]</td>
429
                    <td class="location">[% UNLESS ( singlebranchmode ) %][% Branches.GetName( item.branchcode ) %] [% END %]</td>
371
                    <td class="homebranch">[% Branches.GetName(item.homebranch) %]<span class="shelvingloc">[% item.location %]</span> </td>
430
                    <td class="homebranch">[% Branches.GetName(item.homebranch) %]<span class="shelvingloc">[% item.location %]</span> </td>
372
                    [% IF ( itemdata_ccode ) %]<td>[% item.ccode %]</td>[% END %]
431
                    [% IF ( itemdata_ccode ) %]<td>[% item.ccode %]</td>[% END %]
Lines 989-1000 Link Here
989
                    $("input[name='itemnumber'][type='checkbox']", $("#"+tab)).prop('checked', false);
1048
                    $("input[name='itemnumber'][type='checkbox']", $("#"+tab)).prop('checked', false);
990
                    itemSelectionBuildActionLinks(tab);
1049
                    itemSelectionBuildActionLinks(tab);
991
                });
1050
                });
1051
1052
                $('a.delete').click(function() {
1053
                    return confirm(_('Are you sure?'));
1054
                });
992
            });
1055
            });
993
        [% END %]
1056
        [% END %]
994
1057
995
        $(document).ready(function() {
1058
        $(document).ready(function() {
996
            $('#bibliodetails').tabs();
1059
            $('#bibliodetails').tabs();
997
            [% IF count == 0 %]
1060
            [% IF count == 0 and not show_summary_holdings %]
998
                $('#bibliodetails').tabs("option", "active", 3);
1061
                $('#bibliodetails').tabs("option", "active", 3);
999
            [% END %]
1062
            [% END %]
1000
            $('#search-form').focus();
1063
            $('#search-form').focus();
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt (+2 lines)
Lines 1-5 Link Here
1
[% USE Koha %]
1
[% USE Koha %]
2
[% USE Branches %]
2
[% USE Branches %]
3
[% USE Holdings %]
3
[% SET footerjs = 1 %]
4
[% SET footerjs = 1 %]
4
[% INCLUDE 'doc-head-open.inc' %]
5
[% INCLUDE 'doc-head-open.inc' %]
5
<title>Koha &rsaquo; Catalog &rsaquo; Item details for [% title | html %] [% FOREACH subtitl IN subtitle %] [% subtitl.subfield | html %][% END %]</title>
6
<title>Koha &rsaquo; Catalog &rsaquo; Item details for [% title | html %] [% FOREACH subtitl IN subtitle %] [% subtitl.subfield | html %][% END %]</title>
Lines 53-58 Link Here
53
         [% END %]
54
         [% END %]
54
         [% END %][% END %]</h4>
55
         [% END %][% END %]</h4>
55
            <ol class="bibliodetails">
56
            <ol class="bibliodetails">
57
            <li><span class="label">Holding:</span> [% Holdings.GetLocation( ITEM_DAT.holding_id ) | html %]&nbsp;</li>
56
            <li><span class="label">Home library:</span> [% Branches.GetName( ITEM_DAT.homebranch ) %]&nbsp;</li>
58
            <li><span class="label">Home library:</span> [% Branches.GetName( ITEM_DAT.homebranch ) %]&nbsp;</li>
57
	    [% IF ( item_level_itypes ) %]
59
	    [% IF ( item_level_itypes ) %]
58
            <li><span class="label">Item type:</span> [% ITEM_DAT.itype %]&nbsp;</li>
60
            <li><span class="label">Item type:</span> [% ITEM_DAT.itype %]&nbsp;</li>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt (+14 lines)
Lines 1-5 Link Here
1
[% USE Koha %]
1
[% USE Koha %]
2
[% USE Biblio %]
2
[% USE Biblio %]
3
[% USE Holdings %]
3
[% USE KohaDates %]
4
[% USE KohaDates %]
4
[% SET footerjs = 1 %]
5
[% SET footerjs = 1 %]
5
[% IF BiblioDefaultViewmarc %]
6
[% IF BiblioDefaultViewmarc %]
Lines 475-480 Link Here
475
                                </td>
476
                                </td>
476
477
477
                                <td><div class="availability">
478
                                <td><div class="availability">
479
                                    [% IF ( SEARCH_RESULT.summary_holdings ) %]
480
                                        <div class="holdings">
481
                                            <strong>Holdings</strong>
482
                                            <ul>
483
                                            [% FOREACH holding IN SEARCH_RESULT.summary_holdings %]
484
                                                <li>
485
                                                    [% Holdings.GetLocation(holding) | html %]
486
                                                </li>
487
                                            [% END %]
488
                                            </ul>
489
                                        </div>
490
                                    [% END %]
491
478
                                    [% IF ( SEARCH_RESULT.items_count ) %]
492
                                    [% IF ( SEARCH_RESULT.items_count ) %]
479
                                        <strong>
493
                                        <strong>
480
                                            [% IF MaxSearchResultsItemsPerRecordStatusCheck && SEARCH_RESULT.items_count > MaxSearchResultsItemsPerRecordStatusCheck %]
494
                                            [% IF MaxSearchResultsItemsPerRecordStatusCheck && SEARCH_RESULT.items_count > MaxSearchResultsItemsPerRecordStatusCheck %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addholding.tt (+616 lines)
Line 0 Link Here
1
[% USE Koha %]
2
[% SET KOHA_VERSION = Koha.Preference('Version') %]
3
[% INCLUDE 'doc-head-open.inc' %]
4
<title>Koha &rsaquo; Cataloging &rsaquo; [% IF ( holding_id ) %]Editing record number [% holding_id %][% ELSE %]Add holding record[% END %]</title>
5
[% INCLUDE 'doc-head-close.inc' %]
6
<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.fixFloat_[% KOHA_VERSION %].js"></script>
7
<script type="text/javascript" src="[% interface %]/[% theme %]/js/cataloging_[% KOHA_VERSION %].js"></script>
8
[% INCLUDE 'browser-strings.inc' %]
9
<!--[if lt IE 9]>
10
<script type="text/javascript" src="[% interface %]/lib/shims/json2.min_[% KOHA_VERSION %].js"></script>
11
<![endif]-->
12
<script type="text/javascript" src="[% interface %]/js/browser_[% KOHA_VERSION %].js"></script>
13
<script type="text/javascript">
14
//<![CDATA[
15
    var browser = KOHA.browser('[% searchid %]', parseInt('[% biblionumber %]', 10));
16
    browser.show();
17
18
    $(window).load(function() {
19
        $("#loading").hide();
20
    });
21
	 $(document).ready(function() {
22
        $('#addholdingtabs').tabs().bind('show.ui-tabs', function(e, ui) {
23
			$("#"+ui.panel.id+" input:eq(0)").focus();
24
		});
25
26
        [% IF tab %]
27
            $('#addholdingtabs').selectTabByID("#[% tab %]");
28
        [% END %]
29
30
        $('#toolbar').fixFloat();
31
32
        /* check cookie to hide/show marcdocs*/
33
        if($.cookie("marcdocs_[% borrowernumber %]") == 'hide'){
34
            toggleMARCdocLinks(false);
35
        } else {
36
            toggleMARCdocLinks(true);
37
        }
38
39
        $("#marcDocsSelect").click(function(){
40
            if($.cookie("marcdocs_[% borrowernumber %]") == 'hide'){
41
                toggleMARCdocLinks(true);
42
            } else {
43
                toggleMARCdocLinks(false);
44
            }
45
        });
46
47
        /* check cookie to hide/show marc tags*/
48
        var marctags_cookie = $.cookie("marctags_[% borrowernumber %]");
49
        if (marctags_cookie == 'hide'){
50
            toggleMARCTagLinks(false);
51
        } else if( marctags_cookie == 'show'){
52
            toggleMARCTagLinks(true)
53
        } else {
54
            [% UNLESS Koha.Preference("hide_marc") %]
55
                toggleMARCTagLinks(true)
56
            [% ELSE %]
57
                toggleMARCTagLinks(false);
58
            [% END %]
59
        }
60
61
        $("#marcTagsSelect").click(function(){
62
            if( $.cookie("marctags_[% borrowernumber %]") == 'hide'){
63
                toggleMARCTagLinks(true)
64
            } else {
65
                toggleMARCTagLinks(false);
66
            }
67
        });
68
69
        $("#saverecord").click(function(){
70
            $(".btn-group").removeClass("open");
71
            onOption();
72
            return false;
73
        });
74
75
        $("#saveandview").click(function(){
76
            $(".btn-group").removeClass("open");
77
            redirect("view");
78
            return false;
79
        });
80
81
        $("#saveanditems").click(function(){
82
            $(".btn-group").removeClass("open");
83
            redirect("items");
84
            return false;
85
        });
86
        $("#saveandcontinue").click(function(){
87
            $(".btn-group").removeClass("open");
88
            var tab = $("#addholdingtabs li.ui-tabs-active:first a").attr('href');
89
            tab = tab.replace('#', '');
90
            $("#current_tab").val(tab);
91
            redirect("just_save", tab);
92
            return false;
93
        });
94
95
        $( '#switcheditor' ).click( function() {
96
97
            if ( !confirm( _("Any changes will not be saved. Continue?") ) ) return false;
98
99
            $.cookie( 'catalogue_editor_[% USER_INFO.borrowernumber %]', 'advanced', { expires: 365, path: '/' } );
100
101
            var holding_id = [% holding_id || "''" %];
102
            window.location = '/cgi-bin/koha/cataloguing/editor.pl#catalog/' + biblionumber + '/holdings/' + holding_id;
103
104
            return false;
105
        } );
106
        $(".change-framework").on("click", function(){
107
            var frameworkcode = $(this).data("frameworkcode");
108
            $("#frameworkcode").val( frameworkcode );
109
            Changefwk();
110
        });
111
    });
112
113
function redirect(dest){
114
    $("#redirect").attr("value",dest);
115
    return Check();
116
}
117
118
[% IF ( CAN_user_editcatalogue_edit_items ) %]
119
    var onOption = function () {
120
        return Check();
121
    }
122
[% END %]
123
124
function Dopop(link,i) {
125
    defaultvalue = document.getElementById(i).value;
126
    window.open(link+"&result="+defaultvalue,"valuebuilder",'width=700,height=550,toolbar=false,scrollbars=yes');
127
}
128
129
function PopupMARCFieldDoc(field) {
130
    [% IF ( marcflavour == 'MARC21' ) %]
131
        _MARC21FieldDoc(field);
132
    [% ELSIF ( marcflavour == 'UNIMARC' ) %]
133
        _UNIMARCFieldDoc(field);
134
    [% END %]
135
}
136
137
function _MARC21FieldDoc(field) {
138
    if(field == 0) {
139
        window.open("http://www.loc.gov/marc/holdings/bdleader.html");
140
    } else if (field < 900) {
141
        window.open("http://www.loc.gov/marc/holdings/bd" + ("000"+field).slice(-3) + ".html");
142
    } else {
143
        window.open("http://www.loc.gov/marc/holdings/bd9xx.html");
144
    }
145
}
146
147
function _UNIMARCFieldDoc(field) {
148
    /* http://archive.ifla.org/VI/3/p1996-1/ is an outdated version of UNIMARC, but
149
       seems to be the only version available that can be linked to per tag.  More recent
150
       versions of the UNIMARC standard are available on the IFLA website only as
151
       PDFs!
152
    */
153
    var url;
154
    if (field == 0) {
155
        url = "http://archive.ifla.org/VI/3/p1996-1/uni.htm";
156
    } else {
157
        var first = field.substring(0,1);
158
        url = "http://archive.ifla.org/VI/3/p1996-1/uni" + first + ".htm#";
159
        if (first == 0) url = url + "b";
160
        url = first == 9
161
              ? "http://archive.ifla.org/VI/3/p1996-1/uni9.htm"
162
              : url + field;
163
    }
164
    window.open(url);
165
}
166
167
/*
168
 * Functions to hide/show marc docs and tags links
169
 */
170
171
function toggleMARCdocLinks(flag){
172
    if( flag === true ){
173
        $(".marcdocs").show();
174
        $.cookie("marcdocs_[% borrowernumber %]",'show', { path: "/", expires: 365 });
175
        $("#marcDocsSelect i").addClass('fa-check-square-o').removeClass('fa-square-o');
176
    } else {
177
        $(".marcdocs").hide();
178
        $.cookie("marcdocs_[% borrowernumber %]",'hide', { path: "/", expires: 365 });
179
        $("#marcDocsSelect i").removeClass('fa-check-square-o').addClass('fa-square-o');
180
    }
181
}
182
183
function toggleMARCTagLinks(flag){
184
    if( flag === true ){
185
        $(".tagnum").show();
186
        $(".subfieldcode").show();
187
        $.cookie("marctags_[% borrowernumber %]",'show', { path: "/", expires: 365 });
188
        $("#marcTagsSelect i").addClass('fa-check-square-o').removeClass('fa-square-o');
189
    } else {
190
        $(".tagnum").hide();
191
        $(".subfieldcode").hide();
192
        $.cookie("marctags_[% borrowernumber %]",'hide', { path: "/", expires: 365 });
193
        $("#marcTagsSelect i").removeClass('fa-check-square-o').addClass('fa-square-o');
194
    }
195
}
196
197
/**
198
 * check if mandatory subfields are written
199
 */
200
function AreMandatoriesNotOk(){
201
    var mandatories = new Array();
202
    var mandatoriesfields = new Array();
203
    var tab = new Array();
204
    var label = new Array();
205
    var flag=0;
206
    var tabflag= new Array();
207
    [% FOREACH BIG_LOO IN BIG_LOOP %]
208
	[% FOREACH innerloo IN BIG_LOO.innerloop %]
209
	        [% IF ( innerloo.mandatory ) %]
210
		mandatoriesfields.push(new Array("[% innerloo.tag %]","[% innerloo.index %][% innerloo.random %]","[% innerloo.index %]"));
211
		[% END %]
212
		[% FOREACH subfield_loo IN innerloo.subfield_loop %]
213
			[% IF ( subfield_loo.mandatory ) %]mandatories.push("[% subfield_loo.id %]");
214
			tab.push("[% BIG_LOO.number %]");
215
			label.push("[% subfield_loo.marc_lib %]");
216
                [% END %]
217
            [% END %]
218
        [% END %]
219
    [% END %]
220
    var StrAlert = _("Can't save this record because the following field aren't filled:");
221
    StrAlert += "\n\n";
222
    for(var i=0,len=mandatories.length; i<len ; i++){
223
        var tag=mandatories[i].substr(4,3);
224
        var subfield=mandatories[i].substr(17,1);
225
        var tagnumber=mandatories[i].substr(19,mandatories[i].lastIndexOf("_")-19);
226
        if (tabflag[tag+subfield+tagnumber] ==  null) {
227
	    tabflag[tag+subfield+tagnumber]=new Array();
228
            tabflag[tag+subfield+tagnumber][0]=0;
229
	}
230
        if( tabflag[tag+subfield+tagnumber][0] != 1 && (document.getElementById(mandatories[i]) != null && ! document.getElementById(mandatories[i]).value || document.getElementById(mandatories[i]) == null)){
231
            tabflag[tag+subfield+tagnumber][0] = 0 + tabflag[tag+subfield+tagnumber] ;
232
            document.getElementById(mandatories[i]).setAttribute('class','subfield_not_filled');
233
            $('#' + mandatories[i]).focus();
234
            tabflag[tag+subfield+tagnumber][1]=label[i];
235
            tabflag[tag+subfield+tagnumber][2]=tab[i];
236
        } else {
237
            tabflag[tag+subfield+tagnumber][0] = 1;
238
        }
239
    }
240
    for (var tagsubfieldid in tabflag){
241
      if (tabflag[tagsubfieldid][0]==0){
242
        var tag=tagsubfieldid.substr(0,3);
243
        var subfield=tagsubfieldid.substr(3,1);
244
        StrAlert += "\t* "+_("tag %s subfield %s %s in tab %s").format(tag, subfield, tabflag[tagsubfieldid][1], tabflag[tagsubfieldid][2]) + "\n";
245
        //StrAlert += "\t* "+label[i]+_(" in tab ")+tab[i]+"\n";
246
        flag=1;
247
      }
248
    }
249
250
    /* Check for mandatories field(not subfields) */
251
    for(var i=0,len=mandatoriesfields.length; i<len; i++){
252
	    isempty  = true;
253
		arr      = mandatoriesfields[i];
254
	divid    = "tag_" + arr[0] + "_" + arr[1];
255
	varegexp = new RegExp("^tag_" + arr[0] + "_code_");
256
257
		if(parseInt(arr[0]) >= 10){
258
		elem = document.getElementById(divid);
259
		eleminputs = elem.getElementsByTagName('input');
260
261
		for(var j=0,len2=eleminputs.length; j<len2; j++){
262
263
			if(eleminputs[j].name.match(varegexp) && eleminputs[j].value){
264
					inputregexp = new RegExp("^tag_" + arr[0] + "_subfield_" + eleminputs[j].value + "_" + arr[2]);
265
266
					for( var k=0; k<len2; k++){
267
						if(eleminputs[k].id.match(inputregexp) && eleminputs[k].value){
268
							isempty = false
269
						}
270
					}
271
272
					elemselect = elem.getElementsByTagName('select');
273
					for( var k=0; k<elemselect.length; k++){
274
						if(elemselect[k].id.match(inputregexp) && elemselect[k].value){
275
							isempty = false
276
						}
277
					}
278
			}
279
		}
280
281
		elemtextareas = elem.getElementsByTagName('textarea');
282
		for(var j=0,len2=elemtextareas.length; j<len2; j++){
283
                // this bit assumes that the only textareas in this context would be for subfields
284
                if (elemtextareas[j].value) {
285
                    isempty = false;
286
                }
287
            }
288
	}else{
289
		isempty = false;
290
	}
291
292
	if(isempty){
293
		flag = 1;
294
                StrAlert += "\t* " + _("Field %s is mandatory, at least one of its subfields must be filled.").format(arr[0]) + "\n";
295
	}
296
297
    }
298
299
    if(flag){
300
	    return StrAlert;
301
	} else {
302
		return flag;
303
	}
304
}
305
306
/**
307
 *
308
 *
309
 */
310
function Check(){
311
    var StrAlert = AreMandatoriesNotOk();
312
    if( ! StrAlert ){
313
        document.f.submit();
314
        return true;
315
    } else {
316
        alert(StrAlert);
317
        return false;
318
    }
319
}
320
321
function Changefwk() {
322
    var f = document.f;
323
    f.op.value = "[% op %]";
324
    f.biblionumber.value = "[% biblionumber %]";
325
    f.holding_id.value = "[% holding_iddata %]";
326
    f.changed_framework.value = "changed";
327
    f.submit();
328
}
329
330
//]]>
331
</script>
332
<link type="text/css" rel="stylesheet" href="[% interface %]/[% theme %]/css/addholding.css" />
333
334
[% INCLUDE 'select2.inc' %]
335
<script>
336
  $(document).ready(function() {
337
    $('.subfield_line select').select2();
338
  });
339
</script>
340
341
[% IF ( bidi ) %]
342
   <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/right-to-left_[% KOHA_VERSION %].css" />
343
[% END %]
344
</head>
345
<body id="cat_addholding" class="cat">
346
347
   <div id="loading">
348
       <div>Loading, please wait...</div>
349
   </div>
350
351
[% INCLUDE 'header.inc' %]
352
353
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/cataloguing/addbooks.pl">Cataloging</a>  &rsaquo; [% IF ( holding_id ) %]Editing record number [% holding_id %][% ELSE %]Add holding record[% END %]</div>
354
355
<div id="doc" class="yui-t7">
356
357
<div id="bd">
358
        <div id="yui-main">
359
        <div class="yui-g">
360
361
<h1>
362
[% IF ( holding_id ) %]Editing record number [% holding_id %]
363
[% ELSE %]Add holdings record
364
[% END %]
365
</h1>
366
367
[% IF ( done ) %]
368
    <script type="text/javascript">
369
        opener.document.forms['f'].holding_id.value=[% holding_id %];
370
        window.close();
371
    </script>
372
[% ELSE %]
373
    <form method="post" name="f" id="f" action="/cgi-bin/koha/cataloguing/addholding.pl" onsubmit="return Check();">
374
    <input type="hidden" value="[% IF ( holding_id ) %]view[% ELSE %]items[% END %]" id="redirect" name="redirect" />
375
    <input type="hidden" value="" id="current_tab" name="current_tab" />
376
[% END %]
377
378
<div id="toolbar" class="btn-toolbar">
379
    [% IF CAN_user_editcatalogue_edit_items %]
380
        <div class="btn-group">
381
            <button class="btn btn-default btn-sm" id="saverecord"><i class="fa fa-save"></i> Save</button>
382
            <button class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown">
383
            <span class="caret"></span>
384
            </button>
385
            <ul class="dropdown-menu">
386
                <li><a id="saveandview" href="#">Save and view record</a></li>
387
                <li><a id="saveanditems" href="#">Save and edit items</a></li>
388
                <li><a id="saveandcontinue" href="#">Save and continue editing</a></li>
389
            </ul>
390
        </div>
391
    [% END %]
392
393
    <div class="btn-group">
394
        <button class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown"><i class="fa fa-cog"></i> Settings <span class="caret"></span></button>
395
        <ul id="settings-menu" class="dropdown-menu">
396
            [% IF Koha.Preference( 'EnableAdvancedCatalogingEditor' ) == 1 %]
397
                <li><a href="#" id="switcheditor">Switch to advanced editor</a></li>
398
            [% END %]
399
            [% IF marcflavour != 'NORMARC' AND NOT advancedMARCEditor %]
400
                <li>
401
                    <a href="#" id="marcDocsSelect"><i class="fa fa-check-square-o"></i> Show MARC tag documentation links</a>
402
                <li>
403
                    <a href="#" id="marcTagsSelect"><i class="fa fa-check-square-o"></i> Show tags</a>
404
                </li>
405
            [% END %]
406
            <li class="divider"></li>
407
            <li class="nav-header">Change framework</li>
408
            <li>
409
                <a href="#" class="change-framework" data-frameworkcode="">
410
                    [% IF ( frameworkcode ) %]
411
                       <i class="fa fa-fw">&nbsp;</i>
412
                    [% ELSE %]
413
                        <i class="fa fa-fw fa-check"></i>
414
                    [% END %]
415
                    Default
416
                </a>
417
            </li>
418
            [% FOREACH framework IN frameworks%]
419
                <li>
420
                    <a href="#" class="change-framework" data-frameworkcode="[% framework.frameworkcode %]">
421
                        [% IF framework.frameworkcode == frameworkcode %]
422
                            <i class="fa fa-fw fa-check"></i>
423
                        [% ELSE %]
424
                            <i class="fa fa-fw">&nbsp;</i>
425
                        [% END %]
426
                        [% framework.frameworktext %]
427
                    </a>
428
                </li>
429
            [% END %]
430
        </ul>
431
    </div>
432
    <div class="btn-group">
433
        <a class="btn btn-default btn-sm" id="cancel" href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblionumber |url %]">Cancel</a>
434
    </div>
435
</div>
436
437
[% IF ( popup ) %]
438
        <input type="hidden" name="mode" value="popup" />
439
[% END %]
440
        <input type="hidden" name="op" value="add" />
441
        <input type="hidden" id="frameworkcode" name="frameworkcode" value="[% frameworkcode %]" />
442
        <input type="hidden" name="biblionumber" value="[% biblionumber %]" />
443
        <input type="hidden" name="holding_id" value="[% holding_id %]" />
444
        <input type="hidden" name="changed_framework" value="" />
445
446
<div id="addholdingtabs" class="toptabs numbered">
447
    <ul>
448
        [% FOREACH BIG_LOO IN BIG_LOOP %]
449
        <li><a href="#tab[% BIG_LOO.number %]XX">[% BIG_LOO.number %]</a></li>
450
        [% END %]
451
    </ul>
452
453
[% FOREACH BIG_LOO IN BIG_LOOP %]
454
    <div id="tab[% BIG_LOO.number %]XX">
455
456
    [% FOREACH innerloo IN BIG_LOO.innerloop %]
457
    [% IF ( innerloo.tag ) %]
458
    <div class="tag" id="tag_[% innerloo.tag %]_[% innerloo.index %][% innerloo.random %]">
459
        <div class="tag_title" id="div_indicator_tag_[% innerloo.tag %]_[% innerloo.index %][% innerloo.random %]">
460
            [% IF advancedMARCEditor %]
461
                <a href="#" tabindex="1" class="tagnum" title="[% innerloo.tag_lib %] - Click to Expand this Tag" onclick="ExpandField('tag_[% innerloo.tag %]_[% innerloo.index %][% innerloo.random %]'); return false;">[% innerloo.tag %]</a>
462
            [% ELSE %]
463
                <span class="tagnum" title="[% innerloo.tag_lib %]">[% innerloo.tag %]</span>
464
                [% IF marcflavour != 'NORMARC' %]<a href="#" class="marcdocs" onclick="PopupMARCFieldDoc('[% innerloo.tag %]'); return false;">&nbsp;?</a>[% END %]
465
            [% END %]
466
                [% IF ( innerloo.fixedfield ) %]
467
                    <input type="text"
468
                        tabindex="1"
469
                        class="indicator flat"
470
                        style="display:none;"
471
                        name="tag_[% innerloo.tag %]_indicator1_[% innerloo.index %][% innerloo.random %]"
472
                        size="1"
473
                        maxlength="1"
474
                        value="[% innerloo.indicator1 %]" />
475
                    <input type="text"
476
                        tabindex="1"
477
                        class="indicator flat"
478
                        style="display:none;"
479
                        name="tag_[% innerloo.tag %]_indicator2_[% innerloo.index %][% innerloo.random %]"
480
                        size="1"
481
                        maxlength="1"
482
                        value="[% innerloo.indicator2 %]" />
483
                [% ELSE %]
484
                    <input type="text"
485
                        tabindex="1"
486
                        class="indicator flat"
487
                        name="tag_[% innerloo.tag %]_indicator1_[% innerloo.index %][% innerloo.random %]"
488
                        size="1"
489
                        maxlength="1"
490
                        value="[% innerloo.indicator1 %]" />
491
                    <input type="text"
492
                        tabindex="1"
493
                        class="indicator flat"
494
                        name="tag_[% innerloo.tag %]_indicator2_[% innerloo.index %][% innerloo.random %]"
495
                        size="1"
496
                        maxlength="1"
497
                        value="[% innerloo.indicator2 %]" />
498
                [% END %] -
499
500
            [% UNLESS advancedMARCEditor %]
501
                <a href="#" tabindex="1" class="expandfield" onclick="ExpandField('tag_[% innerloo.tag %]_[% innerloo.index %][% innerloo.random %]'); return false;" title="Click to Expand this Tag">[% innerloo.tag_lib %]</a>
502
            [% END %]
503
                <span class="field_controls">
504
                [% IF ( innerloo.repeatable ) %]
505
                    <a href="#" tabindex="1" class="buttonPlus" onclick="CloneField('tag_[% innerloo.tag %]_[% innerloo.index %][% innerloo.random %]','0','[% advancedMARCEditor %]'); return false;" title="Repeat this Tag">
506
                        <img src="[% interface %]/[% theme %]/img/repeat-tag.png" alt="Repeat this Tag" />
507
                    </a>
508
                [% END %]
509
                    <a href="#" tabindex="1" class="buttonMinus" onclick="UnCloneField('tag_[% innerloo.tag %]_[% innerloo.index %][% innerloo.random %]'); return false;" title="Delete this Tag">
510
                        <img src="[% interface %]/[% theme %]/img/delete-tag.png" alt="Delete this Tag" />
511
                    </a>
512
                </span>
513
514
        </div>
515
516
        [% FOREACH subfield_loo IN innerloo.subfield_loop %]
517
            <!--  One line on the marc editor -->
518
            <div class="subfield_line" style="[% subfield_loo.visibility %]" id="subfield[% subfield_loo.tag %][% subfield_loo.subfield %][% subfield_loo.random %]">
519
520
                [% UNLESS advancedMARCEditor %]
521
                    [% IF ( subfield_loo.fixedfield ) %]<label for="tag_[% subfield_loo.tag %]_subfield_[% subfield_loo.subfield %]_[% subfield_loo.index %]_[% subfield_loo.index_subfield %]" style="display:none;" class="labelsubfield">
522
                    [% ELSE %]<label for="tag_[% subfield_loo.tag %]_subfield_[% subfield_loo.subfield %]_[% subfield_loo.index %]_[% subfield_loo.index_subfield %]" class="labelsubfield">
523
                    [% END %]
524
                [% END %]
525
526
                <span class="subfieldcode">
527
                    [% IF ( subfield_loo.fixedfield ) %]
528
                        <img class="buttonUp" style="display:none;" src="[% interface %]/[% theme %]/img/up.png" onclick="upSubfield('subfield[% subfield_loo.tag %][% subfield_loo.subfield %][% subfield_loo.random %]')" alt="Move Up" title="Move Up" />
529
                    [% ELSE %]
530
                        <img class="buttonUp" src="[% interface %]/[% theme %]/img/up.png" onclick="upSubfield('subfield[% subfield_loo.tag %][% subfield_loo.subfield %][% subfield_loo.random %]')" alt="Move Up" title="Move Up" />
531
                    [% END %]
532
                        <input type="text"
533
                            title="[% subfield_loo.marc_lib %]"
534
                            style=" [% IF ( subfield_loo.fixedfield ) %]display:none; [% END %]border:0;"
535
                            name="tag_[% subfield_loo.tag %]_code_[% subfield_loo.subfield %]_[% subfield_loo.index %]_[% subfield_loo.index_subfield %]"
536
                            value="[% subfield_loo.subfield %]"
537
                            size="1"
538
                            maxlength="1"
539
                            class="flat"
540
                            tabindex="0" />
541
                </span>
542
543
                [% UNLESS advancedMARCEditor %]
544
                    [% IF ( subfield_loo.mandatory ) %]<span class="subfield subfield_mandatory">[% ELSE %]<span class="subfield">[% END %]
545
                        [% subfield_loo.marc_lib %]
546
                        [% IF ( subfield_loo.mandatory ) %]<span class="mandatory_marker" title="This field is mandatory">*</span>[% END %]
547
                    </span>
548
                    </label>
549
                [% END %]
550
551
                [% SET mv = subfield_loo.marc_value %]
552
                [% IF ( mv.type == 'text' ) %]
553
                    [% IF ( mv.readonly == 1 ) %]
554
                    <input type="text" id="[%- mv.id -%]" name="[%- mv.name -%]" value="[%- mv.value -%]" class="input_marceditor readonly" tabindex="1" size="[%- mv.size -%]" maxlength="[%- mv.maxlength -%]" readonly="readonly" />
555
                    [% ELSE %]
556
                    <input type="text" id="[%- mv.id -%]" name="[%- mv.name -%]" value="[%- mv.value -%]" class="input_marceditor" tabindex="1" size="[%- mv.size -%]" maxlength="[%- mv.maxlength -%]" />
557
                    [% END %]
558
                    [% IF ( mv.authtype ) %]
559
                    <span class="subfield_controls"><a href="#" class="buttonDot tag_editor" onclick="openAuth(this.parentNode.parentNode.getElementsByTagName('input')[1].id,'[%- mv.authtype -%]','holding'); return false;" tabindex="1" title="Tag editor">Tag editor</a></span>
560
                    [% END %]
561
                [% ELSIF ( mv.type == 'text_complex' ) %]
562
                    <input type="text" id="[%- mv.id -%]" name="[%- mv.name -%]" value="[%- mv.value -%]" class="input_marceditor framework_plugin" tabindex="1" size="[%- mv.size -%]" maxlength="[%- mv.maxlength -%]" />
563
                    <span class="subfield_controls">
564
                        [% IF mv.noclick %]
565
                            <a href="#" class="buttonDot tag_editor disabled" tabindex="-1" title="No popup"></a>
566
                        [% ELSE %]
567
                            <a href="#" id="buttonDot_[% mv.id %]" class="buttonDot tag_editor framework_plugin" tabindex="1" title="Tag editor">Tag editor</a>
568
                        [% END %]
569
                    </span>
570
                    [% mv.javascript %]
571
                [% ELSIF ( mv.type == 'hidden' ) %]
572
                    <input tabindex="1" type="hidden" id="[%- mv.id -%]" name="[%- mv.name -%]" size="[%- mv.size -%]" maxlength="[%- mv.maxlength -%]" value="[%- mv.value -%]" />
573
                [% ELSIF ( mv.type == 'textarea' ) %]
574
                    <textarea cols="70" rows="4" id="[%- mv.id -%]" name="[%- mv.name -%]" class="input_marceditor" tabindex="1">[%- mv.value -%]</textarea>
575
                [% ELSIF ( mv.type == 'select' ) %]
576
                    <select name="[%- mv.name -%]" tabindex="1" size="1" class="input_marceditor" id="[%- mv.id -%]">
577
                    [% FOREACH aval IN mv.values %]
578
                        [% IF aval == mv.default %]
579
                        <option value="[%- aval -%]" selected="selected">[%- mv.labels.$aval -%]</option>
580
                        [% ELSE %]
581
                        <option value="[%- aval -%]">[%- mv.labels.$aval -%]</option>
582
                        [% END %]
583
                    [% END %]
584
                    </select>
585
                [% END %]
586
587
                <span class="subfield_controls">
588
                [% IF ( subfield_loo.repeatable ) %]
589
                    <a href="#" class="buttonPlus" tabindex="1" onclick="CloneSubfield('subfield[% subfield_loo.tag %][% subfield_loo.subfield %][% subfield_loo.random %]','[% advancedMARCEditor %]'); return false;">
590
                        <img src="[% interface %]/[% theme %]/img/clone-subfield.png" alt="Clone" title="Clone this subfield" />
591
                    </a>
592
                    <a href="#" class="buttonMinus" tabindex="1" onclick="UnCloneField('subfield[% subfield_loo.tag %][% subfield_loo.subfield %][% subfield_loo.random %]'); return false;">
593
                        <img src="[% interface %]/[% theme %]/img/delete-subfield.png" alt="Delete" title="Delete this subfield" />
594
                    </a>
595
                [% END %]
596
                </span>
597
598
            </div>
599
            <!-- End of the line -->
600
        [% END %]
601
602
    </div>
603
    [% END %]<!-- if innerloo.tag -->
604
    [% END %]<!-- BIG_LOO.innerloop -->
605
    </div>
606
[% END %]<!-- BIG_LOOP -->
607
608
</div><!-- tabs -->
609
610
</form>
611
612
</div>
613
</div>
614
</div>
615
616
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_field_008_holdings.tt (+193 lines)
Line 0 Link Here
1
[% INCLUDE 'doc-head-open.inc' %]
2
<title>Koha &rsaquo; Holdings &rsaquo; 008 builder</title>
3
[% INCLUDE 'doc-head-close.inc' %]
4
</head>
5
<body id="cat_marc21_field_008_holdings" class="cat" style="padding:1em;">
6
<h3> 008 Fixed-length data elements</h3>
7
<form name="f_pop" onsubmit="report()" action="">
8
<input type="hidden" name="plugin_name" value="marc21_field_008_holdings.pl" />
9
<input name="f1" value="[% f1 %]" type="hidden" />
10
<table>
11
	<tr>
12
		<td>00-05 - Date entered on file</td>
13
		<td>[% f1 %]</td>
14
	</tr>
15
	<tr>
16
		<td><label for="f6">06 - Receipt or acquisition status</label></td>
17
		<td>
18
			<select name="f6" id="f6" size="1">
19
                <option value="0"[% IF ( f60 ) %] selected="selected"[% END %]>0 - Unknown</option>
20
                <option value="1"[% IF ( f61 ) %] selected="selected"[% END %]>1 - Other receipt or acquisition status</option>
21
                <option value="2"[% IF ( f62 ) %] selected="selected"[% END %]>2 - Received and complete or ceased</option>
22
                <option value="3"[% IF ( f63 ) %] selected="selected"[% END %]>3 - On order</option>
23
                <option value="4"[% IF ( f64 ) %] selected="selected"[% END %]>4 - Currently received</option>
24
                <option value="5"[% IF ( f65 ) %] selected="selected"[% END %]>5 - Not currently received</option>
25
			</select>
26
		</td>
27
	</tr>
28
    <tr>
29
        <td><label for="f7">07 - Method of acquisition</label></td>
30
        <td>
31
            <select name="f7" id="f7" size="1">
32
                <option value="c"[% IF ( f7c ) %] selected="selected"[% END %]>c - Cooperative or consortial purchase</option>
33
                <option value="d"[% IF ( f7d ) %] selected="selected"[% END %]>d - Deposit</option>
34
                <option value="e"[% IF ( f7e ) %] selected="selected"[% END %]>e - Exchange</option>
35
                <option value="f"[% IF ( f7f ) %] selected="selected"[% END %]>f - Free</option>
36
                <option value="g"[% IF ( f7g ) %] selected="selected"[% END %]>g - Gift</option>
37
                <option value="l"[% IF ( f7l ) %] selected="selected"[% END %]>l - Legal deposit</option>
38
                <option value="m"[% IF ( f7m ) %] selected="selected"[% END %]>m - Membership</option>
39
                <option value="n"[% IF ( f7n ) %] selected="selected"[% END %]>n - Non-library purchase</option>
40
                <option value="p"[% IF ( f7p ) %] selected="selected"[% END %]>p - Purchase</option>
41
                <option value="q"[% IF ( f7q ) %] selected="selected"[% END %]>q - Lease</option>
42
                <option value="u"[% IF ( f7u ) %] selected="selected"[% END %]>u - Unknown</option>
43
                <option value="z"[% IF ( f7z ) %] selected="selected"[% END %]>z - Other method of acquisition</option>
44
            </select>
45
        </td>
46
    </tr>
47
	<tr>
48
		<td><label for="f8">08-11 - Expected acquisition end date</label></td>
49
		<td><input type="text" name="f8" id="f8" maxlength="4" size="5" value="[% f8 %]" /></td>
50
	</tr>
51
    <tr>
52
        <td><label for="f12">12- General retention policy</label></td>
53
        <td>
54
            <select name="f12" id="f12" size="1">
55
                <option value="0"[% IF ( f120 ) %] selected="selected"[% END %]>0 - Unknown</option>
56
                <option value="1"[% IF ( f121 ) %] selected="selected"[% END %]>1 - Other general retention policy</option>
57
                <option value="2"[% IF ( f122 ) %] selected="selected"[% END %]>2 - Retained except as replaced by updates</option>
58
                <option value="3"[% IF ( f123 ) %] selected="selected"[% END %]>3 - Sample issue retained</option>
59
                <option value="4"[% IF ( f124 ) %] selected="selected"[% END %]>4 - Retained until replaced by microform</option>
60
                <option value="5"[% IF ( f125 ) %] selected="selected"[% END %]>5 - Retained until replaced by cumulation, replacement volume, or revision</option>
61
                <option value="6"[% IF ( f126 ) %] selected="selected"[% END %]>6 - Retained for a limited period</option>
62
                <option value="7"[% IF ( f127 ) %] selected="selected"[% END %]>7 - Not retained</option>
63
                <option value="8"[% IF ( f128 ) %] selected="selected"[% END %]>8 - Permanently retained</option>
64
            </select>
65
        </td>
66
    </tr>
67
    <tr>
68
        <td><label for="f13">13 - Policy type</label></td>
69
        <td>
70
            <select name="f13" id="f13" size="1">
71
                <option value=" "[% IF ( f13 ) %] selected="selected"[% END %]># - No information provided</option>
72
                <option value="l"[% IF ( f13l ) %] selected="selected"[% END %]>l - Latest</option>
73
                <option value="p"[% IF ( f13p ) %] selected="selected"[% END %]>p - Previous</option>
74
            </select>
75
        </td>
76
    </tr>
77
    <tr>
78
        <td><label for="f14">14 - Number of units</label></td>
79
        <td>
80
            <select name="f14" id="f14" size="1">
81
                <option value=" "[% IF ( f14 ) %] selected="selected"[% END %]># - No information provided</option>
82
                <option value="1"[% IF ( f141 ) %] selected="selected"[% END %]>1</option>
83
                <option value="2"[% IF ( f142 ) %] selected="selected"[% END %]>2</option>
84
                <option value="3"[% IF ( f143 ) %] selected="selected"[% END %]>3</option>
85
                <option value="4"[% IF ( f144 ) %] selected="selected"[% END %]>4</option>
86
                <option value="5"[% IF ( f145 ) %] selected="selected"[% END %]>5</option>
87
                <option value="6"[% IF ( f146 ) %] selected="selected"[% END %]>6</option>
88
                <option value="7"[% IF ( f147 ) %] selected="selected"[% END %]>7</option>
89
                <option value="8"[% IF ( f148 ) %] selected="selected"[% END %]>8</option>
90
                <option value="9"[% IF ( f149 ) %] selected="selected"[% END %]>9 </option>
91
            </select>
92
        </td>
93
    </tr>
94
    <tr>
95
        <td><label for="f15">15 - Unit type</label></td>
96
        <td>
97
            <select name="f15" id="f15" size="1">
98
                <option value=" "[% IF ( f15 ) %] selected="selected"[% END %]># - No information provided</option>
99
                <option value="m"[% IF ( f15m ) %] selected="selected"[% END %]>m - Month(s)</option>
100
                <option value="w"[% IF ( f15w ) %] selected="selected"[% END %]>w - Week(s)</option>
101
                <option value="y"[% IF ( f15y ) %] selected="selected"[% END %]>y - Year(s)</option>
102
                <option value="e"[% IF ( f15e ) %] selected="selected"[% END %]>e - Edition(s)</option>
103
                <option value="i"[% IF ( f15i ) %] selected="selected"[% END %]>i - Issue(s)</option>
104
                <option value="s"[% IF ( f15s ) %] selected="selected"[% END %]>s - Supplement(s)</option>
105
            </select>
106
        </td>
107
    </tr>
108
    <tr>
109
        <td><label for="f16">16 - Completeness</label></td>
110
        <td>
111
            <select name="f16" id="f16" size="1">
112
                <option value="0"[% IF ( f160 ) %] selected="selected"[% END %]>0 - Other</option>
113
                <option value="1"[% IF ( f161 ) %] selected="selected"[% END %]>1 - Complete</option>
114
                <option value="2"[% IF ( f162 ) %] selected="selected"[% END %]>2 - Incomplete</option>
115
                <option value="3"[% IF ( f163 ) %] selected="selected"[% END %]>3 - Scattered</option>
116
                <option value="4"[% IF ( f164 ) %] selected="selected"[% END %]>4 - Not applicable</option>
117
            </select>
118
        </td>
119
    </tr>
120
	<tr>
121
		<td><label for="f17">17-19 - Number of copies reported</label></td>
122
		<td><input type="text" name="f17" id="f17" maxlength="3" size="4" value="[% f17 %]" /></td>
123
	</tr>
124
    <tr>
125
        <td><label for="f20">20 - Lending policy</label></td>
126
        <td>
127
            <select name="f20" id="f20" size="1">
128
                <option value="a"[% IF ( f20a ) %] selected="selected"[% END %]>a - Will lend</option>
129
                <option value="b"[% IF ( f20b ) %] selected="selected"[% END %]>b - Will not lend</option>
130
                <option value="c"[% IF ( f20c ) %] selected="selected"[% END %]>c - Will lend hard copy only</option>
131
                <option value="l"[% IF ( f20l ) %] selected="selected"[% END %]>l - Limited lending policy</option>
132
                <option value="u"[% IF ( f20u ) %] selected="selected"[% END %]>u - Unknown</option>
133
            </select>
134
        </td>
135
    </tr>
136
    <tr>
137
        <td><label for="f21">21 - Reproduction policy</label></td>
138
        <td>
139
            <select name="f21" id="f21" size="1">
140
                <option value="a"[% IF ( f21a ) %] selected="selected"[% END %]>a - Will reproduce</option>
141
                <option value="b"[% IF ( f21b ) %] selected="selected"[% END %]>b - Will not reproduce</option>
142
                <option value="u"[% IF ( f21u ) %] selected="selected"[% END %]>u - Unknown</option>
143
            </select>
144
        </td>
145
    </tr>
146
	<tr>
147
		<td><label for="f22">22-24 - Language</label></td>
148
		<td><input type="text" name="f22" id="f22" maxlength="3" size="4" value="[% f22 %]" /></td>
149
	</tr>
150
    <tr>
151
        <td><label for="f25">25 - Separate or composite copy report</label></td>
152
        <td>
153
            <select name="f25" id="f25" size="1">
154
                <option value="0"[% IF ( f250 ) %] selected="selected"[% END %]>0 - Separate copy report</option>
155
                <option value="1"[% IF ( f251 ) %] selected="selected"[% END %]>1 - Composite copy report</option>
156
            </select>
157
        </td>
158
    </tr>
159
	<tr>
160
		<td><label for="f26">26-31 - Date of report</label></td>
161
		<td><input type="text" name="f26" id="f26" maxlength="6" size="7" value="[% f26 %]" /></td>
162
	</tr>
163
</table>
164
<fieldset class="action"><input type="submit" value="OK" /> <a href="#" class="cancel close">Cancel</a></fieldset>
165
</form>
166
<script type="text/javascript">//<![CDATA[
167
function report() {
168
            var doc   = opener.document;
169
            var field = doc.getElementById("[% index %]");
170
171
            field.value =
172
			document.f_pop.f1.value+
173
			document.f_pop.f6.value+
174
			document.f_pop.f7.value+
175
			(document.f_pop.f8.value + '    ').substr(0, 4)+
176
			document.f_pop.f12.value+
177
			document.f_pop.f13.value+
178
			document.f_pop.f14.value+
179
			document.f_pop.f15.value+
180
			document.f_pop.f16.value+
181
			(document.f_pop.f17.value + '   ').substr(0, 3)+
182
			document.f_pop.f20.value+
183
			document.f_pop.f21.value+
184
			(document.f_pop.f22.value + '   ').substr(0, 3)+
185
			document.f_pop.f25.value+
186
			document.f_pop.f26.value;
187
		self.close();
188
		return false;
189
	}
190
	//]]>
191
</script>
192
193
[% INCLUDE 'popup-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_leader_holdings.tt (+105 lines)
Line 0 Link Here
1
[% INCLUDE 'doc-head-open.inc' %]
2
<title>Koha &rsaquo; Holdings &rsaquo; 000 - Leader builder</title>
3
[% INCLUDE 'doc-head-close.inc' %]
4
</head>
5
<body id="cat_marc21_leader_holdings" class="cat" style="padding:1em;">
6
<form name="f_pop" onsubmit="report()" action="">
7
<input type="hidden" name="plugin_name" value="marc21_leader_holdings.pl" />
8
<h3>000 - Leader</h3>
9
<table>
10
	<tr>
11
        <td><span class="label">0-4 Record size</span></td>
12
		<td>(auto-filled)</td>
13
	</tr>
14
	<tr>
15
		<td><label for="f5">5 - Record status</label></td>
16
		<td>
17
			<select name="f5" id="f5" size="1">
18
				<option value="c"[% IF ( f5c ) %] selected="selected"[% END %]>c - Corrected or revised</option>
19
				<option value="d"[% IF ( f5d ) %] selected="selected"[% END %]>d - Deleted</option>
20
				<option value="n"[% IF ( f5n ) %] selected="selected"[% END %]>n - New</option>
21
			</select>
22
		</td>
23
	</tr>
24
	<tr>
25
		<td><label for="f6">6 - Type of record</label></td>
26
		<td>
27
			<select name="f6" id="f6" size="1">
28
				<option value="u"[% IF ( f6u ) %] selected="selected"[% END %]>u - Unknown</option>
29
				<option value="v"[% IF ( f6v ) %] selected="selected"[% END %]>v - Multipart item holdings</option>
30
				<option value="x"[% IF ( f6x ) %] selected="selected"[% END %]>x - Single-part item holdings</option>
31
				<option value="y"[% IF ( f6y ) %] selected="selected"[% END %]>y - Serial item holdings</option>
32
			</select>
33
		</td>
34
	</tr>
35
    <tr>
36
        <tr>07-08 - Undefined</tr>
37
        <tr>  </tr>
38
    </tr>
39
	<tr>
40
		<td>9 - Character coding scheme</td>
41
		<td>a - UCS/Unicode (auto-filled)</td>
42
	</tr>
43
	<tr>
44
		<td>10-16 - indicator/subfields/size</td>
45
		<td>(auto-filled)</td>
46
    </tr>
47
	<tr>
48
		<td><label for="f17">17 - Encoding level</label></td>
49
		<td>
50
			<select name="f17" id="f17" size="1">
51
                <option value="1"[% IF ( f171 ) %] selected="selected"[% END %]>1 - Holdings level 1</option>
52
                <option value="2"[% IF ( f172 ) %] selected="selected"[% END %]>2 - Holdings level 2</option>
53
                <option value="3"[% IF ( f173 ) %] selected="selected"[% END %]>3 - Holdings level 3</option>
54
                <option value="4"[% IF ( f174 ) %] selected="selected"[% END %]>4 - Holdings level 4</option>
55
                <option value="5"[% IF ( f175 ) %] selected="selected"[% END %]>5 - Holdings level 4 with piece designation</option>
56
                <option value="m"[% IF ( f17m ) %] selected="selected"[% END %]>m - Mixed level</option>
57
                <option value="u"[% IF ( f17u ) %] selected="selected"[% END %]>u - Unknown</option>
58
                <option value="z"[% IF ( f17z ) %] selected="selected"[% END %]>z - Other level</option>
59
			</select>
60
		</td>
61
	</tr>
62
	<tr>
63
		<td><label for="f18">18 - Item information in record</label></td>
64
		<td>
65
			<select name="f18" id="f18" size="1">
66
                <option value="i"[% IF ( f18i ) %] selected="selected"[% END %]>i - Item information</option>
67
                <option value="n"[% IF ( f18n ) %] selected="selected"[% END %]>n - No item information</option>
68
			</select>
69
		</td>
70
	</tr>
71
	<tr>
72
		<td>19 - Undefined</td>
73
		<td></td>
74
    </tr>
75
	<tr>
76
		<td>20-24 - entry map &amp; lengths</td>
77
		<td>(auto-filled)</td>
78
	</tr>
79
80
</table>
81
<fieldset class="action"><input type="submit" value="OK" /> <a href="#" class="cancel close">Cancel</a></fieldset>
82
</form>
83
<script type="text/javascript">
84
//<![CDATA[
85
function report() {
86
            var doc   = opener.document;
87
            var field = doc.getElementById("[% index %]");
88
89
            field.value =
90
			'     '+
91
			document.f_pop.f5.value+
92
			document.f_pop.f6.value+
93
			'  '+
94
			'a'+ // MARC21 UNICODE flag - must be 'a' for Koha
95
			'22     '+
96
			document.f_pop.f17.value+
97
			document.f_pop.f18.value+
98
			' '+
99
			'4500';
100
		self.close();
101
		return false;
102
	}
103
	//]]>
104
</script>
105
[% INCLUDE 'popup-bottom.inc' %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt (+28 lines)
Lines 4-9 Link Here
4
[% USE Branches %]
4
[% USE Branches %]
5
[% USE ColumnsSettings %]
5
[% USE ColumnsSettings %]
6
[% USE AuthorisedValues %]
6
[% USE AuthorisedValues %]
7
[% USE Holdings %]
7
[% SET TagsShowEnabled = ( ( Koha.Preference( 'TagsEnabled' ) == 1 ) && TagsShowOnDetail ) %]
8
[% SET TagsShowEnabled = ( ( Koha.Preference( 'TagsEnabled' ) == 1 ) && TagsShowOnDetail ) %]
8
[% SET TagsInputEnabled = ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'TagsEnabled' ) == 1 ) && TagsInputOnDetail ) %]
9
[% SET TagsInputEnabled = ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'TagsEnabled' ) == 1 ) && TagsInputOnDetail ) %]
9
[% IF Koha.Preference('AmazonAssocTag') %]
10
[% IF Koha.Preference('AmazonAssocTag') %]
Lines 698-703 Link Here
698
                                [% END %]
699
                                [% END %]
699
                            [% END %]
700
                            [% END %]
700
                        [% END # IF itemloop.size %]
701
                        [% END # IF itemloop.size %]
702
                        [% IF summary_holdings %]
703
                            [% FOREACH holding IN summary_holdings %]
704
                                [% UNLESS holding.suppress %]
705
                                    [% holding_details = Holdings.GetDetails(holding) %]
706
                                    [% IF holding_details.public_note || holding_details.summary || holding_details.supplements || holding_details.indexes %]
707
                                        <span class="summary-holdings">
708
                                            <br>
709
                                            <strong>Additional information for [% Holdings.GetLocation(holding, 1) | html %]</strong>
710
                                            <ul>
711
                                                [% IF holding_details.public_note %]
712
                                                    <li>Public note: [% holding_details.public_note | html %]</li>
713
                                                [% END %]
714
                                                [% IF holding_details.summary %]
715
                                                    <li>Summary: [% holding_details.summary | html %]</li>
716
                                                [% END %]
717
                                                [% IF holding_details.supplements %]
718
                                                    <li>Supplements: [% holding_details.supplements | html %]</li>
719
                                                [% END %]
720
                                                [% IF holding_details.indexes %]
721
                                                    <li>Indexes: [% holding_details.indexes | html %]</li>
722
                                                [% END %]
723
                                            </ul>
724
                                        </span>
725
                                    [% END %]
726
                                [% END %]
727
                            [% END %]
728
                        [% END %]
701
                        [% PROCESS 'shelfbrowser.inc' %]
729
                        [% PROCESS 'shelfbrowser.inc' %]
702
                        [% INCLUDE shelfbrowser tab='holdings' %]
730
                        [% INCLUDE shelfbrowser tab='holdings' %]
703
                        <br style="clear:both;" />
731
                        <br style="clear:both;" />
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt (+10 lines)
Lines 1-4 Link Here
1
[% USE Koha %]
1
[% USE Koha %]
2
[% USE Holdings %]
2
[% SET TagsShowEnabled = ( ( Koha.Preference( 'TagsEnabled' ) == 1 ) && TagsShowOnList ) %]
3
[% SET TagsShowEnabled = ( ( Koha.Preference( 'TagsEnabled' ) == 1 ) && TagsShowOnList ) %]
3
[% SET TagsInputEnabled = ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'TagsEnabled' ) == 1 ) && TagsInputOnList ) %]
4
[% SET TagsInputEnabled = ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'TagsEnabled' ) == 1 ) && TagsInputOnList ) %]
4
5
Lines 400-405 Link Here
400
                                                                    [% END %]
401
                                                                    [% END %]
401
                                                                [% ELSE %]
402
                                                                [% ELSE %]
402
                                                                    <span class="unavailable">No items available:</span>
403
                                                                    <span class="unavailable">No items available:</span>
404
                                                                    [% IF ( SEARCH_RESULT.summary_holdings ) %]
405
                                                                        <span class="summary-holdings">
406
                                                                            [% FOREACH holding IN SEARCH_RESULT.summary_holdings %]
407
                                                                                [% UNLESS holding.suppress %]
408
                                                                                    [% Holdings.GetLocation(holding, 1) | html %],
409
                                                                                [% END %]
410
                                                                            [% END %]
411
                                                                        </span>
412
                                                                    [% END %]
403
                                                                [% END %]
413
                                                                [% END %]
404
                                                            [% END # / IF SEARCH_RESULT.available_items_loop.size %]
414
                                                            [% END # / IF SEARCH_RESULT.available_items_loop.size %]
405
415
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl (-2 / +17 lines)
Lines 4-12 Link Here
4
<xsl:stylesheet version="1.0"
4
<xsl:stylesheet version="1.0"
5
  xmlns:marc="http://www.loc.gov/MARC21/slim"
5
  xmlns:marc="http://www.loc.gov/MARC21/slim"
6
  xmlns:items="http://www.koha-community.org/items"
6
  xmlns:items="http://www.koha-community.org/items"
7
  xmlns:holdings="http://www.koha-community.org/holdings"
7
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
8
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
8
  xmlns:str="http://exslt.org/strings"
9
  xmlns:str="http://exslt.org/strings"
9
  exclude-result-prefixes="marc items">
10
  exclude-result-prefixes="marc items holdings">
10
    <xsl:import href="MARC21slimUtils.xsl"/>
11
    <xsl:import href="MARC21slimUtils.xsl"/>
11
    <xsl:output method = "html" indent="yes" omit-xml-declaration = "yes" encoding="UTF-8"/>
12
    <xsl:output method = "html" indent="yes" omit-xml-declaration = "yes" encoding="UTF-8"/>
12
    <xsl:key name="item-by-status" match="items:item" use="items:status"/>
13
    <xsl:key name="item-by-status" match="items:item" use="items:status"/>
Lines 1159-1165 Link Here
1159
                            </xsl:for-each>
1160
                            </xsl:for-each>
1160
                            (<xsl:value-of select="$AlternateHoldingsCount"/>)
1161
                            (<xsl:value-of select="$AlternateHoldingsCount"/>)
1161
                            </xsl:when>
1162
                            </xsl:when>
1162
                            <xsl:otherwise>No items available </xsl:otherwise>
1163
                            <xsl:otherwise>
1164
                                <xsl:text>No items available</xsl:text>
1165
                                <xsl:if test="//holdings:holdings/holdings:holding/holdings:suppress[.='0']">:
1166
                                    <xsl:for-each select="//holdings:holdings/holdings:holding[./holdings:suppress='0']">
1167
                                        <xsl:if test="position() > 1">, </xsl:if>
1168
                                        <xsl:value-of select="./holdings:holdingbranch"/>
1169
                                        <xsl:if test="string-length(./holdings:location) > 0">
1170
                                        - <xsl:value-of select="./holdings:location"/>
1171
                                        </xsl:if>
1172
                                        <xsl:if test="string-length(./holdings:callnumber) > 0">
1173
                                        - <xsl:value-of select="./holdings:callnumber"/>
1174
                                        </xsl:if>
1175
                                    </xsl:for-each>
1176
                                </xsl:if>
1177
                            </xsl:otherwise>
1163
                        </xsl:choose>
1178
                        </xsl:choose>
1164
				   </xsl:when>
1179
				   </xsl:when>
1165
                   <xsl:when test="count(key('item-by-status', 'available'))>0">
1180
                   <xsl:when test="count(key('item-by-status', 'available'))>0">
(-)a/opac/opac-detail.pl (+7 lines)
Lines 735-740 if (scalar(@itemloop) == 0 || scalar(@otheritemloop) == 0) { Link Here
735
    }
735
    }
736
}
736
}
737
737
738
# Fetch summary holdings
739
if (C4::Context->preference('SummaryHoldings')) {
740
    my $summary_holdings = C4::Holdings::GetHoldingsByBiblionumber($biblionumber);
741
    $template->param( summary_holdings => $summary_holdings );
742
}
743
744
738
## get notes and subjects from MARC record
745
## get notes and subjects from MARC record
739
if (!C4::Context->preference("OPACXSLTDetailsDisplay") ) {
746
if (!C4::Context->preference("OPACXSLTDetailsDisplay") ) {
740
    my $marcisbnsarray   = GetMarcISBN    ($record,$marcflavour);
747
    my $marcisbnsarray   = GetMarcISBN    ($record,$marcflavour);
(-)a/t/db_dependent/Koha/BiblioFrameworks.t (-1 / +2 lines)
Lines 29-38 my $nb_of_frameworks = Koha::BiblioFrameworks->search->count; Link Here
29
my $new_framework_1 = Koha::BiblioFramework->new({
29
my $new_framework_1 = Koha::BiblioFramework->new({
30
    frameworkcode => 'mfw1',
30
    frameworkcode => 'mfw1',
31
    frameworktext => 'my_frameworktext_for_fw_1',
31
    frameworktext => 'my_frameworktext_for_fw_1',
32
    frameworktype => 'bib',
32
})->store;
33
})->store;
33
my $new_framework_2 = Koha::BiblioFramework->new({
34
my $new_framework_2 = Koha::BiblioFramework->new({
34
    frameworkcode => 'mfw2',
35
    frameworkcode => 'mfw2',
35
    frameworktext => 'my_frameworktext_for_fw_2',
36
    frameworktext => 'my_frameworktext_for_fw_2',
37
    frameworktype => 'hld',
36
})->store;
38
})->store;
37
39
38
is( Koha::BiblioFrameworks->search->count, $nb_of_frameworks + 2, 'The 2 biblio frameworks should have been added' );
40
is( Koha::BiblioFrameworks->search->count, $nb_of_frameworks + 2, 'The 2 biblio frameworks should have been added' );
39
- 

Return to bug 20447