no message
This commit is contained in:
parent
2f9b9b135e
commit
4109fb7e0e
5 changed files with 69 additions and 16 deletions
|
|
@ -34,7 +34,8 @@ use WebGUI::Template;
|
|||
use WebGUI::URL;
|
||||
use WebGUI::Utility;
|
||||
use WebGUI::Operation::Profile;
|
||||
use WebGUI::Operation::Auth;
|
||||
use WebGUI::Operation::Shared;
|
||||
|
||||
|
||||
=head1 NAME
|
||||
|
||||
|
|
@ -316,7 +317,7 @@ sub displayAccount {
|
|||
$vars->{'account.form.submit'} = WebGUI::Form::submit({});
|
||||
$vars->{'account.form.footer'} = "</form>";
|
||||
|
||||
$vars->{'account.options'} = WebGUI::Operation::Profile::accountOptions();
|
||||
$vars->{'account.options'} = WebGUI::Operation::Shared::accountOptions();
|
||||
return WebGUI::Template::process(WebGUI::Template::get(1,$template), $vars);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ use WebGUI::Mail;
|
|||
use WebGUI::Session;
|
||||
use WebGUI::SQL;
|
||||
use WebGUI::Utility;
|
||||
use WebGUI::Operation::Shared;
|
||||
use URI;
|
||||
use Net::LDAP;
|
||||
|
||||
|
|
@ -260,7 +261,7 @@ sub displayAccount {
|
|||
$vars->{'account.form.karma'} = $session{user}{karma};
|
||||
$vars->{'account.form.karma.label'} = WebGUI::International::get(537);
|
||||
}
|
||||
$vars->{'account.options'} = WebGUI::Operation::Profile::accountOptions();
|
||||
$vars->{'account.options'} = WebGUI::Operation::Shared::accountOptions();
|
||||
return WebGUI::Template::process(WebGUI::Template::get(1,'Auth/LDAP/Account'), $vars);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -168,7 +168,7 @@ sub displayAccount {
|
|||
$vars->{'account.form.karma'} = $session{user}{karma};
|
||||
$vars->{'account.form.karma.label'} = WebGUI::International::get(537);
|
||||
}
|
||||
$vars->{'account.options'} = WebGUI::Operation::Profile::accountOptions();
|
||||
$vars->{'account.options'} = WebGUI::Operation::Shared::accountOptions();
|
||||
return WebGUI::Template::process(WebGUI::Template::get(1,'Auth/SMB/Account'), $vars);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -20,6 +20,49 @@ use WebGUI::SQL;
|
|||
our @ISA = qw(Exporter);
|
||||
our @EXPORT = qw(&menuWrapper);
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub accountOptions {
|
||||
my @array;
|
||||
if (WebGUI::Privilege::isInGroup(4) || WebGUI::Privilege::isInGroup(5) || WebGUI::Privilege::isInGroup(6) || WebGUI::Privilege::isInGroup(8) || WebGUI::Privilege::isInGroup(9) || WebGUI::Privilege::isInGroup(10) || WebGUI::Privilege::isInGroup(11)) {
|
||||
my %hash;
|
||||
if ($session{var}{adminOn}) {
|
||||
$hash{'options.display'} .= '<a href="'.WebGUI::URL::page('op=switchOffAdmin').'">'.WebGUI::International::get(12).'</a>';
|
||||
} else {
|
||||
$hash{'options.display'} .= '<a href="'.WebGUI::URL::page('op=switchOnAdmin').'">'.WebGUI::International::get(63).'</a>';
|
||||
}
|
||||
push(@array,\%hash);
|
||||
}
|
||||
unless ($session{form}{op} eq "displayAccount"){
|
||||
my %hash;
|
||||
$hash{'options.display'} = '<a href="'.WebGUI::URL::page('op=displayAccount').'">'.WebGUI::International::get(342).'</a>';
|
||||
push(@array,\%hash);
|
||||
}
|
||||
unless ($session{form}{op} eq "editProfile"){
|
||||
my %hash;
|
||||
$hash{'options.display'} = '<a href="'.WebGUI::URL::page('op=editProfile').'">'.WebGUI::International::get(341).'</a>';
|
||||
push(@array,\%hash);
|
||||
}
|
||||
unless ($session{form}{op} eq "viewProfile"){
|
||||
my %hash;
|
||||
$hash{'options.display'} = '<a href="'.WebGUI::URL::page('op=viewProfile&uid='.$session{user}{userId}).'">'.WebGUI::International::get(343).'</a>';
|
||||
push(@array,\%hash);
|
||||
}
|
||||
unless ($session{form}{op} eq "viewMessageLog"){
|
||||
my %hash;
|
||||
$hash{'options.display'} = '<a href="'.WebGUI::URL::page('op=viewMessageLog').'">'.WebGUI::International::get(354).'</a>';
|
||||
push(@array,\%hash);
|
||||
}
|
||||
my %logout;
|
||||
$logout{'options.display'} = '<a href="'.WebGUI::URL::page('op=logout').'">'.WebGUI::International::get(64).'</a>';
|
||||
push(@array,\%logout);
|
||||
if ($session{setting}{selfDeactivation} && !WebGUI::Privilege::isInGroup(3)){
|
||||
my %hash;
|
||||
$hash{'options.display'} = '<a href="'.WebGUI::URL::page('op=deactivateAccount').'">'.WebGUI::International::get(65).'</a>';
|
||||
push(@array,\%hash);
|
||||
}
|
||||
return \@array;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub menuWrapper {
|
||||
my ($output, $key);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue