|
Lines 1545-1550
sub ratings {
Link Here
|
| 1545 |
return Koha::Ratings->_new_from_dbic($rs); |
1545 |
return Koha::Ratings->_new_from_dbic($rs); |
| 1546 |
} |
1546 |
} |
| 1547 |
|
1547 |
|
|
|
1548 |
=head3 opac_summary_html |
| 1549 |
|
| 1550 |
my $summary_html = $biblio->opac_summary_html |
| 1551 |
|
| 1552 |
Based on the syspref OPACMySummaryHTML, returns a string representing the |
| 1553 |
summary of this bibliographic record. |
| 1554 |
{AUTHOR}, {TITLE}, {ISBN} and {BIBLIONUMBER} will be replaced. |
| 1555 |
|
| 1556 |
=cut |
| 1557 |
|
| 1558 |
sub opac_summary_html { |
| 1559 |
my ($self) = @_; |
| 1560 |
|
| 1561 |
my $summary_html = C4::Context->preference('OPACMySummaryHTML'); |
| 1562 |
return q{} unless $summary_html; |
| 1563 |
my $author = $self->author || q{}; |
| 1564 |
my $title = $self->title || q{}; |
| 1565 |
$title =~ s/\/+$//; # remove trailing slash |
| 1566 |
$title =~ s/\s+$//; # remove trailing space |
| 1567 |
my $normalized_isbn = $self->normalized_isbn || q{}; |
| 1568 |
my $biblionumber = $self->biblionumber; |
| 1569 |
|
| 1570 |
$summary_html =~ s/{AUTHOR}/$author/g; |
| 1571 |
$summary_html =~ s/{TITLE}/$title/g; |
| 1572 |
$summary_html =~ s/{ISBN}/$normalized_isbn/g; |
| 1573 |
$summary_html =~ s/{BIBLIONUMBER}/$biblionumber/g; |
| 1574 |
|
| 1575 |
return $summary_html; |
| 1576 |
} |
| 1577 |
|
| 1548 |
=head2 Internal methods |
1578 |
=head2 Internal methods |
| 1549 |
|
1579 |
|
| 1550 |
=head3 type |
1580 |
=head3 type |
| 1551 |
- |
|
|