|
Lines 1565-1570
sub ratings {
Link Here
|
| 1565 |
return Koha::Ratings->_new_from_dbic($rs); |
1565 |
return Koha::Ratings->_new_from_dbic($rs); |
| 1566 |
} |
1566 |
} |
| 1567 |
|
1567 |
|
|
|
1568 |
=head3 opac_summary_html |
| 1569 |
|
| 1570 |
my $summary_html = $biblio->opac_summary_html |
| 1571 |
|
| 1572 |
Based on the syspref OPACMySummaryHTML, returns a string representing the |
| 1573 |
summary of this bibliographic record. |
| 1574 |
{AUTHOR}, {TITLE}, {ISBN} and {BIBLIONUMBER} will be replaced. |
| 1575 |
|
| 1576 |
=cut |
| 1577 |
|
| 1578 |
sub opac_summary_html { |
| 1579 |
my ($self) = @_; |
| 1580 |
|
| 1581 |
my $summary_html = C4::Context->preference('OPACMySummaryHTML'); |
| 1582 |
return q{} unless $summary_html; |
| 1583 |
my $author = $self->author || q{}; |
| 1584 |
my $title = $self->title || q{}; |
| 1585 |
$title =~ s/\/+$//; # remove trailing slash |
| 1586 |
$title =~ s/\s+$//; # remove trailing space |
| 1587 |
my $normalized_isbn = $self->normalized_isbn || q{}; |
| 1588 |
my $biblionumber = $self->biblionumber; |
| 1589 |
|
| 1590 |
$summary_html =~ s/{AUTHOR}/$author/g; |
| 1591 |
$summary_html =~ s/{TITLE}/$title/g; |
| 1592 |
$summary_html =~ s/{ISBN}/$normalized_isbn/g; |
| 1593 |
$summary_html =~ s/{BIBLIONUMBER}/$biblionumber/g; |
| 1594 |
|
| 1595 |
return $summary_html; |
| 1596 |
} |
| 1597 |
|
| 1568 |
=head2 Internal methods |
1598 |
=head2 Internal methods |
| 1569 |
|
1599 |
|
| 1570 |
=head3 type |
1600 |
=head3 type |
| 1571 |
- |
|
|