Bugzilla – Attachment 102854 Details for
Bug 23591
Add a new "Suggestions details" tab on bibliographic record
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23591: Hide archived suggestions
Bug-23591-Hide-archived-suggestions.patch (text/plain), 3.81 KB, created by
Katrin Fischer
on 2020-04-13 14:52:56 UTC
(
hide
)
Description:
Bug 23591: Hide archived suggestions
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2020-04-13 14:52:56 UTC
Size:
3.81 KB
patch
obsolete
>From 046b07040c992af80a007302907e977980549ba5 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 19 Nov 2019 17:35:09 +0100 >Subject: [PATCH] Bug 23591: Hide archived suggestions > >However we are adding a note on top of the table to tell how many >suggestions are archived. It seems that there is no good reason to >display the archived suggestions on this table. > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > catalogue/detail.pl | 4 +++- > koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt | 5 ++++- > 2 files changed, 7 insertions(+), 2 deletions(-) > >diff --git a/catalogue/detail.pl b/catalogue/detail.pl >index 714e3bc012..c968e33dc9 100755 >--- a/catalogue/detail.pl >+++ b/catalogue/detail.pl >@@ -250,12 +250,14 @@ if ( C4::Context->preference('suggestion') ) { > my $suggestions = Koha::Suggestions->search( > { > biblionumber => $biblionumber, >+ archived => 0, > }, > { > order_by => { -desc => 'suggesteddate' } > } > ); >- $template->param( suggestions => $suggestions ); >+ my $nb_archived_suggestions = Koha::Suggestions->search({ biblionumber => $biblionumber, archived => 1 })->count; >+ $template->param( suggestions => $suggestions, nb_archived_suggestions => $nb_archived_suggestions ); > } > > if ( defined $dat->{'itemtype'} ) { >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >index 48ab159802..f164618fab 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >@@ -6,6 +6,7 @@ > [% USE Branches %] > [% USE Biblio %] > [% USE ColumnsSettings %] >+[% PROCESS 'i18n.inc' %] > [% SET AdlibrisEnabled = Koha.Preference('AdlibrisCoversEnabled') %] > [% SET AdlibrisURL = Koha.Preference('AdlibrisCoversURL') %] > >@@ -698,6 +699,9 @@ Note that permanent location is a code, and location may be an authval. > > [% IF suggestions.count %] > <div id="suggestion_details"> >+ [% IF nb_archived_suggestions > 0 %] >+ <p>[% tnpx('pluralization', 'There is one archived suggestion.', 'There are {count} archived suggestions.', nb_archived_suggestions, { count = nb_archived_suggestions }) | $raw %] >+ [% END %] > <table id="suggestions" class="sorted"> > <thead> > <tr> >@@ -722,7 +726,6 @@ Note that permanent location is a code, and location may be an authval. > [% IF ( suggestion.copyrightdate ) %]© [% suggestion.copyrightdate | html %] [% END %] > [% IF ( suggestion.volumedesc ) %]; Volume:<i>[% suggestion.volumedesc | html %]</i> [% END %] > [% IF ( suggestion.isbn ) %]; ISBN:<i>[% suggestion.isbn | html %]</i> [% END %][% IF ( suggestion.publishercode ) %]; Published by [% suggestion.publishercode | html %] [% END %][% IF ( suggestion.publicationyear ) %] in <i>[% suggestion.publicationyear | html %]</i> [% END %][% IF ( suggestion.place ) %] in <i>[% suggestion.place | html %]</i> [% END %][% IF ( suggestion.collectiontitle ) %]; [% suggestion.collectiontitle | html %] [% END %][% IF ( suggestion.itemtype ) %]; [% AuthorisedValues.GetByCode( 'SUGGEST_FORMAT', suggestion.itemtype, 0 ) | html %] [% END %]<br />[% IF ( suggestion.note ) %]<div class="suggestion_note"><i class="fa fa-comment"></i> [% suggestion.note | html %]</div>[% END %] >- [% IF suggestion.archived %]<br /><i class="fa fa-archive"> Archived[% END %] > </td> > <td> > <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestion.suggestedby | uri %]">[% INCLUDE 'patron-title.inc' patron => suggestion.suggester %]</a> >-- >2.11.0
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 23591
:
95518
|
95519
|
95520
|
95521
|
95579
|
95600
|
95601
|
95602
|
95603
|
95604
|
100812
|
100813
|
100814
|
100815
|
100816
|
102799
|
102800
|
102801
|
102850
|
102851
|
102852
|
102853
| 102854