diff options
author | Heiko Bernloehr <Heiko.Bernloehr@FreeIT.de> | 2013-01-11 04:27:14 +0100 |
---|---|---|
committer | Heiko Bernloehr <Heiko.Bernloehr@FreeIT.de> | 2013-01-11 04:29:03 +0100 |
commit | 7babbf9594c1ed0316170ca65e328c6e7839dc96 (patch) | |
tree | 894fc97d0798ed4b05e74b6729bd7ad2a2fadd66 /app | |
parent | 9d5150d60babc1ae951d51bbc1d46a1551151a8c (diff) | |
download | ecs2-7babbf9594c1ed0316170ca65e328c6e7839dc96.tar.gz ecs2-7babbf9594c1ed0316170ca65e328c6e7839dc96.zip |
Fixed ordering in admin list views.
Ignoring case while sorting.
Diffstat (limited to 'app')
-rw-r--r-- | app/views/admin/communities/list.html.erb | 2 | ||||
-rw-r--r-- | app/views/admin/organizations/list.html.erb | 2 | ||||
-rw-r--r-- | app/views/admin/participants/list.html.haml | 2 | ||||
-rw-r--r-- | app/views/admin/ressources/list.html.haml | 4 |
4 files changed, 5 insertions, 5 deletions
diff --git a/app/views/admin/communities/list.html.erb b/app/views/admin/communities/list.html.erb index eb77997..6a3ff41 100644 --- a/app/views/admin/communities/list.html.erb +++ b/app/views/admin/communities/list.html.erb @@ -34,7 +34,7 @@ License along with ECS. If not, see <http://www.gnu.org/licenses/>. </TR> <tr></tr> - <% for community in @communities.sort_by(&:name) %> + <% for community in @communities.sort{|x,y| x.name.downcase <=> y.name.downcase}.each %> <tr valign="top" class="<%= cycle('list-line-odd', 'list-line-even') %>"> <TD> <%= community.id %></TD> <TD> <%= h community.name %> </TD> diff --git a/app/views/admin/organizations/list.html.erb b/app/views/admin/organizations/list.html.erb index e53610b..5630fb7 100644 --- a/app/views/admin/organizations/list.html.erb +++ b/app/views/admin/organizations/list.html.erb @@ -35,7 +35,7 @@ License along with ECS. If not, see <http://www.gnu.org/licenses/>. </TR> <tr></tr> - <% for organization in @organizations.sort_by(&:name) %> + <% for organization in @organizations.sort{|x,y| x.name.downcase <=> y.name.downcase} %> <tr valign="top" class="<%= cycle('list-line-odd', 'list-line-even') %>"> <TD> <%= organization.id %></TD> <TD> <%= h organization.name %> </TD> diff --git a/app/views/admin/participants/list.html.haml b/app/views/admin/participants/list.html.haml index 766d163..0366bbb 100644 --- a/app/views/admin/participants/list.html.haml +++ b/app/views/admin/participants/list.html.haml @@ -38,7 +38,7 @@ - @participants.group_by(&:organization_id).sort{|x,y| Organization.find(x[0]).abrev.downcase <=> Organization.find(y[0]).abrev.downcase}.each do |orgid,participants| - org_printed= false - - participants.sort_by(&:name).each do |participant| + - participants.sort{|x,y| x.name.downcase <=> y.name.downcase}.each do |participant| %tr{:class => [cycle('list-line-odd', 'list-line-even')]} - if org_printed %td.center " diff --git a/app/views/admin/ressources/list.html.haml b/app/views/admin/ressources/list.html.haml index d438fd0..ca18e28 100644 --- a/app/views/admin/ressources/list.html.haml +++ b/app/views/admin/ressources/list.html.haml @@ -32,9 +32,9 @@ %th.box2(align="center") Operations: %tr - - @ressources.group_by(&:namespace).each do |ns, ressources| + - @ressources.group_by(&:namespace).sort{|x,y| x[0].downcase <=> y[0].downcase}.each do |ns, ressources| - ns_printed= false - - ressources.sort_by(&:ressource).each do |ressource| + - ressources.sort{|x,y| x.ressource.downcase <=> y.ressource.downcase}.each do |ressource| %tr{:class => [cycle('list-line-odd', 'list-line-even')]} -if ns_printed %td.center " |