EPrints Technical Mailing List Archive

Message: #03053


< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First

[EP-tech] Re: Adding fields to admin search


Hi John,

We¹re on 3.3.12 here - I¹ve tried what you suggested to no avail. To be
honest, I¹m not sure where you¹re getting the search config information
from; I¹m following you up til point 4 okay but I don¹t see anything in
that file to indicate what config to use :/



On 21/05/2014 11:56, "John Salter" <J.Salter@leeds.ac.uk> wrote:

>Hi,
>Good question. One I didn¹t know the answer to until I had a quick look.
>
>This is my thought process:
>1. Log in to EPrints, go to the admin search page.
>2. Look at the URL. It ends with screen=Staff%3A%3AEPrintSearch
>3. Mentally convert the screen parameter above to a file to look at -
>resulting in: ~/perl_lib/EPrints/Plugin/Screen/Staff/EPrintSearch.pm.
>4. See what search config it uses [search->advanced->search_fields] AND
>something a bit *magic* looking 'extra_fields' (sounds like exactly what
>we need :o).
>5. Grep rest of EPrints code to find other mentions of 'extra_fields'.
>6. Be disappointed.
>7. Look at: http://wiki.eprints.org/w/API:EPrints/Plugin#param
>8. Think that adding:
>$c->{plugins}->{"Screen::Staff::EPrintSearch"}->{params}->{extra_fields}
>= ...SOMETHING...;
>is the way forward, SOMETHING being some config similar to the existing
>search config options.
>9. Decide to leave the next step for you, with the hope you add the
>recipe to the 'How To' section of the wiki:
>http://wiki.eprints.org/w/Category:Howto
>10. Lunch! Sunshine!
>11. Actually, I'm interested. What should that SOMETHING be..?
>12. Add this to a file in ~/archives/cfg/cfg.d/ (possibly the
>eprint_search_advanced.pl, or plugins.pl, or some other file that you'll
>be able to find it in again!):
>########
>#Additional field for internal staff search
>########
>$c->{plugins}->{"Screen::Staff::EPrintSearch"}->{params}->{extra_fields}
>= [
>                { meta_fields => [ "id_number" ] },
>                { meta_fields => [ "documents.license" ] },
>];
>
>NB: This is based on 3.3.10.
>
>Cheers,
>John
>
>-----Original Message-----
>From: eprints-tech-bounces@ecs.soton.ac.uk
>[mailto:eprints-tech-bounces@ecs.soton.ac.uk] On Behalf Of Andrew Beeken
>Sent: 20 May 2014 16:14
>To: eprints-tech@ecs.soton.ac.uk
>Subject: [EP-tech] Adding fields to admin search
>
>Hello!
>
>I¹ve now been asked to add some fields to the admin search screen in
>EPrints. I¹ve found a snippet here:
>http://trac.eprints.org/eprints/ticket/3637 which suggests how different
>fields can be added in, however the function in question is different in
>the version of EPrints we are running. So, any thoughts on how we can do
>this? The Trac page suggests that this was put forward to be added to a
>future version of EPrints as an admin function, however I presume this
>has yet to happen?
>
>Andrew
>
>The University of Lincoln, located in the heart of the city of Lincoln,
>has established an international reputation based on high student
>satisfaction, excellent graduate employment and world-class research.
>
>The information in this e-mail and any attachments may be confidential.
>If you have received this email in error please notify the sender
>immediately and remove it from your system. Do not disclose the contents
>to another person or take copies.
>
>Email is not secure and may contain viruses. The University of Lincoln
>makes every effort to ensure email is sent without viruses, but cannot
>guarantee this and recommends recipients take appropriate precautions.
>
>The University may monitor email traffic data and content in accordance
>with its policies and English law. Further information can be found at:
>http://www.lincoln.ac.uk/legal.
>
>*** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
>*** Archive: http://www.eprints.org/tech.php/
>*** EPrints community wiki: http://wiki.eprints.org/
>*** EPrints developers Forum: http://forum.eprints.org/
>
>*** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
>*** Archive: http://www.eprints.org/tech.php/
>*** EPrints community wiki: http://wiki.eprints.org/
>*** EPrints developers Forum: http://forum.eprints.org/