From 52abf10f5c2d745491a168d1a5f1030368628b3f Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Fri, 12 Oct 2007 04:07:22 +0000 Subject: Bug 313123: Implement $component->create and $component->update based on Object.pm - Patch by Frédéric Buclin r/a=mkanat MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../en/default/admin/components/create.html.tmpl | 2 - .../en/default/admin/components/updated.html.tmpl | 46 ++++++++-------------- template/en/default/global/messages.html.tmpl | 6 +++ template/en/default/global/user-error.html.tmpl | 18 ++++----- 4 files changed, 30 insertions(+), 42 deletions(-) (limited to 'template/en/default') diff --git a/template/en/default/admin/components/create.html.tmpl b/template/en/default/admin/components/create.html.tmpl index 2cefd6d93..5e414d52a 100644 --- a/template/en/default/admin/components/create.html.tmpl +++ b/template/en/default/admin/components/create.html.tmpl @@ -95,8 +95,6 @@
- - diff --git a/template/en/default/admin/components/updated.html.tmpl b/template/en/default/admin/components/updated.html.tmpl index 176d653b7..1b94421b1 100644 --- a/template/en/default/admin/components/updated.html.tmpl +++ b/template/en/default/admin/components/updated.html.tmpl @@ -21,27 +21,12 @@ #%] [%# INTERFACE: - # - # 'updated_XXX' variables are booleans, and are defined if the - # 'XXX' field was updated during the edit just being handled. - # - # updated_name: the name of the component updated - # - # updated_description: the component description updated - # - # updated_initialowner: the default assignee updated - # - # updated_initialqacontact: the default qa contact updated - # - # updated_initialcc: the default initial cc list + # changes: hashref; contains changes made to the component. # # comp: object; Bugzilla::Component object representing the component # user updated. # product: object; Bugzilla::Product object representing the product to # which the component belongs. - # - # initial_cc_names: a comma-separated list of the login names of - # the Initial CC, if it was updated. #%] [% title = BLOCK %]Updating Component '[% comp.name FILTER html %]' of Product @@ -50,7 +35,11 @@ title = title %] -[% IF updated_description %] +[% IF changes.name.defined %] +

Updated Component name to: '[% comp.name FILTER html %]'.

+[% END %] + +[% IF changes.description.defined %] @@ -59,11 +48,11 @@
Updated description to:
[% END %] -[% IF updated_initialowner %] +[% IF changes.initialowner.defined %]

Updated Default Assignee to: '[% comp.default_assignee.login FILTER html %]'.

[% END %] -[% IF updated_initialqacontact %] +[% IF changes.initialqacontact.defined %]

[% IF comp.default_qa_contact.id %] Updated Default QA Contact to '[% comp.default_qa_contact.login FILTER html %]'. @@ -73,22 +62,19 @@

[% END %] -[% IF updated_name %] -

Updated Component name to: '[% comp.name FILTER html %]'.

-[% END %] - -[% IF updated_initialcc %] - [% IF initial_cc_names %] -

Updated Default CC list to: - '[% initial_cc_names FILTER html %]'.

+[% IF changes.cc_list.defined %] + [% IF comp.initial_cc.size %] + [% cc_list = [] %] + [% FOREACH cc_user = comp.initial_cc %] + [% cc_list.push(cc_user.login) %] + [% END %] +

Updated Default CC list to: [% cc_list.join(", ") FILTER html %].

[% ELSE %]

Removed the Default CC list.

[% END %] [% END %] -[% UNLESS updated_description || updated_initialowner || - updated_initialqacontact || updated_name || - updated_initialcc %] +[% UNLESS changes.keys.size %]

Nothing changed for component '[% comp.name FILTER html %]'.

[% END %] diff --git a/template/en/default/global/messages.html.tmpl b/template/en/default/global/messages.html.tmpl index b9b423ca6..aa7068add 100644 --- a/template/en/default/global/messages.html.tmpl +++ b/template/en/default/global/messages.html.tmpl @@ -451,6 +451,12 @@ # we can still use get_text(). %] [% PROCESS "admin/sanitycheck/messages.html.tmpl" %] + [% ELSIF message_tag == "series_all_open" %] + All Open + + [% ELSIF message_tag == "series_all_closed" %] + All Closed + [% ELSIF message_tag == "sudo_started" %] [% title = "Sudo session started" %] The sudo session has been started. For the next 6 hours, or until you diff --git a/template/en/default/global/user-error.html.tmpl b/template/en/default/global/user-error.html.tmpl index 4a5cd58d5..77ce40f72 100644 --- a/template/en/default/global/user-error.html.tmpl +++ b/template/en/default/global/user-error.html.tmpl @@ -298,12 +298,13 @@ [% ELSIF error == "component_already_exists" %] [% title = "Component Already Exists" %] - A component with the name '[% name FILTER html %]' already exists. + The [% product.name FILTER html %] product already has + a component named [% name FILTER html %]. [% ELSIF error == "component_blank_description" %] [% title = "Blank Component Description Not Allowed" %] - You must enter a non-blank description for component '[% name FILTER html %]'. - + You must enter a non-blank description for this component. + [% ELSIF error == "component_blank_name" %] [% title = "Blank Component Name Not Allowed" %] You must enter a name for this new component. @@ -317,16 +318,11 @@ [% ELSIF error == "component_name_too_long" %] [% title = "Component Name Is Too Long" %] The name of a component is limited to 64 characters. - '[% name FILTER html %]' is too long ([% name.size %] characters). + '[% name FILTER html %]' is too long ([% name.length %] characters). [% ELSIF error == "component_need_initialowner" %] [% title = "Component Requires Default Assignee" %] - You must enter a default assignee for component '[% name FILTER html %]'. - - [% ELSIF error == "component_not_valid" %] - [% title = "Specified Component Does Not Exist" %] - Product [% product FILTER html %] does not have a component - named [% name FILTER html %]. + A default assignee is required for this component. [% ELSIF error == "customfield_nonexistent" %] [% title = "Unknown Custom Field" %] @@ -1620,6 +1616,8 @@ [% BLOCK object_name %] [% IF class == "Bugzilla::User" %] user + [% ELSIF class == "Bugzilla::Component" %] + component [% ELSIF class == "Bugzilla::Version" %] version [% ELSIF class == "Bugzilla::Milestone" %] -- cgit v1.2.3-24-g4f1b