Bugzilla – Attachment 37222 Details for
Bug 6379
Remove link from unapproved and rejected tags in the OPAC's "My tags" table
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[Signed-off] Bug 6379: Remove link from unapproved tags
Signed-off-Bug-6379-Remove-link-from-unapproved-ta.patch (text/plain), 3.00 KB, created by
Marc Véron
on 2015-03-25 15:29:41 UTC
(
hide
)
Description:
[Signed-off] Bug 6379: Remove link from unapproved tags
Filename:
MIME Type:
Creator:
Marc Véron
Created:
2015-03-25 15:29:41 UTC
Size:
3.00 KB
patch
obsolete
>From efdb650c4f06f9cbb1d5673bb2eb24f622e0cfd6 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Wed, 25 Mar 2015 13:44:25 +0100 >Subject: [PATCH] [Signed-off] Bug 6379: Remove link from unapproved tags >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >At the OPAC, if the tag is not approved, the tag's link did not return >any result. > >This patch removes the link. >Test plan: >1/ Set TagsModeration to 'Require' >2/ Create tags at the OPAC >3/ Approve a couple >4/ Confirm that unapproved tags does not have links. > >Works as expected. Unapproved tags in column 'Terms' are not linked and are marked with (not approved) >Signed-off-by: Marc Véron <veron@veron.ch> >--- > C4/Tags.pm | 7 ++++++- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-tags.tt | 9 +++++++-- > 2 files changed, 13 insertions(+), 3 deletions(-) > >diff --git a/C4/Tags.pm b/C4/Tags.pm >index c775da9..f96a8b0 100644 >--- a/C4/Tags.pm >+++ b/C4/Tags.pm >@@ -208,7 +208,12 @@ sub get_tag_rows { > push @exe_args, $hash->{$key}; > } > } >- my $query = TAG_SELECT . ($wheres||'') . $limit; >+ my $query = q| >+ SELECT tall.tag_id, tall.borrowernumber, tall.biblionumber, tall.term, tall.language, tall.date_created, tapp.approved >+ FROM tags_all tall >+ LEFT JOIN tags_approval tapp ON tapp.term = tall.term >+ |; >+ $query .= ($wheres||'') . $limit; > $debug and print STDERR "get_tag_rows query:\n $query\n", > "get_tag_rows query args: ", join(',', @exe_args), "\n"; > my $sth = C4::Context->dbh->prepare($query); >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-tags.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-tags.tt >index b9a7072..14c5f32 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-tags.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-tags.tt >@@ -121,8 +121,13 @@ > <tr> > <td class="tagterm"> > <span class="tdlabel">Tag:</span> >- <a href="/cgi-bin/koha/opac-search.pl?tag=[% MY_TAG.term |url %]&q=[% MY_TAG.term |url %]"> >- [% MY_TAG.term |html %]</a></td> >+ [% IF MY_TAG.approved == 1 %] >+ <a href="/cgi-bin/koha/opac-search.pl?tag=[% MY_TAG.term |url %]&q=[% MY_TAG.term |url %]">[% MY_TAG.term |html %]</a> >+ [% ELSE %] >+ [% MY_TAG.term |html %] (not approved) >+ [% END %] >+ </td> >+ > <td> > [% IF ( MY_TAG.XSLTBloc ) %] > [% MY_TAG.XSLTBloc %] >-- >1.7.10.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 6379
:
5266
|
37211
|
37222
|
37259
|
39088
|
40915
|
43084
|
43085