@@ -, +, @@ - Adds a new page to the tags moderation section for viewing all the titles tagged with a particular term. - Adds display of approved tags to the catalog detail page matching the opac view. Adding tags from the detail view not implemented. - I think it would be better to show "Also tagged with:" and exclude the current tag from the list of titles tagged with a particular tag. - It would be nice to be able to show unapproved tags (and some idication of their status) along with approved tags on the detail page if the user had TagsModeration permission. --- catalogue/detail.pl | 13 +++ .../prog/en/modules/catalogue/detail.tt | 27 +++++ .../intranet-tmpl/prog/en/modules/tags/list.tt | 103 ++++++++++++++++++++ .../intranet-tmpl/prog/en/modules/tags/review.tt | 2 +- tags/list.pl | 81 +++++++++++++++ 5 files changed, 225 insertions(+), 1 deletions(-) create mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/tags/list.tt create mode 100755 tags/list.pl --- a/catalogue/detail.pl +++ a/catalogue/detail.pl @@ -35,6 +35,7 @@ use C4::Serials; use C4::XISBN qw(get_xisbns get_biblionumber_from_isbn); use C4::External::Amazon; use C4::Search; # enabled_staff_search_views +use C4::Tags qw(get_tags); use C4::VirtualShelves; use C4::XSLT; @@ -384,4 +385,16 @@ if (C4::Context->preference('OPACBaseURL')){ $template->param( OpacUrl => C4::Context->preference('OPACBaseURL') ); } +# Displaying tags + +my $tag_quantity; +if (C4::Context->preference('TagsEnabled') and $tag_quantity = C4::Context->preference('TagsShowOnDetail')) { + $template->param( + TagsEnabled => 1, + TagsShowOnDetail => $tag_quantity + ); + $template->param(TagLoop => get_tags({biblionumber=>$biblionumber, approved=>1, + 'sort'=>'-weight', limit=>$tag_quantity})); +} + output_html_with_http_headers $query, $cookie, $template->output; --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -97,6 +97,18 @@ function verify_images() { [% END %] [% END %] + [% IF ( TagsEnabled && TagsShowOnDetail && TagLoop ) %] + Tags: + [% FOREACH TagLoo IN TagLoop %] + [% IF ( CAN_user_tools_moderate_tags ) %] + [% TagLoo.term |html %] + [% ELSE %] + [% TagLoo.term |html %] + [% END %] + ([% TagLoo.weight_total %])[% IF ( loop.last ) %][% ELSE %], [% END %] + [% END %] + + [% END %] [% IF ( holdcount ) %]Holds: [% holdcount %][% ELSE %][% END %] [% IF ( AmazonEnabled ) %][% IF ( AmazonCoverImages ) %]
Title | +Location | ++ |
---|---|---|
[% INCLUDE 'biblio-default-view.inc' biblionumber = title.biblionumber %][% title.title |html %][% FOREACH subtitl IN title.subtitle %] [% subtitl.subfield %][% END %]
+ [% title.author %]
+ [% IF ( title.publishercode ) %]- [% title.publishercode|html %] + [% IF ( title.place ) %] [% title.place %][% END %][% END %] + [% IF ( title.pages ) %] - [% title.pages %][% IF ( title.size ) %] [% title.size %] + [% END %] + [% END %] + [% IF ( title.notes ) %] +[% title.notes |html%] [% END %] + [% IF ( title.TagLoop ) %]Tagged with: [% FOREACH TagLoo IN title.TagLoop %] + [% TagLoo.term |html %] ([% TagLoo.weight_total %])[% IF ( loop.last ) %][% ELSE %], [% END %] + [% END %] + [% END %] + |
+ [% IF ( title.items ) %]
|
+ + |