diff options
Diffstat (limited to 'lib/Fripost')
-rw-r--r-- | lib/Fripost/Panel/Interface.pm | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/lib/Fripost/Panel/Interface.pm b/lib/Fripost/Panel/Interface.pm index ff9b291..4e5b48e 100644 --- a/lib/Fripost/Panel/Interface.pm +++ b/lib/Fripost/Panel/Interface.pm @@ -44,8 +44,7 @@ sub ListDomains : StartRunmode { $fp->done; my $template = $self->load_tmpl( 'list-domains.html', cache => 1, - , loop_context_vars => 1 - , global_vars => 1 ); + , loop_context_vars => 1 ); $template->param( $self->userInfo ); $template->param( domains => [ map { { &mkLink( domain => $_->{domain}) , isactive => $_->{isactive} @@ -79,8 +78,7 @@ sub ListLocals : Runmode { $fp->done; my $template = $self->load_tmpl( 'list-locals.html', cache => 1, - , loop_context_vars => 1 - , global_vars => 1 ); + , loop_context_vars => 1 ); $template->param( $self->userInfo ); $template->param( domain => encode_entities($domain{domain}) @@ -109,6 +107,9 @@ sub ListLocals : Runmode { # Can the user add aliases? $template->param( canAddalias => $domain{permissions} =~ /[aop]/ ); + $template->param( listCanAddAlias => [ map { {user => encode_entities($_)} } + @{$domain{canCreateAlias}} ] ) + if $domain{permissions} =~ /[op]/; # Should we list aliases? $template->param( listAliases => $#aliases >= 0 || $domain{permissions} =~ /[aop]/ ); @@ -128,6 +129,9 @@ sub ListLocals : Runmode { # Can the user add lists? $template->param( canAddList => $domain{permissions} =~ /[lop]/ ); + $template->param( listCanAddList => [ map { {user => encode_entities($_)} } + @{$domain{canCreateList}} ] ) + if $domain{permissions} =~ /[op]/; # Should we list lists? $template->param( listLists => $#lists >= 0 || $domain{permissions} =~ /[lop]/ ); $template->param( lists => [ @@ -176,8 +180,7 @@ sub EditDomain : Runmode { $fp->done; my $template = $self->load_tmpl( 'edit-domain.html', cache => 1, - , loop_context_vars => 1 - , global_vars => 1 ); + , loop_context_vars => 1 ); $template->param( $self->userInfo ); $template->param( domain => encode_entities($d) , isPostmaster => $domain{permissions} eq 'p'); |