From 10288809cf3e59225cc3df19d7cde804ae03b07b Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" Date: Fri, 17 Apr 2009 22:30:33 +0000 Subject: [PATCH] Bug 482584: Add a parameter to hide the "See Also" field Patch by Max Kanat-Alexander r=LpSolit, r=dkl, a=LpSolit git-svn-id: svn://10.0.0.236/trunk@256956 18797224-902f-48f8-a5cc-f745e15eee43 --- .../bugzilla/Bugzilla/Config/BugFields.pm | 6 ++++++ .../default/admin/params/bugfields.html.tmpl | 8 +++++++- .../template/en/default/bug/edit.html.tmpl | 16 ++++++++------- .../template/en/default/bug/field.html.tmpl | 20 +++++++++++-------- .../en/default/pages/fields.html.tmpl | 20 ++++++++++--------- 5 files changed, 45 insertions(+), 25 deletions(-) diff --git a/mozilla/webtools/bugzilla/Bugzilla/Config/BugFields.pm b/mozilla/webtools/bugzilla/Bugzilla/Config/BugFields.pm index b0375ad504e..c7f7f6e5ace 100644 --- a/mozilla/webtools/bugzilla/Bugzilla/Config/BugFields.pm +++ b/mozilla/webtools/bugzilla/Bugzilla/Config/BugFields.pm @@ -83,6 +83,12 @@ sub get_param_list { default => 0 }, + { + name => 'use_see_also', + type => 'b', + default => 1 + }, + { name => 'defaultpriority', type => 's', diff --git a/mozilla/webtools/bugzilla/template/en/default/admin/params/bugfields.html.tmpl b/mozilla/webtools/bugzilla/template/en/default/admin/params/bugfields.html.tmpl index e0625b48092..794f925b785 100644 --- a/mozilla/webtools/bugzilla/template/en/default/admin/params/bugfields.html.tmpl +++ b/mozilla/webtools/bugzilla/template/en/default/admin/params/bugfields.html.tmpl @@ -42,6 +42,12 @@ usebugaliases => "Do you wish to use $terms.bug aliases, which allow you to assign " _ "$terms.bugs an easy-to-remember name by which you can refer to them?", + use_see_also => + "Do you wish to use the See Also field? It allows you refer to" + _ " $terms.bugs in other installations. Even if you disable this field," + _ " $terms.bug relationships (URLs) already set on $terms.bugs will" + _ " still appear and can be removed.", + defaultpriority => "This is the priority that newly entered $terms.bugs are set to.", defaultseverity => "This is the severity that newly entered $terms.bugs are set to.", @@ -57,4 +63,4 @@ "You can leave this empty: " _ "$terms.Bugzilla will then use the operating system that the browser " _ "reports to be running on as the default." } -%] \ No newline at end of file +%] diff --git a/mozilla/webtools/bugzilla/template/en/default/bug/edit.html.tmpl b/mozilla/webtools/bugzilla/template/en/default/bug/edit.html.tmpl index c59771eab47..de89f1b8e7b 100644 --- a/mozilla/webtools/bugzilla/template/en/default/bug/edit.html.tmpl +++ b/mozilla/webtools/bugzilla/template/en/default/bug/edit.html.tmpl @@ -908,13 +908,15 @@ [%# Block for See Also #%] [%############################################################################%] [% BLOCK section_see_also %] - - [% INCLUDE bug/field.html.tmpl - field = bug_fields.see_also - value = bug.see_also - editable = bug.check_can_change_field('see_also', 0, 1) - %] - + [% IF Param('use_see_also') || bug.see_also.size %] + + [% INCLUDE bug/field.html.tmpl + field = bug_fields.see_also + value = bug.see_also + editable = bug.check_can_change_field('see_also', 0, 1) + %] + + [% END %] [% END %] [%############################################################################%] diff --git a/mozilla/webtools/bugzilla/template/en/default/bug/field.html.tmpl b/mozilla/webtools/bugzilla/template/en/default/bug/field.html.tmpl index bdfdd099ee4..7a514e8887e 100644 --- a/mozilla/webtools/bugzilla/template/en/default/bug/field.html.tmpl +++ b/mozilla/webtools/bugzilla/template/en/default/bug/field.html.tmpl @@ -174,18 +174,22 @@ [% FOREACH url = value %]
  • [% url FILTER html %] - + [% IF editable %] + + [% END %]
  • [% END %] [% '' IF value.size %] -
    - + [% IF editable && Param('use_see_also') %] +
    + + [% END %] [% END %] [% ELSIF field.type == constants.FIELD_TYPE_TEXTAREA %]
    [% value FILTER wrap_comment(60) diff --git a/mozilla/webtools/bugzilla/template/en/default/pages/fields.html.tmpl b/mozilla/webtools/bugzilla/template/en/default/pages/fields.html.tmpl index f5458de37a2..0125a55e987 100644 --- a/mozilla/webtools/bugzilla/template/en/default/pages/fields.html.tmpl +++ b/mozilla/webtools/bugzilla/template/en/default/pages/fields.html.tmpl @@ -315,16 +315,18 @@ When searching for [% terms.bugs %] that have been resolved or verified, remember to set the status field appropriately.

    -

    See Also

    +[% IF Param("use_see_also") %] +

    See Also

    -

    This allows you to refer to [% terms.bugs %] in other installations. - You can enter a URL to a [%+ terms.bug %] in the "Add [% terms.Bug %] URLs" - field to note that that [% terms.bug %] is related to this one. You can - enter multiple URLs at once by separating them with a comma.

    +

    This allows you to refer to [% terms.bugs %] in other installations. + You can enter a URL to a [%+ terms.bug %] in the "Add [% terms.Bug %] URLs" + field to note that that [% terms.bug %] is related to this one. You can + enter multiple URLs at once by separating them with a comma.

    -

    You should normally use this field to refer to [% terms.bugs %] in - other installations. For [% terms.bugs %] in this - installation, it is better to use the "Depends On" and "Blocks" - fields.

    +

    You should normally use this field to refer to [% terms.bugs %] in + other installations. For [% terms.bugs %] in this + installation, it is better to use the "Depends On" and "Blocks" + fields.

    +[% END %] [% INCLUDE global/footer.html.tmpl %]