X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fbrowse%2Faccess_group.html;h=ccb64e1522e303fdf6f0864c266eb25c86fd0be7;hp=ca162a094c6679ffb4e658eb2544caa36f75eea2;hb=eb4ff7f73c5d4bdf74a3472448b5a195598ff4cd;hpb=32b5d3a31f112a381f0a15ac5e3a2204242f3405
diff --git a/httemplate/browse/access_group.html b/httemplate/browse/access_group.html
index ca162a094..ccb64e152 100644
--- a/httemplate/browse/access_group.html
+++ b/httemplate/browse/access_group.html
@@ -27,10 +27,7 @@
],
)
%>
-<%init>
-
-die "access denied"
- unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
+<%once>
my $html_init =
"Internal access groups control access to the back-office interface.
".
@@ -58,20 +55,45 @@ my $agents_sub = sub {
};
+tie my %rights, 'Tie::IxHash', FS::AccessRight->rights_info;
+
my $rights_sub = sub {
my $access_group = shift;
- [ map { my $access_right = $_;
- [
- {
- 'data' => $access_right->rightname,
- 'align' => 'left',
- },
- ];
- }
- $access_group->access_rights,
+ #[ map { my $access_right = $_;
+ # [
+ # {
+ # 'data' => $access_right->rightname,
+ # 'align' => 'left',
+ # },
+ # ];
+ # }
+ # $access_group->access_rights,
+ #];
- ];
+ #some false laziness w/edit/access_group.html
+ my $columns = 3;
+ my $count = 0;
+
+ #include('/elements/table-grid.html', bgcolor=>'#cccccc' ).
+ '
'.
+ ''. join( '', map {
+
+ ''.
+ ''. $_. ' | '.
+ ''.
+
+ join(' ', grep { warn "$access_group->access_right($_): ".
+ $access_group->access_right($_). "\n";
+ $access_group->access_right($_); }
+ map { ref($_) ? $_->{'rightname'} : $_; }
+ @{ $rights{$_} }
+ ).
+
+ ' | | '.
+ ( ++$count % $columns ? '' : '
')
+
+ } keys %rights ). '
';
};
@@ -79,4 +101,10 @@ my $count_query = 'SELECT COUNT(*) FROM access_group';
my $link = [ $p.'edit/access_group.html?', 'groupnum' ];
+%once>
+<%init>
+
+die "access denied"
+ unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
+
%init>