From 4acb2424e62cbd64bc92a5dec2cbe1e2b7096157 Mon Sep 17 00:00:00 2001 From: Max Kanat-Alexander Date: Mon, 21 Jun 2010 19:10:21 -0700 Subject: Bug 22353: Automatic duplicate bug detection on enter_bug.cgi r=glob, a=mkanat --- template/en/default/bug/create/create.html.tmpl | 46 ++++++++++++++++++++++--- template/en/default/global/header.html.tmpl | 21 +++++++---- 2 files changed, 56 insertions(+), 11 deletions(-) (limited to 'template') diff --git a/template/en/default/bug/create/create.html.tmpl b/template/en/default/bug/create/create.html.tmpl index a59fe9112..0733de02a 100644 --- a/template/en/default/bug/create/create.html.tmpl +++ b/template/en/default/bug/create/create.html.tmpl @@ -30,10 +30,11 @@ [% PROCESS global/header.html.tmpl title = title - yui = [ 'autocomplete', 'calendar' ] - style_urls = [ 'skins/standard/attachment.css' ] + yui = [ 'autocomplete', 'calendar', 'datatable' ] + style_urls = [ 'skins/standard/attachment.css', + 'skins/standard/enter_bug.css' ] javascript_urls = [ "js/attachment.js", "js/util.js", - "js/field.js", "js/TUI.js" ] + "js/field.js", "js/TUI.js", "js/bug.js" ] onload = 'set_assign_to();' %] @@ -169,7 +170,7 @@ TUI_hide_default('expert_fields');
+ class="enter_bug_form" enctype="multipart/form-data"> @@ -508,13 +509,48 @@ TUI_hide_default('expert_fields'); + class="required" id="short_desc"> + [% IF feature_enabled('jsonrpc') AND !cloned_bug_id %] + + Possible
Duplicates: + +
+ + + + [% END %] + Description: + [% defaultcontent = BLOCK %] [% IF cloned_bug_id %] +++ This [% terms.bug %] was initially created as a clone of [% terms.Bug %] #[% cloned_bug_id %] +++ diff --git a/template/en/default/global/header.html.tmpl b/template/en/default/global/header.html.tmpl index 3d7fc2e68..75fa71825 100644 --- a/template/en/default/global/header.html.tmpl +++ b/template/en/default/global/header.html.tmpl @@ -52,6 +52,7 @@ [% SET yui_css = { autocomplete => 1, calendar => 1, + datatable => 1, } %] [%# Note: This is simple dependency resolution--you can't have dependencies @@ -60,6 +61,7 @@ #%] [% SET yui_deps = { autocomplete => ['json', 'connection', 'datasource'], + datatable => ['json', 'connection', 'datasource', 'element'], } %] @@ -99,7 +101,20 @@ [% END %] [% style_urls.unshift('skins/standard/global.css') %] + [%# YUI dependency resolution %] + [%# We have to do this in a separate array, because modifying the + # existing array by unshift'ing dependencies confuses FOREACH. + #%] + [% SET yui_resolved = [] %] + [% FOREACH yui_name = yui %] + [% FOREACH yui_dep = yui_deps.${yui_name}.reverse %] + [% yui_resolved.push(yui_dep) IF NOT yui_resolved.contains(yui_dep) %] + [% END %] + [% yui_resolved.push(yui_name) IF NOT yui_resolved.contains(yui_name) %] + [% END %] + [% SET yui = yui_resolved %] + [%# YUI CSS %] [% FOREACH yui_name = yui %] [% IF yui_css.$yui_name %] - [%# Resolve YUI dependencies. Note that CSS was already done above. %] - [% FOREACH yui_name = yui %] - [% IF yui_deps.$yui_name %] - [% yui = yui_deps.${yui_name}.merge(yui) %] - [% END %] - [% END %] [% FOREACH yui_name = yui %]