diff options
author | Guilhem Moulin <guilhem.moulin@fripost.org> | 2012-09-30 17:27:56 +0200 |
---|---|---|
committer | Guilhem Moulin <guilhem.moulin@fripost.org> | 2012-09-30 17:27:56 +0200 |
commit | 4091fbbb0b280120407e0625dd49e741e481a528 (patch) | |
tree | be459f6f5d1590776a7bee4ce4b0110ba774d819 /lib | |
parent | a4fb637c441cad75350edcbbb2520f7a303b33c2 (diff) |
wibble
Diffstat (limited to 'lib')
-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'); |