From 9df73cf0035b9f9f804cdab74719bad5bdc1a2d2 Mon Sep 17 00:00:00 2001 From: Lebbeous Fogle-Weekley Date: Wed, 19 Oct 2011 17:53:58 -0400 Subject: [PATCH] Tiny bookbag improvements Bookbag feed item sort order now defined Bookbag list sort order on the "My Lists" page is now less agressively propagated Signed-off-by: Lebbeous Fogle-Weekley Signed-off-by: Bill Erickson --- Open-ILS/src/perlmods/lib/OpenILS/WWW/SuperCat.pm | 5 ++++- Open-ILS/src/templates/opac/myopac/lists.tt2 | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/SuperCat.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/SuperCat.pm index 9a36347ff7..f47ad27f7c 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/SuperCat.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/SuperCat.pm @@ -1013,10 +1013,13 @@ sub bookbag_feed { return 302; } + # last created first + my @sorted_bucket_items = sort { $b->create_time cmp $a->create_time } @{ $bucket->items }; + my $feed = create_record_feed( 'record', $type, - [ map { $_->target_biblio_record_entry } @{ $bucket->items } ], + [ map { $_->target_biblio_record_entry } @sorted_bucket_items ], $unapi, $org_unit->[0]->shortname, undef, diff --git a/Open-ILS/src/templates/opac/myopac/lists.tt2 b/Open-ILS/src/templates/opac/myopac/lists.tt2 index c852364b11..76c9e5b984 100644 --- a/Open-ILS/src/templates/opac/myopac/lists.tt2 +++ b/Open-ILS/src/templates/opac/myopac/lists.tt2 @@ -73,10 +73,10 @@
[% baseurl = ctx.opac_root _ '/myopac/lists'; IF bbag.id != CGI.param("id"); - url = mkurl(baseurl, {id => bbag.id}, ['edit_notes']); + url = mkurl(baseurl,{id => bbag.id},['edit_notes','sort']); ltitle = l("Show items in list"); ELSE; - url = mkurl(baseurl, {}, ['id', 'edit_notes']); + url = mkurl(baseurl, {}, ['id', 'edit_notes', 'sort']); ltitle = l("Hide items in list"); END %]

[% bbag.name | html %]

-- 2.11.0