summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2009-04-18 00:27:38 +0200
committermkanat%bugzilla.org <>2009-04-18 00:27:38 +0200
commit14b373c1b2a5182ed9ffa3a1bc8d8bf104311a12 (patch)
tree9b6002f391a0bba98262272367ddd567793d1576
parent27d919b36377e25b74a5c46e8c5eec218c58be39 (diff)
downloadbugzilla-14b373c1b2a5182ed9ffa3a1bc8d8bf104311a12.tar.gz
bugzilla-14b373c1b2a5182ed9ffa3a1bc8d8bf104311a12.tar.xz
Bug 482584: Add a parameter to hide the "See Also" field
Patch by Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, r=dkl, a=LpSolit
-rw-r--r--Bugzilla/Config/BugFields.pm6
-rw-r--r--template/en/default/admin/params/bugfields.html.tmpl8
-rw-r--r--template/en/default/bug/edit.html.tmpl16
-rw-r--r--template/en/default/bug/field.html.tmpl20
-rw-r--r--template/en/default/pages/fields.html.tmpl24
5 files changed, 47 insertions, 27 deletions
diff --git a/Bugzilla/Config/BugFields.pm b/Bugzilla/Config/BugFields.pm
index b0375ad50..c7f7f6e5a 100644
--- a/Bugzilla/Config/BugFields.pm
+++ b/Bugzilla/Config/BugFields.pm
@@ -84,6 +84,12 @@ sub get_param_list {
},
{
+ name => 'use_see_also',
+ type => 'b',
+ default => 1
+ },
+
+ {
name => 'defaultpriority',
type => 's',
choices => \@legal_priorities,
diff --git a/template/en/default/admin/params/bugfields.html.tmpl b/template/en/default/admin/params/bugfields.html.tmpl
index e0625b480..794f925b7 100644
--- a/template/en/default/admin/params/bugfields.html.tmpl
+++ b/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/template/en/default/bug/edit.html.tmpl b/template/en/default/bug/edit.html.tmpl
index c59771eab..de89f1b8e 100644
--- a/template/en/default/bug/edit.html.tmpl
+++ b/template/en/default/bug/edit.html.tmpl
@@ -908,13 +908,15 @@
[%# Block for See Also #%]
[%############################################################################%]
[% BLOCK section_see_also %]
- <tr>
- [% INCLUDE bug/field.html.tmpl
- field = bug_fields.see_also
- value = bug.see_also
- editable = bug.check_can_change_field('see_also', 0, 1)
- %]
- </tr>
+ [% IF Param('use_see_also') || bug.see_also.size %]
+ <tr>
+ [% INCLUDE bug/field.html.tmpl
+ field = bug_fields.see_also
+ value = bug.see_also
+ editable = bug.check_can_change_field('see_also', 0, 1)
+ %]
+ </tr>
+ [% END %]
[% END %]
[%############################################################################%]
diff --git a/template/en/default/bug/field.html.tmpl b/template/en/default/bug/field.html.tmpl
index bdfdd099e..7a514e888 100644
--- a/template/en/default/bug/field.html.tmpl
+++ b/template/en/default/bug/field.html.tmpl
@@ -174,18 +174,22 @@
[% FOREACH url = value %]
<li>
<a href="[% url FILTER html %]">[% url FILTER html %]</a>
- <label><input type="checkbox" value="[% url FILTER html %]"
- name="remove_[% field.name FILTER html %]">
- Remove</label>
+ [% IF editable %]
+ <label><input type="checkbox" value="[% url FILTER html %]"
+ name="remove_[% field.name FILTER html %]">
+ Remove</label>
+ [% END %]
</li>
[% END %]
[% '</ul>' IF value.size %]
- <label for="[% field.name FILTER html %]">
- <strong>Add [% terms.Bug %] URLs:</strong>
- </label><br>
- <input type="text" id="[% field.name FILTER html %]"
- class="text_input" name="[% field.name FILTER html %]" size="40">
+ [% IF editable && Param('use_see_also') %]
+ <label for="[% field.name FILTER html %]">
+ <strong>Add [% terms.Bug %] URLs:</strong>
+ </label><br>
+ <input type="text" id="[% field.name FILTER html %]" size="40"
+ class="text_input" name="[% field.name FILTER html %]">
+ [% END %]
[% END %]
[% ELSIF field.type == constants.FIELD_TYPE_TEXTAREA %]
<div class="uneditable_textarea">[% value FILTER wrap_comment(60)
diff --git a/template/en/default/pages/fields.html.tmpl b/template/en/default/pages/fields.html.tmpl
index f5458de37..0125a55e9 100644
--- a/template/en/default/pages/fields.html.tmpl
+++ b/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.
</p>
-<h2><a name="see_also"></a>See Also</h2>
-
-<p>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.</p>
-
-<p>You should normally use this field to refer to [% terms.bugs %] in
- <em>other</em> installations. For [% terms.bugs %] in this
- installation, it is better to use the "Depends On" and "Blocks"
- fields.</p>
+[% IF Param("use_see_also") %]
+ <h2><a name="see_also"></a>See Also</h2>
+
+ <p>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.</p>
+
+ <p>You should normally use this field to refer to [% terms.bugs %] in
+ <em>other</em> installations. For [% terms.bugs %] in this
+ installation, it is better to use the "Depends On" and "Blocks"
+ fields.</p>
+[% END %]
[% INCLUDE global/footer.html.tmpl %]