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

(-)a/C4/Biblio.pm (+19 lines)
Lines 67-72 BEGIN { Link Here
67
67
68
      &GetISBDView
68
      &GetISBDView
69
69
70
      &GetMarcControlnumber
70
      &GetMarcNotes
71
      &GetMarcNotes
71
      &GetMarcSubjects
72
      &GetMarcSubjects
72
      &GetMarcBiblio
73
      &GetMarcBiblio
Lines 1254-1259 sub GetAuthorisedValueDesc { Link Here
1254
    }
1255
    }
1255
}
1256
}
1256
1257
1258
=head2 GetMarcControlnumber
1259
1260
  $marccontrolnumber = GetMarcControlnumber($record,$marcflavour);
1261
1262
Get the control number / record Identifier from the MARC record and return it.
1263
1264
=cut
1265
1266
sub GetMarcControlnumber {
1267
    my ( $record, $marcflavour ) = @_;
1268
    my $controlnumber = "";
1269
    # Control number or Record identifier are the same field in MARC21 and UNIMARC
1270
    # Keep $marcflavour for possible later use
1271
    if ($marcflavour eq "MARC21" || $marcflavour eq "UNIMARC") {
1272
        $controlnumber = $record->field('001')->data();
1273
    }
1274
}
1275
1257
=head2 GetMarcNotes
1276
=head2 GetMarcNotes
1258
1277
1259
  $marcnotesarray = GetMarcNotes( $record, $marcflavour );
1278
  $marcnotesarray = GetMarcNotes( $record, $marcflavour );
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref (-1 / +1 lines)
Lines 137-143 OPAC: Link Here
137
              class: code
137
              class: code
138
        -
138
        -
139
            - 'Include a "More Searches" box on the detail pages of items on the OPAC, with the following HTML (leave blank to disable):'
139
            - 'Include a "More Searches" box on the detail pages of items on the OPAC, with the following HTML (leave blank to disable):'
140
            - '<br />Note: The placeholders {TITLE}, {ISBN} and {AUTHOR} will be replaced with information from the displayed record.'
140
            - '<br />Note: The placeholders {CONTROLNUMBER}, {TITLE}, {ISBN} and {AUTHOR} will be replaced with information from the displayed record.'
141
            - pref: OPACSearchForTitleIn
141
            - pref: OPACSearchForTitleIn
142
              type: textarea
142
              type: textarea
143
              class: code
143
              class: code
(-)a/opac/opac-detail.pl (-1 / +3 lines)
Lines 584-595 if (C4::Context->preference('TagsEnabled') and $tag_quantity = C4::Context->pref Link Here
584
}
584
}
585
585
586
#Search for title in links
586
#Search for title in links
587
my $marccontrolnumber   = GetMarcControlnumber   ($record, $marcflavour);
588
587
if (my $search_for_title = C4::Context->preference('OPACSearchForTitleIn')){
589
if (my $search_for_title = C4::Context->preference('OPACSearchForTitleIn')){
588
    $dat->{author} ? $search_for_title =~ s/{AUTHOR}/$dat->{author}/g : $search_for_title =~ s/{AUTHOR}//g;
590
    $dat->{author} ? $search_for_title =~ s/{AUTHOR}/$dat->{author}/g : $search_for_title =~ s/{AUTHOR}//g;
589
    $dat->{title} =~ s/\/+$//; # remove trailing slash
591
    $dat->{title} =~ s/\/+$//; # remove trailing slash
590
    $dat->{title} =~ s/\s+$//; # remove trailing space
592
    $dat->{title} =~ s/\s+$//; # remove trailing space
591
    $dat->{title} ? $search_for_title =~ s/{TITLE}/$dat->{title}/g : $search_for_title =~ s/{TITLE}//g;
593
    $dat->{title} ? $search_for_title =~ s/{TITLE}/$dat->{title}/g : $search_for_title =~ s/{TITLE}//g;
592
    $isbn ? $search_for_title =~ s/{ISBN}/$isbn/g : $search_for_title =~ s/{ISBN}//g;
594
    $isbn ? $search_for_title =~ s/{ISBN}/$isbn/g : $search_for_title =~ s/{ISBN}//g;
595
    $marccontrolnumber ? $search_for_title =~ s/{CONTROLNUMBER}/$marccontrolnumber/g : $search_for_title =~ s/{CONTROLNUMBER}//g;
593
 $template->param('OPACSearchForTitleIn' => $search_for_title);
596
 $template->param('OPACSearchForTitleIn' => $search_for_title);
594
}
597
}
595
598
596
- 

Return to bug 5430