[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[EP-tech] Re: Sorting records in the browse views



Just a guess:
Try ?date;res=year? instead of ?date;res:year?.

We have a menu in one of our views like:
menus => [
                        { fields => ["date;res=year"], reverse_order => 1, allow_null => 1, hideempty => 0, new_column_at => [1, 1], },
],

that seems to work ? not sure if this is directly transferrable to the variations?

Cheers,
John

From: eprints-tech-bounces at ecs.soton.ac.uk [mailto:eprints-tech-bounces at ecs.soton.ac.uk] On Behalf Of Budden, Yvonne
Sent: 05 February 2015 14:50
To: 'eprints-tech at ecs.soton.ac.uk'
Subject: [EP-tech] Sorting records in the browse views

Hi All,

Potentially easy question for everyone!  We have long had a function to browse the publication in our repository by Researcher (http://wrap.warwick.ac.uk/view/author_id/) and these views have worked very well as tools for staff members and repository staff as a quick view of how up to date a person?s list might be.

However some of these lists are now getting extremely unwieldy due to the sheer number of publications we have, so I?m looking to introduce a few variations into the browse lists.  Now I?ve easily managed the options to add sorting by Research Funder and Item Type but the one people really want is to sort by Year.  I have managed sort by date but that uses the full date rather than just the year.  Can anyone let me know the best way to do this ? the example below is as far as I have got but will sort by the full date rather than year:

id => "author_id",
                allow_null => 0,
                hideempty => 1,
                menus => [
                       {
                                fields => [ "creators_browse_id" ],
                                new_column_at => [1, 1],
                                mode => "sections",
                                open_first_section => 1,
                                group_range_function => "EPrints::Update::Views::cluster_ranges_30",
                                grouping_function => "EPrints::Update::Views::group_by_a_to_z",
                       }
                ],
                order => "-date/title",
                include => 1,
                variations => [
                                ?date;reverse?,
                                ?type?,
                                ?funder?,
                                ?DEFAULT?,
                ],

I have tried using ?date;res:year,reverse? but this produces an error!

Many thanks for any help people can give!

Best,
Yvonne

Mrs Yvonne Budden,
Scholarly Communications Manager, University of Warwick
Chair: UK Council of Research Repositories<http://ukcorr.org/> (UKCoRR)

Email: y.c.budden at warwick.ac.uk<mailto:y.c.budden at warwick.ac.uk> | Tel: +44 2476 1 51275 | University of Warwick Library, Gibbet Hill Road, Coventry. CV4 7AL

To be eligible for submission to the post-2014 REF, authors? final peer-reviewed manuscripts of journals and conference papers must have been deposited in an institutional or subject repository within three months of acceptance for publication.
HEFCE Policy for open access in the post-2014 Research Excellence Framework<http://www.hefce.ac.uk/media/hefce/content/pubs/2014/201407/HEFCE2014_07.pdf>

Research Support: http://go.warwick.ac.uk/lib-researchers
Open Access Support: http://go.warwick.ac.uk/lib-researchers/open-access
Warwick Research Archive Portal (WRAP): http://wrap.warwick.ac.uk<http://wrap.warwick.ac.uk/>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20150205/fb103692/attachment.html