%#-- Begin HTML --# <& '/widgets/wrappers/sharky/header.mc', title => "$disp Profile", context => "Admin | Profile | $wf_disp | "" . $wf->get_name . """ . "| $disp | $crumb" &> % # Prevent the workflow profile redirect here when our cancel button is pushed % # and then the workflow profile's cancel button is pushed. % pop_page;
<& '/widgets/wrappers/sharky/footer.mc', param => \%ARGS &> %#-- End HTML --# %#-- Once Section --# <%once>; my $section = 'admin'; my $type = 'desk'; my $disp = get_disp_name($type); my $class = get_package_name($type); my $wf_key = 'workflow'; my $widget = 'profile'; my $wf_class = get_package_name($wf_key); my $wf_disp = get_disp_name($wf_key); %once> %#-- Args Section --# <%args> $id => undef $new_desk => undef %args> %#-- Init Section --# <%init>; # Make sure we have a workflow ID. my $wid = get_state_data($widget, $wf_key); # Check authorization. my $wf = $wf_class->lookup({ id => $wid }); chk_authz($wf, EDIT); my $no_edit = !chk_authz($wf, EDIT, 1); my $no_del = !$id || $no_edit || @{Bric::Biz::Workflow->list_ids({ head_desk_id => $id })}; # Instantiate an object. my $desk = $ARGS{obj} ? $ARGS{obj} : defined $id ? $class->lookup({ id => $id}) : $class->new; $id ||= $desk->get_id; # Get the name for the breadcrumb trail. my $crumb = $desk->get_name; $crumb = $crumb ? ""$crumb"" : 'New'; %init> <%doc> ############################################################################### =head1 NAME /admin/profile/desk/dhandler - Interface for managing desks. =head1 VERSION $LastChangedRevision$ =head1 DATE $LastChangedDate$ =head1 DESCRIPTION This element handles the display for editing desks. %doc>