diff options
author | lpsolit%gmail.com <> | 2007-10-12 06:07:22 +0200 |
---|---|---|
committer | lpsolit%gmail.com <> | 2007-10-12 06:07:22 +0200 |
commit | 52abf10f5c2d745491a168d1a5f1030368628b3f (patch) | |
tree | bb549302c2c56e329302d61022080a71fe915bd7 /template/en/default/admin | |
parent | 52fecc3e11f934046e721bd18cd05f746bd8166f (diff) | |
download | bugzilla-52abf10f5c2d745491a168d1a5f1030368628b3f.tar.gz bugzilla-52abf10f5c2d745491a168d1a5f1030368628b3f.tar.xz |
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')
-rw-r--r-- | template/en/default/admin/components/create.html.tmpl | 2 | ||||
-rw-r--r-- | template/en/default/admin/components/updated.html.tmpl | 46 |
2 files changed, 16 insertions, 32 deletions
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 @@ <hr> <input type="submit" id="create" value="Add"> <input type="hidden" name="action" value="new"> - <input type="hidden" name='open_name' value='All Open'> - <input type="hidden" name='nonopen_name' value='All Closed'> <input type="hidden" name='product' value="[% product.name FILTER html %]"> <input type="hidden" name="token" value="[% token FILTER html %]"> </form> 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 %] |