diff options
author | Angelo Naselli <anaselli@linux.it> | 2014-01-06 00:59:45 +0100 |
---|---|---|
committer | Angelo Naselli <anaselli@linux.it> | 2014-01-06 00:59:45 +0100 |
commit | 11533544ca01c2c54899af0a00f2c062c1831433 (patch) | |
tree | cdd13f3a209618ddde3a6927a392590238a01a4c /AdminPanel | |
parent | eb0eab8fc6d0c89262daa80d199bb7091540943b (diff) | |
download | colin-keep-11533544ca01c2c54899af0a00f2c062c1831433.tar colin-keep-11533544ca01c2c54899af0a00f2c062c1831433.tar.gz colin-keep-11533544ca01c2c54899af0a00f2c062c1831433.tar.bz2 colin-keep-11533544ca01c2c54899af0a00f2c062c1831433.tar.xz colin-keep-11533544ca01c2c54899af0a00f2c062c1831433.zip |
- Added a Base class for modules.
- Now configuration can be read also int /etc/categories.conf.d/
so that external modules can add their own configuration to be launched and
added to admin panel
- perl modules can be run by extending Module class, creating a start()
method and configuring module entry in categories configuration as class element
- Admin User now extends Module
Diffstat (limited to 'AdminPanel')
-rw-r--r-- | AdminPanel/Users/GUsers.pm | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/AdminPanel/Users/GUsers.pm b/AdminPanel/Users/GUsers.pm index 56d58ff..3aba881 100644 --- a/AdminPanel/Users/GUsers.pm +++ b/AdminPanel/Users/GUsers.pm @@ -47,6 +47,16 @@ use Glib; use yui; use AdminPanel::Shared; use AdminPanel::Users::users; +extends qw( Module ); + +has '+icon' => ( + default => "/usr/share/icons/userdrake.png", +); + +has '+name' => ( + default => N("AdminUser"), +); + =head1 VERSION @@ -117,6 +127,11 @@ has 'edit_tab_widgets' => ( init_arg => undef, ); +sub start { + my $self = shift; + + $self->manageUsersDialog(); +}; # TODO move to Shared? sub labeledFrameBox { @@ -1662,8 +1677,6 @@ sub _userGroupsTabWidget { my $userEnt = $self->ctx->LookupUserByName($userData{username}); my $lastchg = $userEnt->ShadowLastChange($self->USER_GetValue); - my $align; - my $hbox; my $layout = labeledFrameBox($replace_pnt, N("Select groups that the user will be member of:")); my $yTableHeader = new yui::YTableHeader(); @@ -2527,4 +2540,9 @@ sub TimeOfArray { $cm and $h->{month} = $mth{$2}; $h; } -sub member { my $e = shift; foreach (@_) { $e eq $_ and return 1 } 0 }
\ No newline at end of file +sub member { my $e = shift; foreach (@_) { $e eq $_ and return 1 } 0 } + +no Moose; +__PACKAGE__->meta->make_immutable; + +1;
\ No newline at end of file |