X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=rt%2Fshare%2Fhtml%2FAdmin%2FElements%2FEditRightsCategoryTabs;h=61e30c3130001aa46837ddf54336dc3b56264a13;hp=60d0a44122b8a1af001a71999eb8742e4ca00bcc;hb=e9e0cf0989259b94d9758eceff448666a2e5a5cc;hpb=7588a4ac90a9b07c08a3107cd1107d773be1c991 diff --git a/rt/share/html/Admin/Elements/EditRightsCategoryTabs b/rt/share/html/Admin/Elements/EditRightsCategoryTabs index 60d0a4412..61e30c313 100644 --- a/rt/share/html/Admin/Elements/EditRightsCategoryTabs +++ b/rt/share/html/Admin/Elements/EditRightsCategoryTabs @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -70,7 +70,8 @@ if ( blessed($Context) and $Context->can('RightCategories') ) { my %right_categories = %{$Context->RightCategories}; for my $right (keys %available_rights) { - push @{$categories{$right_categories{$right}}}, $right; + my $category = $right_categories{$right} || 'Miscellaneous'; # loc + push @{$categories{$category}}, $right; } } @@ -94,7 +95,12 @@ my %category_desc = ( 'Status' => loc('Status changes'), ); -my %catsort = ( General => 1, Staff => 2, Admin => 3, Status => 4 ); +my %catsort = ( General => 1, Staff => 2, Admin => 3, Status => 4, Miscellaneous => 999 ); +my $i = 5; +for my $category ( sort keys %categories ) { + next if $catsort{$category}; + $catsort{$category} = $i++; +} $acldesc ||= join '-', ($Principal ? $Principal->PrincipalId : 'addprincipal'), ref($Context), $Context->Id; @@ -102,7 +108,7 @@ $acldesc ||= join '-', ($Principal ? $Principal->PrincipalId : 'addprincipal'),
% for my $category (sort { $catsort{$a} <=> $catsort{$b} } keys %categories) {