[Koha-devel] Sorting alphabetically the subfields in additem

Salvador Zaragoza Rubio salvazm at masmedios.com
Thu Aug 19 08:28:42 CEST 2010


Maybe the right thing to do instead of changing code everyone would be
for the koha developers to add a subfield in
the marc structure indicating the order you want to display the subfields.
It would imply adding a field in the database and change code to sort
through this field. I think this would be the
perfect solution as everyone could order in the desired manner as
Michael Hafen did.


El 18/08/2010 19:56, Michael Hafen escribió:
> I ran into this too, my librarians wanted the item fields in a certain
> order though.  So I made a hash of the subfield codes and a sort weight.
> That did the job for me.
>
> On Wed, 2010-08-18 at 18:17 +0200, Salvador Zaragoza Rubio wrote:
>   
>> 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
>>
>>
>> _______________________________________________
>> Koha-devel mailing list
>> Koha-devel at lists.koha-community.org
>> http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
>>     
>   

-- 
Salvador Zaragoza Rubio
Dept. de Tecnologías y Sistemas de Información
C/ Garcilaso, 15-bajo
46003 Valencia
Telf: 96 369 41 23 
Fax: 96 369 34 39
www.masmedios.com <http://www.masmedios.com/>

 

Este correo electrónico y, en su caso, cualquier fichero anexo al mismo,
puede contener información de carácter confidencial exclusivamente
dirigida a su(s) destinatario(s). De acuerdo con la LOPD, MASmedios
informa de que los datos personales contenidos quedarán sometidos a un
tratamiento del que aquélla es responsable. Los interesados consienten
el tratamiento de sus datos para estos fines, pudiendo ejercitar sus
derechos de acceso, rectificación, cancelación y oposición dirigiéndose
por escrito a /MASmedios para la gestión de la información/, calle
Garcilaso 15-B 46003 Valencia o en *protecciondatos at masmedios.com*

-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/koha-devel/attachments/20100819/faae26a8/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: punt.gif
Type: image/gif
Size: 43 bytes
Desc: not available
URL: </pipermail/koha-devel/attachments/20100819/faae26a8/attachment-0002.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: logo.gif
Type: image/gif
Size: 2303 bytes
Desc: not available
URL: </pipermail/koha-devel/attachments/20100819/faae26a8/attachment-0003.gif>
-------------- 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/20100819/faae26a8/attachment-0001.bin>


More information about the Koha-devel mailing list