Re: [Koha] Sort Library branches by name in Koha Staff Login

2012-12-13 Thread Bernardo Gonzalez Kriegel
Amir,
what version of Koha are you using?

On Koha 3.6/8/10 my branch list is sorted by branch name, not branch code.

Regards,
Bernardo
-- 
Bernardo Gonzalez Kriegel
bgkrie...@gmail.com


On Wed, Dec 12, 2012 at 11:20 AM, Amir Seni amirs...@gmail.com wrote:
 Greetings all,

 I would like to have the branch list sorted in the main koha staff login
 page.

 The branches are being sorted by Branch code by default.

 For example the branches list appear as:

 Cuamba - Agricultura
 Beira - Centro de Ensino a Distancia
 Nampula - Direito
 Beira - Economia e Gestão
 Nampula - Educação e Comunicação
 Beira - Sistemas de Informação Geogrática
 Beira - Tecnologia de Informação
 Lichinga - Extensão
 Beira - Ciências da Saúde

 I would like to see them appear as:

 Beira - Centro de Ensino a Distancia
 Beira - Ciências da Saúde
 Beira - Economia e Gestão
 Beira - Sistemas de Informação Geogrática
 Beira - Tecnologia de Informação
 Cuamba - Agricultura
 Lichinga - Extensão
 Nampula - Direito
 Nampula - Educação e Comunicação

 However in the opac the branches are automaticaly sorted by library name and
 not library code.

 Thanks for your help.

 Amir
 ___
 Koha mailing list  http://koha-community.org
 Koha@lists.katipo.co.nz
 http://lists.katipo.co.nz/mailman/listinfo/koha
___
Koha mailing list  http://koha-community.org
Koha@lists.katipo.co.nz
http://lists.katipo.co.nz/mailman/listinfo/koha


Re: [Koha] Sort Library branches by name in Koha Staff Login

2012-12-13 Thread Owen Leonard
 On Koha 3.6/8/10 my branch list is sorted by branch name, not branch code.

I don't find this to be the case. In 3.8.x and master I get a list
ordered by branch code.

  -- Owen

-- 
Web Developer
Athens County Public Libraries
http://www.myacpl.org
___
Koha mailing list  http://koha-community.org
Koha@lists.katipo.co.nz
http://lists.katipo.co.nz/mailman/listinfo/koha


Re: [Koha] Sort Library branches by name in Koha Staff Login

2012-12-13 Thread Amir Seni

On 12/13/2012 04:03 PM, Owen Leonard wrote:

On Koha 3.6/8/10 my branch list is sorted by branch name, not branch code.

I don't find this to be the case. In 3.8.x and master I get a list
ordered by branch code.

   -- Owen

I am running koha 3.06.10.000. As i stated before, the list in the OPAC 
page is sorted by Branch Name and in the Staff login page it is sorted 
by branch code.


However after login without choosing a library and going to the main 
page, when clicking on Set Library, the list then appears sorted by 
Branch name.


Still no idea why it is not sorted by branch name in the Staff login page.

Amir
___
Koha mailing list  http://koha-community.org
Koha@lists.katipo.co.nz
http://lists.katipo.co.nz/mailman/listinfo/koha


Re: [Koha] Sort Library branches by name in Koha Staff Login

2012-12-13 Thread Bernardo Gonzalez Kriegel
Amir, Owen
I had misunderstood.

Yes, on staff login branches are ordered by branchcode.
The reason is on C4/Auth,pm, around line 953, if you change the line

  for my $branch_hash (sort keys %$branches) {

by

   for my $branch_hash (sort { uc($branches-{$a}-{branchname}) cmp
uc($branches-{$b}-{branchname}) } keys %$branches) {

then you will have branches ordered by branchname on staff login and
opac login (if you set OpacPublic as 'Disable')

That is the same order imposed on method GetBranchesLoop in C4/Branch.pm.
I think that it would be possible (desirable) to use only the Branch.pm method.

Anyway, I do not recommend to touch the file, but if you are in a
hurry it does not brake anything.

Regards,
Bernardo
-- 
Bernardo Gonzalez Kriegel
bgkrie...@gmail.com


On Thu, Dec 13, 2012 at 1:08 PM, Amir Seni amirs...@gmail.com wrote:
 On 12/13/2012 04:03 PM, Owen Leonard wrote:

 On Koha 3.6/8/10 my branch list is sorted by branch name, not branch
 code.

 I don't find this to be the case. In 3.8.x and master I get a list
 ordered by branch code.

-- Owen

 I am running koha 3.06.10.000. As i stated before, the list in the OPAC page
 is sorted by Branch Name and in the Staff login page it is sorted by branch
 code.

 However after login without choosing a library and going to the main page,
 when clicking on Set Library, the list then appears sorted by Branch name.

 Still no idea why it is not sorted by branch name in the Staff login page.


 Amir
 ___
 Koha mailing list  http://koha-community.org
 Koha@lists.katipo.co.nz
 http://lists.katipo.co.nz/mailman/listinfo/koha
___
Koha mailing list  http://koha-community.org
Koha@lists.katipo.co.nz
http://lists.katipo.co.nz/mailman/listinfo/koha


[Koha] Sort Library branches by name in Koha Staff Login

2012-12-12 Thread Amir Seni

Greetings all,

I would like to have the branch list sorted in the main koha staff login 
page.


The branches are being sorted by Branch code by default.

For example the branches list appear as:

Cuamba - Agricultura
Beira - Centro de Ensino a Distancia
Nampula - Direito
Beira - Economia e Gestão
Nampula - Educação e Comunicação
Beira - Sistemas de Informação Geogrática
Beira - Tecnologia de Informação
Lichinga - Extensão
Beira - Ciências da Saúde

I would like to see them appear as:

Beira - Centro de Ensino a Distancia
Beira - Ciências da Saúde
Beira - Economia e Gestão
Beira - Sistemas de Informação Geogrática
Beira - Tecnologia de Informação
Cuamba - Agricultura
Lichinga - Extensão
Nampula - Direito
Nampula - Educação e Comunicação

However in the opac the branches are automaticaly sorted by library name 
and not library code.


Thanks for your help.

Amir
___
Koha mailing list  http://koha-community.org
Koha@lists.katipo.co.nz
http://lists.katipo.co.nz/mailman/listinfo/koha