From 9ee49d65d46f12722af19e72576b187adbb72292 Mon Sep 17 00:00:00 2001 From: Ian Walls Date: Tue, 20 Sep 2011 15:32:14 -0400 Subject: [PATCH] Enh 6887: Add 'checked out from' column to issued items display tables Adds "checked out from" column to the right of "checked out on" on both circ/circulation.pl and members/moremembers.pl. Columns are sortable with tablesort (though only on circ/circulation.pl if syspref enabled). The branch name is sourced from issues.branchcode. EDIT BY Owen Leonard: Adjusting table columns which are sorted by default to accommodate the new column. Things look good! Thanks! Signed-off-by: Nicole C. Engard Signed-off-by: Liz Rea Signed-off-by: Chris Cormack --- circ/circulation.pl | 1 + .../prog/en/includes/checkouts-table-footer.inc | 2 +- .../prog/en/modules/circ/circulation.tt | 12 +++++++++--- .../prog/en/modules/members/moremember.tt | 10 +++++++--- members/moremember.pl | 1 + 5 files changed, 19 insertions(+), 7 deletions(-) diff --git a/circ/circulation.pl b/circ/circulation.pl index da4878f94e..fff32a218a 100755 --- a/circ/circulation.pl +++ b/circ/circulation.pl @@ -438,6 +438,7 @@ sub build_issue_data { $it->{'can_confirm'} = !$can_renew && !$restype; $it->{'renew_error'} = $restype; $it->{'checkoutdate'} = C4::Dates->new($it->{'issuedate'},'iso')->output('syspref'); + $it->{'issuingbranchname'} = GetBranchName($it->{'branchcode'}); $totalprice += $it->{'replacementprice'}; $it->{'itemtype'} = $itemtypeinfo->{'description'}; diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table-footer.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table-footer.inc index 4cf58c4a0f..5638710353 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table-footer.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table-footer.inc @@ -1,6 +1,6 @@ - Totals: + Totals: [% totaldue %] [% totalprice %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt index dd77fcc95f..d6b2b22bd8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt @@ -22,11 +22,11 @@ [% IF ( UseTablesortForCirc ) %]$.tablesorter.defaults.widgets = ['zebra']; $("#issuest").tablesorter({[% IF ( dateformat_metric ) %] dateFormat: 'uk',[% END %] - headers: { 1: { sorter: 'articles' },5: { sorter: false },6:{sorter:false},7:{sorter:false},8:{sorter:false}} + headers: { 1: { sorter: 'articles' },6: { sorter: false },7:{sorter:false},8:{sorter:false},9:{sorter:false}} }); $("#relissuest").tablesorter({[% IF ( dateformat_metric ) %] dateFormat: 'uk',[% END %] - headers: { 1: { sorter: 'articles' },5: { sorter: false },6:{sorter:false},7:{sorter:false},8:{sorter:false}} + headers: { 1: { sorter: 'articles' },6: { sorter: false },7:{sorter:false},8:{sorter:false},9:{sorter:false}} }); //FIXME: Sorting does not work when there are previous checkouts only @@ -40,7 +40,7 @@ $("#holdst").tablesorter({[% IF ( dateformat_metric ) %] dateFormat: 'uk',[% END %] sortList: [[0,0]], - headers: { 1: { sorter: 'articles' }} + headers: { 1: { sorter: 'articles' },5: { sorter: false }} });[% END %] [% IF ( AllowRenewalLimitOverride ) %] $( '#override_limit' ).click( function () { @@ -678,6 +678,7 @@ No patron matched [% message %] Title Item Type Checked out on + Checked out from Call no Charge Price @@ -701,6 +702,7 @@ No patron matched [% message %] [% UNLESS ( noItemTypeImages ) %] [% IF ( todayissue.itemtype_image ) %][% END %][% END %][% todayissue.itemtype %] [% todayissue.checkoutdate %] [% IF ( todayissue.multiple_borrowers ) %][% todayissue.borrowername %][% END %] + [% todayissue.issuingbranchname %] [% todayissue.itemcallnumber %] [% todayissue.charge %] [% todayissue.replacementprice %] @@ -775,6 +777,7 @@ No patron matched [% message %] [% previssue.displaydate %] [% IF ( previssue.multiple_borrowers ) %][% previssue.borrowername %][% END %] + [% previssue.issuingbranchname %] [% previssue.itemcallnumber %] [% previssue.charge %] [% previssue.replacementprice %] @@ -859,6 +862,7 @@ No patron matched [% message %] Title Item Type Checked out on + Checked out from Call no Charge Price @@ -878,6 +882,7 @@ No patron matched [% message %] [% relissue.title |html %][% IF ( relissue.author ) %], by [% relissue.author %][% END %][% IF ( relissue.itemnotes ) %]- [% relissue.itemnotes %][% END %] [% relissue.barcode %] [% UNLESS ( noItemTypeImages ) %] [% IF ( relissue.itemtype_image ) %][% END %][% END %][% relissue.itemtype %] [% relissue.displaydate %] + [% relissue.issuingbranchname %] [% relissue.itemcallnumber %] [% relissue.charge %] [% relissue.replacementprice %][% relissue.borrowername %] ([% relissue.cardnumber %]) @@ -898,6 +903,7 @@ No patron matched [% message %] [% relprevissue.title |html %][% IF ( relprevissue.author ) %], by [% relprevissue.author %][% END %] [% IF ( relprevissue.itemnotes ) %]- [% relprevissue.itemnotes %][% END %] [% relprevissue.barcode %] [% UNLESS noItemTypeImages %][% IF relprevissue.itemtype_image %][% END %][% END %][% relprevissue.itemtype %] [% relprevissue.displaydate %] + [% relprevissue.issuingbranchname %] [% relprevissue.itemcallnumber %] [% IF ( relprevissue.multiple_borrowers ) %][% relprevissue.borrowername %][% END %] [% relprevissue.charge %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt index db9ae4d10b..84a9c48ff5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt @@ -17,16 +17,16 @@ $(document).ready(function() { $.tablesorter.defaults.widgets = ['zebra']; $("#issuest").tablesorter({[% IF ( dateformat_metric ) %] dateFormat: 'uk',[% END %] - headers: { 1: { sorter: 'articles' }} + headers: { 1: { sorter: 'articles'},8:{sorter:false},9:{sorter:false }} }); $("#relissuest").tablesorter({[% IF ( dateformat_metric ) %] dateFormat: 'uk',[% END %] - headers: { 1: { sorter: 'articles' }} + headers: { 1: { sorter: 'articles'},8:{sorter:false},9:{sorter:false }} }); $("#holdst").tablesorter({[% IF ( dateformat_metric ) %] dateFormat: 'uk',[% END %] sortList: [[0,0]], - headers: { 1: { sorter: 'articles' },6: { sorter: false }} + headers: { 1: { sorter: 'articles' },5: { sorter: false }} }); [% IF ( picture ) %] // new YAHOO.widget.Button("delpicture"); // FIXME: formatting mismatch between YUI and normal button @@ -422,6 +422,7 @@ function validate1(date) { Title Item Type Checked out on + Checked out from Call no Charge Price @@ -453,6 +454,7 @@ function validate1(date) { [% issueloo.title |html %][% IF ( issueloo.author ) %], by [% issueloo.author %][% END %] [% IF ( issueloo.publishercode ) %]; [% issueloo.publishercode %] [% END %] [% IF ( issueloo.publicationyear ) %], [% issueloo.publicationyear %][% END %] [% issueloo.barcode %] [% UNLESS ( noItemTypeImages ) %] [% IF ( issueloo.itemtype_image ) %][% END %][% END %][% issueloo.itemtype_description %] [% issueloo.issuedate %] + [% issueloo.issuingbranchname %] [% issueloo.itemcallnumber %] [% issueloo.charge %] [% issueloo.replacementprice %] @@ -529,6 +531,7 @@ function validate1(date) { Title Item Type Checked out on + Checked out from Call no Charge Price @@ -559,6 +562,7 @@ function validate1(date) { [% relissueloo.title |html %][% IF relissueloo.author %], by [% relissueloo.author %][% END %] [% IF relissueloo.publishercode %]; [% relissueloo.publishercode %] [% END %] [% IF relissueloo.publicationyear %], [% relissueloo.publicationyear %][% END %] [% relissueloo.barcode %] [% UNLESS ( noItemTypeImages ) %] [% IF ( relissueloo.itemtype_image ) %][% END %][% END %][% relissueloo.itemtype_description %] [% relissueloo.issuedate %] + [% relissueloo.issuingbranchname %] [% relissueloo.itemcallnumber %] [% relissueloo.charge %] [% relissueloo.replacementprice %] diff --git a/members/moremember.pl b/members/moremember.pl index bfaa4029f1..a76652f339 100755 --- a/members/moremember.pl +++ b/members/moremember.pl @@ -268,6 +268,7 @@ sub build_issue_data { $issue->[$i]{'date_due'} = C4::Dates->new($issue->[$i]{'date_due'}, 'iso')->output('syspref'); $issue->[$i]{'issuedate'} = C4::Dates->new($issue->[$i]{'issuedate'},'iso')->output('syspref'); my $biblionumber = $issue->[$i]{'biblionumber'}; + $issue->[$i]{'issuingbranchname'} = GetBranchName($issue->[$i]{'branchcode'}); my %row = %{ $issue->[$i] }; $totalprice += $issue->[$i]{'replacementprice'}; $row{'replacementprice'} = $issue->[$i]{'replacementprice'}; -- 2.39.5