Bugzilla – Attachment 95601 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: Display a new "Suggestion detail" tab on the bib detail page
Bug-23591-Display-a-new-Suggestion-detail-tab-on-t.patch (text/plain), 7.68 KB, created by
Séverine Queune
on 2019-11-20 10:06:45 UTC
(
hide
)
Description:
Bug 23591: Display a new "Suggestion detail" tab on the bib detail page
Filename:
MIME Type:
Creator:
Séverine Queune
Created:
2019-11-20 10:06:45 UTC
Size:
7.68 KB
patch
obsolete
>From 3317f9810f137621df712daa2877a03f3ed46e12 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 18 Nov 2019 15:50:55 +0100 >Subject: [PATCH] Bug 23591: Display a new "Suggestion detail" tab on the bib > detail page >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >This patch adds a new "Suggestion detail" tab on the bibliographic >detail page. It will help suggestion management. > >Test plan: >- Create several suggestions for a given biblio >- Go to the detail page of the bibliographic record and confirm that >there is a new "Suggestion detail" tab with all the suggestions you >created. > >Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> >--- > catalogue/detail.pl | 12 ++++ > .../prog/en/modules/catalogue/detail.tt | 79 ++++++++++++++++++++++ > 2 files changed, 91 insertions(+) > >diff --git a/catalogue/detail.pl b/catalogue/detail.pl >index 511855e..d36a704 100755 >--- a/catalogue/detail.pl >+++ b/catalogue/detail.pl >@@ -239,6 +239,18 @@ if ( C4::Context->preference('AcquisitionDetails') ) { > ); > } > >+if ( C4::Context->preference('suggestion') ) { >+ my $suggestions = Koha::Suggestions->search( >+ { >+ biblionumber => $biblionumber, >+ }, >+ { >+ order_by => { -desc => 'suggesteddate' } >+ } >+ ); >+ $template->param( suggestions => $suggestions ); >+} >+ > if ( defined $dat->{'itemtype'} ) { > $dat->{imageurl} = getitemtypeimagelocation( 'intranet', $itemtypes->{ $dat->{itemtype} }{imageurl} ); > } >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 571f3b2..ac0dcc5 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >@@ -185,6 +185,7 @@ > [% IF ( MARCNOTES || notes ) %]<li><a href="#description">Descriptions</a></li>[% END %] > [% IF ( subscriptionsnumber ) %]<li><a href="#subscriptions">Subscriptions</a></li>[% END %] > [% IF Koha.Preference('AcquisitionDetails') %]<li><a href="#acq_details">Acquisition details</a></li>[% END %] >+[% IF suggestions.count %]<li><a href="#suggestion_details">Suggestion details</a></li>[% END %] > [% IF ( FRBRizeEditions ) %][% IF ( XISBNS ) %]<li><a href="#editions">Editions</a></li>[% END %][% END %] > [% IF ( LocalCoverImages ) %] > [% IF ( localimages || CAN_user_tools_upload_local_cover_images ) %] >@@ -666,6 +667,74 @@ > </div> > [% END %] > >+[% IF suggestions.count %] >+ <div id="suggestion_details"> >+ <table id="suggestions" class="sorted"> >+ <thead> >+ <tr> >+ <th class="NoSort"> </th> >+ <th class="anti-the">Suggestion</th> >+ <th>Suggested by - on</th> >+ <th>Managed by - on</th> >+ <th>Last modification by - on</th> >+ <th>Library</th> >+ <th>Fund</th> >+ <th>Status</th> >+ </tr> >+ </thead> >+ <tbody> >+ [% FOREACH suggestion IN suggestions %] >+ <tr> >+ <td>[% suggestion.suggestionid | html %]</td> >+ <td> >+ <a href="/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=[% suggestion.suggestionid | uri %]&op=show" title="suggestion" > >+ [% suggestion.title | html %][% IF ( suggestion.author ) %], by [% suggestion.author | html %][% END %]</a> >+ <br /> >+ [% 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="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> >+ [% IF suggestion.suggesteddate %] - [% suggestion.suggesteddate | $KohaDates %][% END %] >+ </td> >+ <td> >+ <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestion.managedby | uri %]">[% INCLUDE 'patron-title.inc' patron => suggestion.manager %]</a> >+ [% IF suggestion.manageddate %] - [% suggestion.manageddate | $KohaDates %][% END %] >+ </td> >+ <td> >+ <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestion.lastmodificationby | uri %]">[% INCLUDE 'patron-title.inc' patron => suggestion.last_modifier %]</a> >+ [% IF suggestion.lastmodificationdate %] - [% suggestion.lastmodificationdate | $KohaDates %][% END %] >+ </td> >+ <td> >+ [% Branches.GetName( suggestion.branchcode ) | html %] >+ </td> >+ <td> >+ [% suggestion.fund.budget_name | html %] >+ </td> >+ <td> >+ [% IF suggestion.STATUS == 'ASKED' %]Pending >+ [% ELSIF suggestion.STATUS == 'ACCEPTED' %]Accepted >+ [% ELSIF suggestion.STATUS == 'ORDERED' %]Ordered >+ [% ELSIF suggestion.STATUS == 'REJECTED' %]Rejected >+ [% ELSIF suggestion.STATUS == 'CHECKED' %]Checked >+ [% ELSIF suggestion.STATUS == 'AVAILABLE' %]Available >+ [% ELSIF AuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestion.STATUS ) %] >+ [% AuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestion.STATUS ) | html %] >+ [% ELSE %]Status unknown >+ [% END %] >+ [% IF suggestion.reason %] >+ <br />([% suggestion.reason | html %]) >+ [% END %] >+ </td> >+ </tr> >+ [% END %] >+ </tbody> >+ </table> >+ </div> >+[% END %] >+ > [% IF ( FRBRizeEditions ) %][% IF ( XISBNS ) %] > <div id="editions"><h4>Editions</h4> > <table> >@@ -1035,6 +1104,16 @@ > ] > }, columns_settings); > [% END %] >+ >+ [% IF suggestions.count %] >+ $(".sorted").dataTable($.extend(true, {}, dataTablesDefaults, { >+ "aoColumnDefs": [ >+ { "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] }, >+ { "sType": "anti-the", "aTargets" : [ "anti-the" ] } >+ ], >+ "sPaginationType": "full" >+ })); >+ [% END %] > }); > </script> > [% END %] >-- >2.1.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 23591
:
95518
|
95519
|
95520
|
95521
|
95579
|
95600
|
95601
|
95602
|
95603
|
95604
|
100812
|
100813
|
100814
|
100815
|
100816
|
102799
|
102800
|
102801
|
102850
|
102851
|
102852
|
102853
|
102854