<%doc> Manage Contact Lists (unprviledged users) %####################################################################### %# %# Args section %# %####################################################################### <%args> $user => $ui->get_current_user($r) $submit => undef $show_contactlist => undef $show_tasks => undef $showheader => 1 % % % %####################################################################### %# %# INIT section %# %####################################################################### % <%init> my $DEBUG = 0; print '%ARGS is
', Dumper(%ARGS), '

' if $DEBUG; $show_tasks = $show_tasks || $user->getAttribute("SHOW_TASKS"); if ( $show_tasks eq "" ) { $user->setAttribute($r, "SHOW_TASKS", "show"); $show_tasks = "show"; } *print_showtaskslink = $m->comp('SELF:.sub_print_showtaskslink'); my $hideheader = 'style="display:none"' if ( !$showheader ); $ARGS{show_tasks} = $show_tasks; % if ( $show_contactlist ){ % $m->comp('../generic/contactlist.html', id=>$show_contactlist, user=>$user ); % }else{
>
My Contact Lists
% print_showtaskslink($show_tasks);
"> <%perl> my @objs; my $objt = 'ContactList'; my $ao = $ui->get_allowed_objects($r, $user); if ( exists $ao->{$objt} ){ foreach my $id ( keys %{$ao->{$objt}} ){ if ( my $obj = ContactList->retrieve($id) ){ push @objs, $obj; }else{ delete $ao->{$objt}->{$id}; } } }

% if ( @objs ){

% }else{ No Contact Lists available for this user. % }
% }