Re: [EP-underground] Ordering the subject table
ePrints Support <[email protected]> Sat, 9 Nov 2002 19:15:27 +0000
| Newsgroups | gmane.comp.web.eprints.general |
|---|---|
| Message-ID | <[email protected]> |
i'll answer the easy bit first...
when eprints lists subjects to a user it shows ALL subjects which
are CANADD=TRUE.
when eprints lists subjects to a searcher it shows ALL subjects.
Do you want a "comment" feature of some kind? how would it work?
part 2:
phew. in theory this would wok in the config.
{ name=>"subjects", type=>"subject", top=>"subjects", multiple=>1,
browse_link => "subjects",
make_single_value_orderkey=>sub {
my( $field , $value ) = @_;
return $value;
}
}
which skips the whole working out of the subject title thing BUT
there is a little bug so you can either
(a) wait for me to fix it
or
(b) add a tiny hack to make it work without the configuration option...
in perl_lib/EPrints/Metadata.pm find this bit
---
sub _ordervalue_aux1
{
my( $self , $value , $session , $langid ) = @_;
return "" unless( EPrints::Utils::is_set( $value ) );
if( $self->is_type( "subject", "dataset", "set" ) )
{
my $label = $self->get_value_label( $session, $value );
return EPrints::Utils::tree_to_utf8( $label );
}
---
and change it to:
---
sub _ordervalue_aux1
{
my( $self , $value , $session , $langid ) = @_;
return "" unless( EPrints::Utils::is_set( $value ) );
if( $self->is_type( "subject" )
{
return $value;
}
if( $self->is_type( "dataset", "set" ) )
{
my $label = $self->get_value_label( $session, $value );
return EPrints::Utils::tree_to_utf8( $label );
}
---
ok, it's not easy but it is possible. This just says that
On Sat, Nov 09, 2002 at 10:44:44 +0100, Antonella De Robbio (Casa) wrote:
>
> Thank you Chris,
>
> with a more careful analysis of the logical structure of the Eprints
> database, I am able to formulate
> more exactly the problem.
> As the format of the import text file is
> KEY:TITLE:PARENTS_KEY(S):CANADD?
> I want the browse by subject view to appear ordered by KEY and not by TITLE.
> Obviously I mean the order calculated on the whole content of the KEY
> field in a standard manner,
> the issue is not on different ways of sorting one field, but simply on
> sorting one field instead of another.
>
> For example:
>
> Use and impact of information.
> Bibliometric methods.
> Information in society.
> Information society.
> Information economics.
> Information policy.
> Information dissemination and diffusion.
> Information needs and information requirements analysis.
> User interfaces, usability.
>
> These are the TITLES of the children of the B section of our JITA
> classification for LIS.
> To preserve the order decided by us, without being compelled to make
> TITLEs begin with ad
> hoc alphanumerical strings, we could resort to the KEY field, which is
> internal and not visible by user.
> We don't want to display such initial strings because this is a hinders
> future enlargment of the
> schema and could be misleading for the user.
> These subjects are intended altogether to be an explanation of the
> content of the B section an not as
> single depositable subjects.
> About this point we are interested to know whether not depositable
> subjects which are children of depositable
> subjects appear to the user in the pop-down list displayed in the
> e-prints submission process.
> If this is not the case, how can we do to make they visible to user?
>
> Thank you for you support
> Antonella De Robbio
> E-LIS General Manager
>
>
>
>
>
> ePrints Support wrote:
>
> >Each field has a key which is used for ordering it.
> >
> >There is a default way of generating it for each field type.
> >
> >Subjects and sets, for example, use the id by default.
> >
> >You can change it to use the name with a short subroutine
> >linked from order_value in the metadata config (see the docs)
> >
> >There is not an (easy) way to make more than one way of sorting
> >one field. It would be possible, I'll explain if you *really*
> >want...
> >
> >On Wed, Nov 06, 2002 at 05:18:48 +0100, Antonella De Robbio (Casa) wrote:
> >
> >>Dear Chris,
> >>
> >>I am involved in different applications of the Eprints software.
> >>One is a test phase at the University of Padua (institutional
> >>repository), the other one is working progress
> >>for a data provider on LIS e-papers within rclis service.
> >>In both applications we met with the same necessity of ordering the
> >>subject table by TITLE and
> >>not by KEY, as is in the current implementation.
> >>Is it possible to have the option of ordering by KEY available with
> >>config maneuvres?
> >>Or is it other way to obtain a not alphabetical order, but an order
> >>provided by us.
> >>
> >>Thank you
> >>Antonella De Robbio
> >>E-LIS General Manager
> >>
> >
>
--
Christopher Gutteridge [email protected]
ePrints2 Coder, Support and Stuff +44 23 8059 4833