[Koha-devel] Sorting alphabetically the subfields in additem

Salvador Zaragoza Rubio salvazm at masmedios.com
Wed Aug 18 18:17:05 CEST 2010


Hi,

Sometimes when you mess around with the marc structure of the bibliographic
frameworks, the subfields of the 952 field are showed in a random manner
in the cataloguing section.

A possible improvement to display the subfields sorted when you
add or edit an item in the intranet at the page
/cgi-bin/koha/cataloguing/additem.pl .

Just before passing the reference of the array loop_data as a param
to the template, add the line of code:

@loop_data = map { $_->[0] } sort { $a->[1] cmp $b->[1] } map { [ $_, $_->{subfield} ] } @loop_data;

to sort alphabetically de code of the subfields and show them clearly.


Salva


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5527 bytes
Desc: S/MIME Cryptographic Signature
URL: </pipermail/koha-devel/attachments/20100818/e43d0fa6/attachment.bin>


More information about the Koha-devel mailing list