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

(-)a/C4/Items.pm (-1 / +4 lines)
Lines 478-483 sub _build_default_values_for_mod_marc { Link Here
478
        stocknumber              => undef,
478
        stocknumber              => undef,
479
        uri                      => undef,
479
        uri                      => undef,
480
        withdrawn                => 0,
480
        withdrawn                => 0,
481
        link_text                => undef,
481
    };
482
    };
482
    my %default_values_for_mod_from_marc;
483
    my %default_values_for_mod_from_marc;
483
    while ( my ( $field, $default_value ) = each %$default_values ) {
484
    while ( my ( $field, $default_value ) = each %$default_values ) {
Lines 1789-1795 sub _koha_new_item { Link Here
1789
            more_subfields_xml  = ?,
1790
            more_subfields_xml  = ?,
1790
            copynumber          = ?,
1791
            copynumber          = ?,
1791
            stocknumber         = ?,
1792
            stocknumber         = ?,
1792
            new_status          = ?
1793
            new_status          = ?,
1794
            link_text           = ?
1793
          ";
1795
          ";
1794
    my $sth = $dbh->prepare($query);
1796
    my $sth = $dbh->prepare($query);
1795
    my $today = output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 });
1797
    my $today = output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 });
Lines 1834-1839 sub _koha_new_item { Link Here
1834
            $item->{'copynumber'},
1836
            $item->{'copynumber'},
1835
            $item->{'stocknumber'},
1837
            $item->{'stocknumber'},
1836
            $item->{'new_status'},
1838
            $item->{'new_status'},
1839
            $item->{'link_text'}
1837
    );
1840
    );
1838
1841
1839
    my $itemnumber;
1842
    my $itemnumber;
(-)a/Koha/Schema/Result/Item.pm (+8 lines)
Lines 280-285 __PACKAGE__->table("items"); Link Here
280
  is_nullable: 1
280
  is_nullable: 1
281
  size: 32
281
  size: 32
282
282
283
=head2 link_text
284
285
  data_type: 'varchar'
286
  is_nullable: 1
287
  size: 200
288
283
=cut
289
=cut
284
290
285
__PACKAGE__->add_columns(
291
__PACKAGE__->add_columns(
Lines 394-399 __PACKAGE__->add_columns( Link Here
394
  { data_type => "varchar", is_nullable => 1, size => 32 },
400
  { data_type => "varchar", is_nullable => 1, size => 32 },
395
  "new_status",
401
  "new_status",
396
  { data_type => "varchar", is_nullable => 1, size => 32 },
402
  { data_type => "varchar", is_nullable => 1, size => 32 },
403
  "link_text",
404
  { data_type => "varchar", is_nullable => 1, size => 200 },
397
);
405
);
398
406
399
=head1 PRIMARY KEY
407
=head1 PRIMARY KEY
(-)a/catalogue/detail.pl (-1 / +2 lines)
Lines 249-255 foreach my $item (@items) { Link Here
249
    $item->{'ccode'} = $collections->{$ccode} if ( defined( $ccode ) && defined($collections) && exists( $collections->{$ccode} ) );
249
    $item->{'ccode'} = $collections->{$ccode} if ( defined( $ccode ) && defined($collections) && exists( $collections->{$ccode} ) );
250
    my $copynumber = $item->{'copynumber'};
250
    my $copynumber = $item->{'copynumber'};
251
    $item->{'copynumber'} = $copynumbers->{$copynumber} if ( defined($copynumber) && defined($copynumbers) && exists( $copynumbers->{$copynumber} ) );
251
    $item->{'copynumber'} = $copynumbers->{$copynumber} if ( defined($copynumber) && defined($copynumbers) && exists( $copynumbers->{$copynumber} ) );
252
    foreach (qw(ccode enumchron copynumber stocknumber itemnotes itemnotes_nonpublic uri)) {
252
    foreach (qw(ccode enumchron copynumber stocknumber itemnotes itemnotes_nonpublic uri link_text)) {
253
        $itemfields{$_} = 1 if ( $item->{$_} );
253
        $itemfields{$_} = 1 if ( $item->{$_} );
254
    }
254
    }
255
255
Lines 362-367 $template->param( Link Here
362
	volinfo				=> $itemfields{enumchron},
362
	volinfo				=> $itemfields{enumchron},
363
        itemdata_itemnotes  => $itemfields{itemnotes},
363
        itemdata_itemnotes  => $itemfields{itemnotes},
364
        itemdata_nonpublicnotes => $itemfields{itemnotes_nonpublic},
364
        itemdata_nonpublicnotes => $itemfields{itemnotes_nonpublic},
365
        itemdata_linktext => $itemfields{link_text},
365
	z3950_search_params	=> C4::Search::z3950_search_args($dat),
366
	z3950_search_params	=> C4::Search::z3950_search_args($dat),
366
        hostrecords         => $hostrecords,
367
        hostrecords         => $hostrecords,
367
	analytics_flag	=> $analytics_flag,
368
	analytics_flag	=> $analytics_flag,
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt (-3 / +7 lines)
Lines 251-257 Link Here
251
            <li><strong>Dewey:</strong> [% dewey %]</li>
251
            <li><strong>Dewey:</strong> [% dewey %]</li>
252
        [% END %]
252
        [% END %]
253
        [% IF ( urlS ) %]
253
        [% IF ( urlS ) %]
254
            <li><strong>URL:</strong>
254
            <li><strong>URL/Link:</strong>
255
                [% FOREACH url IN urlS %]
255
                [% FOREACH url IN urlS %]
256
                    <a href="[% url.url %]">[% url.url %]</a>
256
                    <a href="[% url.url %]">[% url.url %]</a>
257
                [% END %]
257
                [% END %]
Lines 338-344 Link Here
338
                <th>Last seen</th>
338
                <th>Last seen</th>
339
                <th>Barcode</th>
339
                <th>Barcode</th>
340
                [% IF ( volinfo ) %]<th>Serial enumeration / chronology</th>[% END %]
340
                [% IF ( volinfo ) %]<th>Serial enumeration / chronology</th>[% END %]
341
                [% IF ( itemdata_uri ) %]<th>URL</th>[% END %]
341
                [% IF ( itemdata_uri ) %]<th>URL/Link</th>[% END %]
342
                [% IF ( itemdata_copynumber ) %]<th>Copy number</th>[% END %]
342
                [% IF ( itemdata_copynumber ) %]<th>Copy number</th>[% END %]
343
                [% IF ( itemdata_stocknumber ) %]<th>Inventory number</th>[% END %]
343
                [% IF ( itemdata_stocknumber ) %]<th>Inventory number</th>[% END %]
344
                [% IF materials %]<th>Materials specified</th>[% END %]
344
                [% IF materials %]<th>Materials specified</th>[% END %]
Lines 481-487 Link Here
481
                        </td>
481
                        </td>
482
                    [% END %]
482
                    [% END %]
483
                    [% IF ( itemdata_uri ) %]
483
                    [% IF ( itemdata_uri ) %]
484
                        <td class="uri"><a href="[% item.uri %]">[% item.uri %]</a></td>
484
                        [% IF ( itemdata_linktext ) %]
485
                            <td class="uri"><a href="[% item.uri %]">[% item.link_text %]</a></td>
486
                        [% ELSE %]
487
                            <td class="uri"><a href="[% item.uri %]">[% item.uri %]</a></td>
488
                        [% END %]
485
                    [% END %]
489
                    [% END %]
486
                    [% IF ( itemdata_copynumber ) %]
490
                    [% IF ( itemdata_copynumber ) %]
487
                        <td class="copynumber">[% item.copynumber %]</td>
491
                        <td class="copynumber">[% item.copynumber %]</td>
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt (-3 / +11 lines)
Lines 1191-1197 Link Here
1191
                [% IF ( itemdata_ccode ) %]<th id="item_ccode" class="collection">Collection</th>[% END %]
1191
                [% IF ( itemdata_ccode ) %]<th id="item_ccode" class="collection">Collection</th>[% END %]
1192
                <th id="item_callnumber" class="call_no">Call number</th>
1192
                <th id="item_callnumber" class="call_no">Call number</th>
1193
                [% IF ( itemdata_enumchron ) %]<th id="item_enumchron" class="vol_info">Vol info</th>[% END %]
1193
                [% IF ( itemdata_enumchron ) %]<th id="item_enumchron" class="vol_info">Vol info</th>[% END %]
1194
                [% IF ( itemdata_uri ) %]<th id="item_url" class="url">URL</th>[% END %]
1194
                [% IF ( itemdata_uri ) %]<th id="item_url" class="url">URL/Link</th>[% END %]
1195
                [% IF ( itemdata_copynumber ) %]<th id="item_copy" class="copynumber">Copy number</th>[% END %]
1195
                [% IF ( itemdata_copynumber ) %]<th id="item_copy" class="copynumber">Copy number</th>[% END %]
1196
                <th id="item_status" class="status">Status</th>
1196
                <th id="item_status" class="status">Status</th>
1197
                [% IF ( itemdata_itemnotes ) %]<th id="item_notes" class="notes">Notes</th>[% END %]
1197
                [% IF ( itemdata_itemnotes ) %]<th id="item_notes" class="notes">Notes</th>[% END %]
Lines 1317-1325 Link Here
1317
1317
1318
                                [% ELSE %]
1318
                                [% ELSE %]
1319
                                    [% IF Koha.Preference("OPACURLOpenInNewWindow") %]
1319
                                    [% IF Koha.Preference("OPACURLOpenInNewWindow") %]
1320
                                    <a target="_blank" rel="noreferrer" href="[% ITEM_RESULT.uri %]" property="url">[% ITEM_RESULT.uri %]</a>
1320
                                         [% IF ITEM_RESULT.link_text %]
1321
                                            <a target="_blank" rel="noreferrer" href="[% ITEM_RESULT.uri %]" property="url">[% ITEM_RESULT.link_text %]</a>
1322
                                         [% ELSE %]
1323
                                            <a target="_blank" rel="noreferrer" href="[% ITEM_RESULT.uri %]" property="url">[% ITEM_RESULT.uri %]</a>
1324
                                         [% END %]
1321
                                    [% ELSE %]
1325
                                    [% ELSE %]
1322
                                    <a href="[% ITEM_RESULT.uri %]" property="url">[% ITEM_RESULT.uri %]</a>
1326
                                        [% IF ITEM_RESULT.link_text %]
1327
                                            <a href="[% ITEM_RESULT.uri %]" property="url">[% ITEM_RESULT.link_text %]</a>
1328
                                        [% ELSE %]
1329
                                            <a href="[% ITEM_RESULT.uri %]" property="url">[% ITEM_RESULT.uri %]</a>
1330
                                        [% END %]
1323
                                    [% END %]
1331
                                    [% END %]
1324
                                [% END %]
1332
                                [% END %]
1325
                            [% END %]
1333
                            [% END %]
(-)a/opac/opac-detail.pl (-3 / +4 lines)
Lines 685-691 if ( not $viewallitems and @items > $max_items_to_display ) { Link Here
685
        $itm->{'imageurl'}    = getitemtypeimagelocation( 'opac', $itemtypes->{ $itm->{itype} }->{'imageurl'} );
685
        $itm->{'imageurl'}    = getitemtypeimagelocation( 'opac', $itemtypes->{ $itm->{itype} }->{'imageurl'} );
686
        $itm->{'description'} = $itemtypes->{ $itm->{itype} }->{translated_description};
686
        $itm->{'description'} = $itemtypes->{ $itm->{itype} }->{translated_description};
687
    }
687
    }
688
    foreach (qw(ccode enumchron copynumber itemnotes uri)) {
688
689
    foreach (qw(ccode enumchron copynumber itemnotes uri link_text)) {
689
        $itemfields{$_} = 1 if ($itm->{$_});
690
        $itemfields{$_} = 1 if ($itm->{$_});
690
    }
691
    }
691
692
Lines 759-765 my $subtitle = GetRecordValue('subtitle', $record, GetFrameworkCode($bib Link Here
759
                     itemdata_enumchron      => $itemfields{enumchron},
760
                     itemdata_enumchron      => $itemfields{enumchron},
760
                     itemdata_uri            => $itemfields{uri},
761
                     itemdata_uri            => $itemfields{uri},
761
                     itemdata_copynumber     => $itemfields{copynumber},
762
                     itemdata_copynumber     => $itemfields{copynumber},
762
                     itemdata_itemnotes          => $itemfields{itemnotes},
763
                     itemdata_itemnotes      => $itemfields{itemnotes},
764
                     itemdata_linktext       => $itemfields{link_text},
763
                     subtitle                => $subtitle,
765
                     subtitle                => $subtitle,
764
                     OpacStarRatings         => C4::Context->preference("OpacStarRatings"),
766
                     OpacStarRatings         => C4::Context->preference("OpacStarRatings"),
765
    );
767
    );
766
- 

Return to bug 19360