%#-- Begin HTML --# <& '/widgets/wrappers/sharky/header.mc', title => "$disp Profile", context => "Admin | Profile | $disp | $crumb" &>
<& '/widgets/wrappers/sharky/footer.mc', param => \%ARGS &> %#-- End HTML --# %#-- Once Section --# <%once>; my $widget = 'profile'; my $section = 'admin'; my $type = 'action'; my $class = get_package_name($type); my $disp = get_disp_name($type); my $dest_key = 'dest'; my $dest_class = get_package_name($dest_key); %once> %#-- Args Section --# <%args> $id => undef $next => undef $type => undef $dest_id => undef %args> %#-- Init Section --# <%init>; # Do any redirects first. do_queued_redirect(); $id ||= $ARGS{action_id}; # Instantiate an object. my $act = $ARGS{obj} ? $ARGS{obj} : defined $id ? $class->lookup({ id => $id}) : $class->new; $id ||= $act->get_id; # Get the server type (destination profile) ID and instantiate the destination # object. $dest_id ||= get_state_data($widget, $dest_key) || $act->get_server_type_id; my $dest = $dest_class->lookup({ id => $dest_id }); # Check authorization. chk_authz($dest, EDIT); my $no_edit = !chk_authz($dest, EDIT, 1); my $no_del = !$id || $no_edit; # Set the ord to the next ord by default, if this is a new action. my $next_ord = Bric::Dist::Action->next_ord($dest_id); $act->set_ord($next_ord) unless defined $id; # Set the type, if it has already been selected. $act->set_type($type) if $next; # Get the name for the breadcrumb trail. my $crumb = $act->get_name; $crumb = $crumb ? ""$crumb"" : 'New'; %init> <%doc> ################################################################################ =head1 NAME /admin/profile/action/dhandler - Interface for managing actions. =head1 VERSION $LastChangedRevision$ =head1 DATE $LastChangedDate$ =head1 DESCRIPTION This element handles the display for editing distribution actions. %doc>