X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Fshare%2Fhtml%2FAdmin%2FElements%2FEditRightsCategoryTabs;h=b6eb18900cfef9f4c99143b11a255b56fe54df62;hb=31f3763747b82764bb019cfab5b2a2945fc9a99d;hp=786cafdd8c162306b96cd9f0b018fe343fa3b182;hpb=a6fe07e49e3fc12169e801b1ed6874c3a5bd8500;p=freeside.git diff --git a/rt/share/html/Admin/Elements/EditRightsCategoryTabs b/rt/share/html/Admin/Elements/EditRightsCategoryTabs index 786cafdd8..b6eb18900 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-2012 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2015 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) {