Bugzilla – Attachment 13386 Details for
Bug 7500
Use CSS Sprites in the OPAC for faster page loading
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Signed patch (lists follow-up)
patch.txt (text/plain), 8.83 KB, created by
Marcel de Rooy
on 2012-11-12 08:14:19 UTC
(
hide
)
Description:
Signed patch (lists follow-up)
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2012-11-12 08:14:19 UTC
Size:
8.83 KB
patch
obsolete
>From 73e12c8cdb95b3303f33e3a6a8442a759962d6e3 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Mon, 5 Nov 2012 14:22:55 +0100 >Subject: [PATCH] Bug 8032: Sort lists by call number >Content-Type: text/plain; charset="utf-8" > >Precaution: Joining the items table makes that the table is sorted on the item call number of the first item (in case there are more items). >--- > C4/VirtualShelves.pm | 3 ++- > C4/VirtualShelves/Page.pm | 3 +++ > .../prog/en/modules/virtualshelves/shelves.tt | 10 ++++++++-- > .../opac-tmpl/prog/en/modules/opac-shelves.tt | 2 ++ > 4 files changed, 15 insertions(+), 3 deletions(-) > >diff --git a/C4/VirtualShelves.pm b/C4/VirtualShelves.pm >index 90a00a5..ff4bc29 100644 >--- a/C4/VirtualShelves.pm >+++ b/C4/VirtualShelves.pm >@@ -264,11 +264,12 @@ sub GetShelfContents { > ($sortfield) = $sth2->fetchrow_array; > } > my $query = >- " SELECT vc.biblionumber, vc.shelfnumber, vc.dateadded, itemtypes.*, >+ " SELECT DISTINCT vc.biblionumber, vc.shelfnumber, vc.dateadded, itemtypes.*, > biblio.*, biblioitems.itemtype, biblioitems.publicationyear as year, biblioitems.publishercode, biblioitems.place, biblioitems.size, biblioitems.pages > FROM virtualshelfcontents vc > JOIN biblio ON vc.biblionumber = biblio.biblionumber > LEFT JOIN biblioitems ON biblio.biblionumber = biblioitems.biblionumber >+ LEFT JOIN items ON items.biblionumber=vc.biblionumber > LEFT JOIN itemtypes ON biblioitems.itemtype = itemtypes.itemtype > WHERE vc.shelfnumber=? "; > my @params = ($shelfnumber); >diff --git a/C4/VirtualShelves/Page.pm b/C4/VirtualShelves/Page.pm >index 988244c..bf53563 100644 >--- a/C4/VirtualShelves/Page.pm >+++ b/C4/VirtualShelves/Page.pm >@@ -304,6 +304,7 @@ sub shelfpage { > viewshelf => $shelfnumber, > authorsort => $authorsort, > yearsort => $yearsort, >+ itemcallnumbersort => $sortfield eq 'itemcallnumber', > manageshelf => $manageshelf, > allowremovingitems => ShelfPossibleAction( $loggedinuser, $shelfnumber, 'delete'), > allowaddingitem => ShelfPossibleAction( $loggedinuser, $shelfnumber, 'add'), >@@ -418,6 +419,8 @@ sub shelfpage { > $shelflist->{$element}->{"authorsort"} = 'author'; > } elsif ( $sortfield eq 'year' ) { > $shelflist->{$element}->{"yearsort"} = 'year'; >+ } elsif ( $sortfield eq 'itemcallnumber' ) { >+ $shelflist->{$element}->{"itemcallnumbersort"} = 'itemcallnumber'; > } > } > $shelflist->{$element}->{"viewcategory$category"} = 1; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt >index 0c71a41..20ae8ee 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt >@@ -210,6 +210,7 @@ function placeHold () { > <th>Title</th> > <th>Author</th> > <th>Date added</th> >+ <th>Call number</th> > <th> </th> > </tr> > [% FOREACH itemsloo IN itemsloop %] >@@ -238,6 +239,9 @@ function placeHold () { > <td>[% itemsloo.author %]</td> > <td>[% itemsloo.dateadded %]</td> > <td> >+ [% FOREACH result IN itemsloo.ITEM_RESULTS %][% result.itemcallnumber %][% UNLESS loop.last %], [% END %][% END %] >+ </td> >+ <td> > [% UNLESS ( itemsloo.notforloan ) %] > <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% itemsloo.biblionumber %]">Holds</a> > [% END %] >@@ -299,6 +303,7 @@ function placeHold () { > [% IF ( sort_title ) %]<option value="title" selected="selected">Title</option>[% ELSE %]<option value="title">Title</option>[% END %] > [% IF ( sort_author ) %]<option value="author" selected="selected">Author</option>[% ELSE %]<option value="author">Author</option>[% END %] > [% IF ( sort_copyrightdate ) %]<option value="copyrightdate" selected="selected">Copyrightdate</option>[% ELSE %]<option value="copyrightdate">Copyrightdate</option>[% END %] >+ [% IF ( sort_itemcallnumber ) %]<option value="itemcallnumber" selected="selected">Call number</option>[% ELSE %]<option value="itemcallnumber">Call number</option>[% END %] > </select></li> > <li><label for="category">Category: </label> > <select name="category" id="category"> >@@ -322,6 +327,7 @@ function placeHold () { > [% IF ( sort_title ) %]<option value="title" selected="selected">Title</option>[% ELSE %]<option value="title">Title</option>[% END %] > [% IF ( sort_author ) %]<option value="author" selected="selected">Author</option>[% ELSE %]<option value="author">Author</option>[% END %] > [% IF ( sort_copyrightdate ) %]<option value="copyrightdate" selected="selected">Copyrightdate</option>[% ELSE %]<option value="copyrightdate">Copyrightdate</option>[% END %] >+ [% IF ( sort_itemcallnumber ) %]<option value="itemcallnumber" selected="selected">Call number</option>[% ELSE %]<option value="itemcallnumber">Call number</option>[% END %] > </select></li> > <li><label for="category">Category: </label> > <select id="category" name="category"> >@@ -386,7 +392,7 @@ function placeHold () { > [% IF ( shelveslooppri.toggle ) %]<tr class="highlight">[% ELSE %]<tr>[% END %] > <td><a href="shelves.pl?[% IF ( shelveslooppri.showprivateshelves ) %]display=privateshelves&[% END %]viewshelf=[% shelveslooppri.shelf %]&shelfoff=[% shelfoff %]">[% shelveslooppri.shelfname |html %]</a></td> > <td>[% shelveslooppri.count %] item(s)</td> >- <td>[% IF ( shelveslooppri.authorsort ) %]Author[% ELSIF ( shelveslooppri.yearsort ) %]Year[% ELSE %]Title[% END %]</td> >+ <td>[% IF ( shelveslooppri.authorsort ) %]Author[% ELSIF ( shelveslooppri.yearsort ) %]Year[% ELSIF (shelveslooppri.itemcallnumbersort) %]Call number[% ELSE %]Title[% END %]</td> > <td>[% IF ( shelveslooppri.viewcategory1 ) %]Private[% END %] > [% IF ( shelveslooppri.viewcategory2 ) %]Public[% END %] > </td> >@@ -439,7 +445,7 @@ function placeHold () { > <td><a href="shelves.pl?viewshelf=[% shelvesloo.shelf %]">[% shelvesloo.shelfname |html %]</a></td> > <td><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% shelvesloo.owner %]">[% shelvesloo.ownername %]</td> > <td>[% shelvesloo.count %] item(s)</td> >- <td>[% IF ( shelvesloo.authorsort ) %]Author[% ELSIF ( shelvesloo.yearsort ) %]Year[% ELSE %]Title[% END %]</td> >+ <td>[% IF ( shelvesloo.authorsort ) %]Author[% ELSIF ( shelvesloo.yearsort ) %]Year[% ELSIF (shelvesloo.itemcallnumbersort) %]Call number[% ELSE %]Title[% END %]</td> > <td>[% IF ( shelvesloo.viewcategory1 ) %]Private[% END %] > [% IF ( shelvesloo.viewcategory2 ) %]Public[% END %] > </td> >diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tt >index 471dddb..1d5a5f2 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tt >+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tt >@@ -466,6 +466,7 @@ $(function() { > [% IF ( sort_title ) %]<option value="title" selected="selected">Title</option>[% ELSE %]<option value="title">Title</option>[% END %] > [% IF ( sort_author ) %]<option value="author" selected="selected">Author</option>[% ELSE %]<option value="author">Author</option>[% END %] > [% IF ( sort_year ) %]<option value="year" selected="selected">Year</option>[% ELSE %]<option value="year">Year</option>[% END %] >+ [% IF ( sort_itemcallnumber ) %]<option value="itemcallnumber" selected="selected">Call number</option>[% ELSE %]<option value="itemcallnumber">Call number</option>[% END %] > </select> > </li> > <li> >@@ -655,6 +656,7 @@ $(function() { > [% IF ( sort_title ) %]<option value="title" selected="selected">Title</option>[% ELSE %]<option value="title">Title</option>[% END %] > [% IF ( sort_author ) %]<option value="author" selected="selected">Author</option>[% ELSE %]<option value="author">Author</option>[% END %] > [% IF ( sort_year ) %]<option value="year" selected="selected">Year</option>[% ELSE %]<option value="year">Year</option>[% END %] >+ [% IF ( sort_itemcallnumber ) %]<option value="itemcallnumber" selected="selected">Call number</option>[% ELSE %]<option value="itemcallnumber">Call number</option>[% END %] > </select> > </li> > <li> >-- >1.7.7.6 >
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 7500
:
9226
|
9239
|
9241
|
9594
|
9599
|
9623
|
9677
|
9678
|
9679
|
9680
|
11398
|
11399
|
12165
|
13314
|
13386
|
13421