<& /widgets/wrappers/sharky/table_bottom.mc &>
<%perl>
$m->comp("/widgets/profile/buttonBar.mc",
widget => $widget,
desks => $desks,
cd => $cd,
obj => $fa,
);
%perl>
<%args>
$widget
%args>
<%init>
my $fa = get_state_data($widget, 'template');
my $at = $fa->get_element_type;
# Use the same reset key for this widget in all the widgets we call.
my $rk = get_state_data($widget, 'reset_key');
# Get the workflow ID.
my $wf_id = get_state_data($widget, 'work_id') || $fa->get_workflow_id();
# Lookup the workflow and get its allowed desks.
my $wf = Bric::Biz::Workflow->lookup({id => $wf_id});
my $desks = $wf->allowed_desks();
# Get the current desk, or if this hasn't been put on a desk yet, the start desk
my $cd = $fa->get_current_desk() || $wf->get_start_desk();
my $search_button = '};
my $sites = $c->get('__SITES__') || Bric::Biz::Site->list({ active => 1 });
%init>
<%once>
my $show_element_flags = sub {
my ($at) = @_;
my @flags;
push @flags, 'paginated' if $at->is_paginated;
push @flags, 'top level' if $at->is_top_level;
push @flags, 'fixed url' if $at->is_fixed_uri;
push @flags, 'media' if $at->is_media;
push @flags, 'related media' if $at->is_related_media;
push @flags, 'related story' if $at->is_related_story;
return unless @flags;
return ' ('.join(', ', @flags).')';
};
my $show_data_flags = sub {
my ($d) = @_;
my @flags;
push @flags, 'required' if $d->get_required;
push @flags, 'repeatable' if $d->get_quantifier;
return unless @flags;
return ' ('.join(', ', @flags).')';
};
%once>