%#-- 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 $class = 'Bric::Util::Grp'; # HACK: There should probably be a Bric::Util::Grp class method or somesuch # to load the Bric::Util::Grp subclass class objects. my $class_opt; { my $classes = Bric::Util::Class->pkg_href; while (my ($k, $v) = each %$classes) { next unless $k =~ /^bric::util::grp::/; next if index($k, 'member') != -1; my $pkg = $v->get_pkg_name; next if $pkg->get_secret; $class_opt->{$pkg} = $v->get_disp_name; } # XXX Dual-purpose class. $class_opt->{'Bric::Util::Grp::Person'} = 'Contributor Group'; } my $section = 'admin'; my $type = 'grp'; my $widget = 'profile'; %once> %#-- Args Section --# <%args> $id => undef %args> %#-- Init Section --# <%init>; # Instantiate an object. my $grp = $ARGS{obj} ? $ARGS{obj} : defined $id ? $class->lookup({ id => $id}) : $class->new; $id ||= $grp->get_id; # Check authorization. chk_authz($grp, $id ? READ : CREATE); my $no_edit = !chk_authz($grp, ($id ? EDIT : CREATE), 1); my $is_perm = $grp->get_permanent; my $no_del = !$id || $no_edit || $grp->get_permanent || $id == ADMIN_GRP_ID; my $class_obj = $grp->my_class; my $class_name = $class_obj->get_pkg_name; my $disp = $class_obj->get_key_name eq 'contrib_type' ? 'Contributor Group' : $class_obj->get_disp_name; # Get the name for the breadcrumb trail. my $crumb = $grp->get_name; $crumb = $crumb ? ""$crumb"" : 'New'; %init> <%doc> ############################################################################### =head1 NAME /admin/profile/grp/dhandler - Group profile interface =head1 VERSION $LastChangedRevision$ =head1 DATE $LastChangedDate$ =head1 DESCRIPTION Diplays the profile for a single group. %doc>