Bugzilla – Attachment 5557 Details for
Bug 6905
Allow selecting a patron from circulation history to take you to their circ page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 6905: [master] change which page clicking users in circ history takes you to
Bug-6905-master-change-which-page-clicking-users-i.patch (text/plain), 7.17 KB, created by
Robin Sheat
on 2011-09-23 03:24:56 UTC
(
hide
)
Description:
Bug 6905: [master] change which page clicking users in circ history takes you to
Filename:
MIME Type:
Creator:
Robin Sheat
Created:
2011-09-23 03:24:56 UTC
Size:
7.17 KB
patch
obsolete
>From deaf027982f3380f5b0c6f0fa251f5be21ad0bca Mon Sep 17 00:00:00 2001 >From: Robin Sheat <robin@catalyst.net.nz> >Date: Fri, 23 Sep 2011 15:23:05 +1200 >Subject: [PATCH] Bug 6905: [master] change which page clicking users in circ history takes you to > >Adds a syspref (borrowerhistorylink) that allows you to choose where >links to borrowers on the item circulation page go, choosing between the >circ page for them, or their details page. Default is the current >behaviour (go the the circ page.) >--- > catalogue/moredetail.pl | 12 +++++++++--- > installer/data/mysql/sysprefs.sql | 1 + > installer/data/mysql/updatedatabase.pl | 6 ++++++ > .../en/modules/admin/preferences/circulation.pref | 6 ++++++ > .../prog/en/modules/catalogue/moredetail.tt | 6 +++--- > 5 files changed, 25 insertions(+), 6 deletions(-) > >diff --git a/catalogue/moredetail.pl b/catalogue/moredetail.pl >index d285a49..58a395f 100755 >--- a/catalogue/moredetail.pl >+++ b/catalogue/moredetail.pl >@@ -146,10 +146,16 @@ foreach my $item (@items){ > $item->{'issue'}= 0; > } > } >-$template->param(count => $data->{'count'}, >- subscriptionsnumber => $subscriptionsnumber, >+my $borrower_link >+ = ( C4::Context->preference("BorrowingHistoryLink") eq 'details' ) >+ ? 'members/moremember.pl' >+ : 'circ/circulation.pl'; >+$template->param( >+ count => $data->{'count'}, >+ subscriptionsnumber => $subscriptionsnumber, > subscriptiontitle => $data->{title}, >- C4::Search::enabled_staff_search_views, >+ borrowerlink => $borrower_link, >+ C4::Search::enabled_staff_search_views, > ); > $template->param(BIBITEM_DATA => \@results); > $template->param(ITEM_DATA => \@items); >diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql >index 79d4893..c02b567 100755 >--- a/installer/data/mysql/sysprefs.sql >+++ b/installer/data/mysql/sysprefs.sql >@@ -171,6 +171,7 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES > INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('CircControl',"ItemHomeLibrary",'Specify the agency that controls the circulation and fines policy',"PickupLibrary|PatronLibrary|ItemHomeLibrary",'Choice'); > INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('finesCalendar',"noFinesWhenClosed",'Specify whether to use the Calendar in calculating duedates and fines',"ignoreCalendar|noFinesWhenClosed",'Choice'); > INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('previousIssuesDefaultSortOrder',"asc",'Specify the sort order of Previous Issues on the circulation page',"asc|desc",'Choice'); >+INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('BorrowingHistoryLink','circhist','When showing borrower history for an item on the catalogue page, link to borrower','detail|circhist','Choice'); > INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('todaysIssuesDefaultSortOrder',"desc",'Specify the sort order of Todays Issues on the circulation page',"asc|desc",'Choice'); > INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPACBaseURL',NULL,'Specify the Base URL of the OPAC, e.g., opac.mylibrary.com, the http:// will be added automatically by Koha.',NULL,'Free'); > INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('language','en','Set the default language in the staff client.',NULL,'Languages'); >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index 6b88c29..46c017e 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -4446,6 +4446,12 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { > SetVersion($DBversion); > } > >+$DBversion = "xxx"; >+if (C4::Context->preference("Version") < TransformToNum($DBversion)) { >+ $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('BorrowingHistoryLink','circhist','When showing borrower history for an item on the catalogue page, link to borrower','detail|circhist','Choice')"); >+ print "Add the system preference 'BorrowingHistoryLink' (bug 6905)\n"; >+ SetVersion($DBversion); >+} > > =head1 FUNCTIONS > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref >index dc821a8..d2590fd 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref >@@ -24,6 +24,12 @@ Circulation: > desc: latest to earliest > - due date. > - >+ - When showing borrower history for an item on the catalogue page, link to borrower >+ - pref: BorrowingHistoryLink >+ choices: >+ details: details >+ circhist: circulation history >+ - > - "Sort today's checkouts on the circulation page from" > - pref: todaysIssuesDefaultSortOrder > type: choice >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt >index 86c8a3f..ae73330 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt >@@ -169,9 +169,9 @@ > > <li><span class="label">Last seen:</span> [% ITEM_DAT.datelastseen %] </li> > <li><span class="label">Last borrowed:</span> [% ITEM_DAT.datelastborrowed %] </li> >- [% IF ( ITEM_DAT.card0 ) %]<li><span class="label">Last Borrower:</span> <a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% ITEM_DAT.borrower0 %]">[% ITEM_DAT.card0 %]</a> </li>[% END %] >- [% IF ( ITEM_DAT.card1 ) %]<li><span class="label">Previous Borrower:</span> <a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% ITEM_DAT.borrower1 %]">[% ITEM_DAT.card1 %]</a> </li>[% END %] >- [% IF ( ITEM_DAT.card2 ) %]<li><span class="label">Previous Borrower:</span> <a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% ITEM_DAT.borrower2 %]">[% ITEM_DAT.card2 %]</a> </li>[% END %] >+ [% IF ( ITEM_DAT.card0 ) %]<li><span class="label">Last Borrower:</span> <a href="/cgi-bin/koha/[% borrowerlink %]?borrowernumber=[% ITEM_DAT.borrower0 %]">[% ITEM_DAT.card0 %]</a> </li>[% END %] >+ [% IF ( ITEM_DAT.card1 ) %]<li><span class="label">Previous Borrower:</span> <a href="/cgi-bin/koha/[% borrowerlink %]?borrowernumber=[% ITEM_DAT.borrower1 %]">[% ITEM_DAT.card1 %]</a> </li>[% END %] >+ [% IF ( ITEM_DAT.card2 ) %]<li><span class="label">Previous Borrower:</span> <a href="/cgi-bin/koha/[% borrowerlink %]?borrowernumber=[% ITEM_DAT.borrower2 %]">[% ITEM_DAT.card2 %]</a> </li>[% END %] > <li><span class="label">Paid for?:</span> [% ITEM_DAT.paidfor %] </li> > <li><span class="label">Serial enumeration:</span> [% ITEM_DAT.enumchron %] </li> > <li><span class="label">Public Note:</span> >-- >1.7.4.1
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 6905
:
5557
|
5558