blob: d59b1c640d879a8d12abbc7472163fa92cda2809 [file] [log] [blame]
#------------------------------------------------------------------------
# Compiled template generated by the Template Toolkit version 2.15
#------------------------------------------------------------------------
Template::Document->new({
METADATA => {
'modtime' => '1138010588',
'name' => 'sidebar.xul.tmpl',
},
BLOCK => sub {
my $context = shift || die "template sub called without context\n";
my $stash = $context->stash;
my $output = '';
my $error;
eval { BLOCK: {
#line 1 "template/en/custom/sidebar.xul.tmpl"
$stash->set('template_version', '1.0@bugzilla.org');
$output .= "\n";
$output .= "\n";
$output .= "\n";
#line 25 "template/en/custom/sidebar.xul.tmpl"
$output .= $context->process('global/variables.none.tmpl');
$output .= "\n\n<?xml version=\"1.0\"?>\n<!-- ";
#line 28 "template/en/custom/sidebar.xul.tmpl"
$output .= $stash->get('template_version');
$output .= " -->\n<?xml-stylesheet href=\"chrome://communicator/skin/\" type=\"text/css\"?>\n<?xml-stylesheet href=\"";
#line 30 "template/en/custom/sidebar.xul.tmpl"
$output .= $stash->get(['Param', [ 'urlbase' ]]);
$output .= "skins/standard/panel.css\" type=\"text/css\"?>\n<window\n xmlns=\"http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul\"\n xmlns:html=\"http://www.w3.org/1999/xhtml\"\n orient=\"vertical\"\n onload=\"document.getElementById('query-field').addEventListener('keypress', initial_keypress_handler, true)\">\n\n<!-- Load QuickSearch libraries -->\n<script type=\"application/x-javascript\" src=\"localconfig.js\"/>\n<script type=\"application/x-javascript\" src=\"quicksearch.js\"/>\n<script type=\"application/x-javascript\"><![CDATA[\n\n// Tell QuickSearch that the source of this is the sidebar\nvar sidebar = 1;\n\nfunction load_absolute_url( aAbsoluteURL ) {\n content.location = aAbsoluteURL;\n}\n\nfunction load_relative_url( aRelativeURL ) {\n aRelativeURL = '";
#line 50 "template/en/custom/sidebar.xul.tmpl"
$output .= $stash->get(['Param', [ 'urlbase' ]]);
$output .= "' + aRelativeURL;\n _content.location = aRelativeURL;\n}\n\nfunction initial_keypress_handler( aEvent ) {\n this.removeAttribute(\"class\");\n this.addEventListener(\"keypress\", normal_keypress_handler, true);\n this.removeEventListener(\"keypress\", initial_keypress_handler, true);\n}\n\nfunction normal_keypress_handler( aEvent ) {\n if ( aEvent.keyCode == 13 )\n QuickSearch(this.value);\n}\n\n]]></script>\n\n <textbox id=\"query-field\" class=\"descriptive-content\" value=\"enter search\" onfocus=\"this.setSelectionRange(0,this.value.length)\"/>\n\n <separator class=\"groove\"/>\n\n <box autostretch=\"never\" valign=\"top\">\n <box orient=\"vertical\" flex=\"1\">\n <text class=\"text-link\" onclick=\"load_relative_url('query.cgi')\" value=\"new search\"/>\n <text class=\"text-link\" onclick=\"load_relative_url('report.cgi')\" value=\"reports\"/>\n <text class=\"text-link\" onclick=\"load_relative_url('enter_bug.cgi')\" value=\"new ";
#line 75 "template/en/custom/sidebar.xul.tmpl"
$output .= $stash->get(['terms', 0, 'bug', 0]);
$output .= "\"/>\n <separator class=\"thin\"/>\n";
#line 117 "template/en/custom/sidebar.xul.tmpl"
if ($stash->get(['user', 0, 'id', 0])) {
$output .= "\n <text class=\"text-link\" onclick=\"load_relative_url('userprefs.cgi')\" value=\"edit prefs\"/>";
#line 82 "template/en/custom/sidebar.xul.tmpl"
if ($stash->get(['user', 0, 'groups', 0, 'tweakparams', 0])) {
$output .= "\n <text class=\"text-link\" onclick=\"load_relative_url('editparams.cgi')\" value=\"edit params\"/>";
}
#line 85 "template/en/custom/sidebar.xul.tmpl"
if ($stash->get(['user', 0, 'groups', 0, 'editusers', 0]) || $stash->get(['user', 0, 'can_bless', 0])) {
$output .= "\n <text class=\"text-link\" onclick=\"load_relative_url('editusers.cgi')\" value=\"edit users\"/>";
}
#line 88 "template/en/custom/sidebar.xul.tmpl"
if ($stash->get(['user', 0, 'groups', 0, 'editcomponents', 0])) {
$output .= "\n <text class=\"text-link\" onclick=\"load_relative_url('editcomponents.cgi')\" value=\"edit components\"/>";
}
#line 91 "template/en/custom/sidebar.xul.tmpl"
if ($stash->get(['user', 0, 'groups', 0, 'creategroups', 0])) {
$output .= "\n <text class=\"text-link\" onclick=\"load_relative_url('editgroups.cgi')\" value=\"edit groups\"/>";
}
#line 94 "template/en/custom/sidebar.xul.tmpl"
if ($stash->get(['user', 0, 'groups', 0, 'editkeywords', 0])) {
$output .= "\n <text class=\"text-link\" onclick=\"load_relative_url('editkeywords.cgi')\" value=\"edit keywords\"/>";
}
#line 97 "template/en/custom/sidebar.xul.tmpl"
if ($stash->get(['user', 0, 'groups', 0, 'tweakparams', 0])) {
$output .= "\n <text class=\"text-link\" onclick=\"load_relative_url('sanitycheck.cgi')\" value=\"sanity check\"/>";
}
#line 100 "template/en/custom/sidebar.xul.tmpl"
if ($stash->get(['user', 0, 'get_flag', [ 'can_logout' ]])) {
$output .= "\n <text class=\"text-link\" onclick=\"load_relative_url('relogin.cgi')\" value=\"log out ";
#line 99 "template/en/custom/sidebar.xul.tmpl"
# FILTER
$output .= do {
my $output = '';
my $filter = $context->filter('html')
|| $context->throw($context->error);
$output .= $stash->get(['user', 0, 'login', 0]);
&$filter($output);
};
$output .= "\"/>";
}
$output .= "\n <separator class=\"thin\"/>";
#line 105 "template/en/custom/sidebar.xul.tmpl"
if ($stash->get(['user', 0, 'showmybugslink', 0])) {
#line 103 "template/en/custom/sidebar.xul.tmpl"
# CAPTURE
$stash->set('filtered_username', do {
my $output = '';
# FILTER
$output .= do {
my $output = '';
my $filter = $context->filter('url_quote')
|| $context->throw($context->error);
$output .= $stash->get(['user', 0, 'login', 0]);
&$filter($output);
};
$output;
});
$output .= "\n <text class=\"text-link\" onclick=\"load_relative_url('";
#line 104 "template/en/custom/sidebar.xul.tmpl"
# FILTER
$output .= do {
my $output = '';
my $filter = $context->filter('html')
|| $context->throw($context->error);
# FILTER
$output .= do {
my $output = '';
my $filter = $context->filter('js')
|| $context->throw($context->error);
$output .= $stash->get(['Param', [ 'mybugstemplate' ], 'replace', [ '%userid%', $stash->get('filtered_username') ]]);
&$filter($output);
};
&$filter($output);
};
$output .= "')\" value=\"my ";
#line 104 "template/en/custom/sidebar.xul.tmpl"
$output .= $stash->get(['terms', 0, 'bugs', 0]);
$output .= "\"/>";
}
#line 108 "template/en/custom/sidebar.xul.tmpl"
if ($stash->get(['Param', [ 'usevotes' ]])) {
$output .= "\n <text class=\"text-link\" onclick=\"load_relative_url('votes.cgi?action=show_user')\" value=\"my votes\"/>";
}
$output .= "\n";
#line 112 "template/en/custom/sidebar.xul.tmpl"
# FOREACH
do {
my ($value, $error, $oldloop);
my $list = $stash->get(['user', 0, 'queries', 0]);
unless (UNIVERSAL::isa($list, 'Template::Iterator')) {
$list = Template::Config->iterator($list)
|| die $Template::Config::ERROR, "\n";
}
($value, $error) = $list->get_first();
eval { $oldloop = $stash->get('loop') };
$stash->set('loop', $list);
eval {
LOOP: while (! $error) {
$stash->{'q'} = $value;
$output .= "\n <text class=\"text-link\" onclick=\"load_relative_url('buglist.cgi?cmdtype=runnamed&amp;namedcmd=";
#line 111 "template/en/custom/sidebar.xul.tmpl"
# FILTER
$output .= do {
my $output = '';
my $filter = $context->filter('url_quote')
|| $context->throw($context->error);
$output .= $stash->get(['q', 0, 'name', 0]);
&$filter($output);
};
$output .= "')\" value=\"";
#line 111 "template/en/custom/sidebar.xul.tmpl"
# FILTER
$output .= do {
my $output = '';
my $filter = $context->filter('html')
|| $context->throw($context->error);
$output .= $stash->get(['q', 0, 'name', 0]);
&$filter($output);
};
$output .= "\"/>";;
($value, $error) = $list->get_next();
}
};
$stash->set('loop', $oldloop);
die $@ if $@;
$error = 0 if $error && $error eq Template::Constants::STATUS_DONE;
die $error if $error;
};
$output .= "\n";
}
else {
$output .= "\n <text class=\"text-link\" onclick=\"load_relative_url('createaccount.cgi')\" value=\"new user\"/>\n <text class=\"text-link\" onclick=\"load_relative_url('index.cgi?GoAheadAndLogIn=1')\" value=\"log in\"/>";
}
$output .= "\n\n </box>\n </box>\n\n <spring flex=\"1\"/>\n <box orient=\"horizontal\">\n <spring flex=\"1\"/>\n <html align=\"right\">\n <html:a class=\"text-link\" href=\"";
#line 126 "template/en/custom/sidebar.xul.tmpl"
$output .= $stash->get(['Param', [ 'urlbase' ]]);
$output .= "sidebar.cgi\">reload</html:a>\n </html>\n </box>\n</window>\n";
} };
if ($@) {
$error = $context->catch($@, \$output);
die $error unless $error->type eq 'return';
}
return $output;
},
DEFBLOCKS => {
},
});