>
<& '/widgets/profile/text.mc',
name => $widget.'|simple',
value => $state->{simple} || '',
useTable => 0 &>
% # This hidden field is required to make the form submit when the user hits
% # the "enter" key.
<& '/widgets/profile/hidden.mc',
id => 'search-type',
name => $widget.'|template_cb',
value => 'simple' &>
<& '/widgets/profile/button.mc',
disp => $lang->maketext('Search'),
name => 'simple_search',
button => 'search_red',
js => qq{onclick="\$('search-type').value = 'simple'"},
useTable => 0 &>
Show more options »
>
<& /widgets/profile/text.mc,
disp => $lang->maketext('Name'),
name => $widget.'|name',
value => $state->{name} || '' &>
<& /widgets/profile/text.mc,
disp => $lang->maketext('File Name'),
name => $widget.'|file_name',
value => $state->{file_name} || '' &>
% my $site_id = $c->get_user_cx(get_user_id);
% my ($one_site, $oc_name_getter);
% if (get_pref("Filter by Site Context")) {
% $one_site = 1;
<& /widgets/profile/hidden.mc,
name => "$widget|site_id",
value => $site_id &>
% } elsif (@$sites > 1) {
<%perl>;
my $ng = Bric::Biz::OutputChannel->my_meths->{name}{get_meth};
my $sg = Bric::Biz::OutputChannel->my_meths->{site}{get_meth};
$oc_name_getter = sub {
my $o = shift;
return $ng->($o) . ' (' . $sg->($o) . ')';
};
%perl>\
% $one_site =
<& /widgets/profile/select.mc,
disp => $lang->maketext('Site'),
name => $widget.'|site_id',
value => $state->{site_id} || '',
options => [ [ '' => $lang->maketext('All Sites') ],
map { [$_->get_id => $_->get_name] } @$sites ],
localize => 0 &>
% } else {
% $one_site = 1;
% }
<& /widgets/select_object/select_object.mc,
disp => $lang->maketext('Output Channel'),
object => 'output_channel',
field => 'name',
constrain => { active => 1, $one_site ? (site_id => $site_id) : () },
no_persist => 1,
name => "$widget|output_channel_id",
default => ['', $lang->maketext('All Output Channels')],
getter => $oc_name_getter
&>
% my $active_checked = $state->{active} ? 1 : 0;
<& /widgets/profile/checkbox.mc,
disp => $lang->maketext('Include deleted'),
name => $widget . '|active',
value => 'tf', # XXX: 't' and 'f' (see Bric::App::Callback::Search)
checked => $active_checked,
localize => 0,
useTable => 1,
&>
<% $lang->maketext('Cover Date') %>:
<& '/widgets/select_time/select_time.mc',
base_name => "$widget|cover_date_start",
indent => 1,
no_hour => 1,
no_min => 1,
repopulate => 0,
def_date => $state->{cover_date_start} || '',
compact => 1,
style => 'inline',
&>
—<& '/widgets/select_time/select_time.mc',
base_name => "$widget|cover_date_end",
indent => 1,
no_hour => 1,
no_min => 1,
repopulate => 0,
def_date => $state->{cover_date_end} || '',
compact => 1,
style => 'inline',
&>
<% $lang->maketext('Deploy Date') %>:
<& '/widgets/select_time/select_time.mc',
base_name => "$widget|publish_date_start",
indent => 1,
no_hour => 1,
no_min => 1,
repopulate => 0,
def_date => $state->{publish_date_start} || '',
compact => 1,
style => 'inline',
&>
—<& '/widgets/select_time/select_time.mc',
base_name => "$widget|publish_date_end",
indent => 1,
no_hour => 1,
no_min => 1,
repopulate => 0,
def_date => $state->{publish_date_end} || '',
compact => 1,
style => 'inline',
&>
<% $lang->maketext('Expire Date') %>:
<& '/widgets/select_time/select_time.mc',
base_name => "$widget|expire_date_start",
indent => 1,
no_hour => 1,
no_min => 1,
repopulate => 0,
def_date => $state->{expire_date_start} || '',
compact => 1,
style => 'inline',
&>
—<& '/widgets/select_time/select_time.mc',
base_name => "$widget|expire_date_end",
indent => 1,
no_hour => 1,
no_min => 1,
repopulate => 0,
def_date => $state->{expire_date_end} || '',
compact => 1,
style => 'inline',
&>
<& '/widgets/wrappers/table_bottom.mc' &>
% if ($use_form_tag) {