diff options
author | lpsolit%gmail.com <> | 2007-10-12 04:07:22 +0000 |
---|---|---|
committer | lpsolit%gmail.com <> | 2007-10-12 04:07:22 +0000 |
commit | 52abf10f5c2d745491a168d1a5f1030368628b3f (patch) | |
tree | bb549302c2c56e329302d61022080a71fe915bd7 /template/en/default/admin/components/updated.html.tmpl | |
parent | 52fecc3e11f934046e721bd18cd05f746bd8166f (diff) | |
download | bugs-52abf10f5c2d745491a168d1a5f1030368628b3f.tar bugs-52abf10f5c2d745491a168d1a5f1030368628b3f.tar.gz bugs-52abf10f5c2d745491a168d1a5f1030368628b3f.tar.bz2 bugs-52abf10f5c2d745491a168d1a5f1030368628b3f.tar.xz bugs-52abf10f5c2d745491a168d1a5f1030368628b3f.zip |
Bug 313123: Implement $component->create and $component->update based on Object.pm - Patch by Frédéric Buclin <LpSolit@gmail.com> r/a=mkanat
Diffstat (limited to 'template/en/default/admin/components/updated.html.tmpl')
-rw-r--r-- | template/en/default/admin/components/updated.html.tmpl | 46 |
1 files changed, 16 insertions, 30 deletions
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 %] + <p>Updated Component name to: '[% comp.name FILTER html %]'.</p> +[% END %] + +[% IF changes.description.defined %] <table> <tr> <td>Updated description to:</td> @@ -59,11 +48,11 @@ </table> [% END %] -[% IF updated_initialowner %] +[% IF changes.initialowner.defined %] <p>Updated Default Assignee to: '[% comp.default_assignee.login FILTER html %]'.</p> [% END %] -[% IF updated_initialqacontact %] +[% IF changes.initialqacontact.defined %] <p> [% IF comp.default_qa_contact.id %] Updated Default QA Contact to '[% comp.default_qa_contact.login FILTER html %]'. @@ -73,22 +62,19 @@ </p> [% END %] -[% IF updated_name %] - <p>Updated Component name to: '[% comp.name FILTER html %]'.</p> -[% END %] - -[% IF updated_initialcc %] - [% IF initial_cc_names %] - <p>Updated Default CC list to: - '[% initial_cc_names FILTER html %]'.</p> +[% 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 %] + <p>Updated Default CC list to: [% cc_list.join(", ") FILTER html %].</p> [% ELSE %] <p>Removed the Default CC list.</p> [% END %] [% END %] -[% UNLESS updated_description || updated_initialowner || - updated_initialqacontact || updated_name || - updated_initialcc %] +[% UNLESS changes.keys.size %] <p>Nothing changed for component '[% comp.name FILTER html %]'.</p> [% END %] |