summaryrefslogtreecommitdiffstats
path: root/template
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2009-01-22 05:08:35 +0100
committermkanat%bugzilla.org <>2009-01-22 05:08:35 +0100
commitc7b2b76566b8258c676967537986e996c17c3d8d (patch)
treeead1d770b601720c2aac9bdfc3133cd56071d694 /template
parentfdfe948ab5eea11a0ce98b84044308a6f95adfa0 (diff)
downloadbugzilla-c7b2b76566b8258c676967537986e996c17c3d8d.tar.gz
bugzilla-c7b2b76566b8258c676967537986e996c17c3d8d.tar.xz
Bug 472872: Add a field where people can put the URLs to Bugzilla bugs (from any Bugzilla installation)
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=dkl, a=mkanat
Diffstat (limited to 'template')
-rw-r--r--template/en/default/bug/edit.html.tmpl17
-rw-r--r--template/en/default/bug/field.html.tmpl17
-rw-r--r--template/en/default/global/field-descs.none.tmpl5
-rw-r--r--template/en/default/global/user-error.html.tmpl18
-rw-r--r--template/en/default/pages/fields.html.tmpl12
5 files changed, 67 insertions, 2 deletions
diff --git a/template/en/default/bug/edit.html.tmpl b/template/en/default/bug/edit.html.tmpl
index 4cb5017e1..82f24c06d 100644
--- a/template/en/default/bug/edit.html.tmpl
+++ b/template/en/default/bug/edit.html.tmpl
@@ -188,7 +188,9 @@
[% PROCESS section_cclist %]
- [% PROCESS section_spacer %]
+ [% PROCESS section_spacer %]
+
+ [% PROCESS section_see_also %]
[% PROCESS section_customfields %]
@@ -902,6 +904,19 @@
[% END %]
[%############################################################################%]
+[%# 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>
+[% END %]
+
+[%############################################################################%]
[%# Block for FLAGS #%]
[%############################################################################%]
diff --git a/template/en/default/bug/field.html.tmpl b/template/en/default/bug/field.html.tmpl
index d29aaa305..04443579e 100644
--- a/template/en/default/bug/field.html.tmpl
+++ b/template/en/default/bug/field.html.tmpl
@@ -164,6 +164,23 @@
[% INCLUDE global/textarea.html.tmpl
id = field.name name = field.name minrows = 4 maxrows = 8
cols = 60 defaultcontent = value %]
+ [% CASE constants.FIELD_TYPE_BUG_URLS %]
+ [% '<ul class="bug_urls">' IF value.size %]
+ [% 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>
+ </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 %]"
+ name="[% field.name FILTER html %]" size="40">
[% END %]
[% ELSIF field.type == constants.FIELD_TYPE_TEXTAREA %]
<div class="uneditable_textarea">[% value FILTER wrap_comment(60)
diff --git a/template/en/default/global/field-descs.none.tmpl b/template/en/default/global/field-descs.none.tmpl
index 324edb592..403002074 100644
--- a/template/en/default/global/field-descs.none.tmpl
+++ b/template/en/default/global/field-descs.none.tmpl
@@ -76,6 +76,7 @@
"reporter_accessible" => "Reporter accessible",
"requestees.login_name" => "Flag Requestee",
"resolution" => "Resolution",
+ "see_also" => "See Also",
"setters.login_name" => "Flag Setter",
"setting" => "Setting",
"settings" => "Settings",
@@ -90,12 +91,14 @@
Description here, by copying their Description from the
database. If you want to override this for your language
or your installation, just use a hook. %]
-
+[%# Also create the bug_fields hash. %]
[% UNLESS Param('shutdownhtml') %]
[% USE Bugzilla %]
+ [% SET bug_fields = {} %]
[% FOREACH bz_field = Bugzilla.get_fields() %]
[% SET field_descs.${bz_field.name} = bz_field.description
IF !field_descs.${bz_field.name}.defined %]
+ [% SET bug_fields.${bz_field.name} = bz_field %]
[% END %]
[% END %]
diff --git a/template/en/default/global/user-error.html.tmpl b/template/en/default/global/user-error.html.tmpl
index 39077c542..8b7d8e6ff 100644
--- a/template/en/default/global/user-error.html.tmpl
+++ b/template/en/default/global/user-error.html.tmpl
@@ -229,6 +229,24 @@
[% bug_id FILTER url_quote %]&amp;GoAheadAndLogIn=1">log
in to an account</a> with the appropriate permissions.
+ [% ELSIF error == "bug_url_invalid" %]
+ [% title = "Invalid Bug URL" %]
+ <code>[% url FILTER html %]</code> is not a valid URL to [% terms.abug %].
+ [% IF reason == 'http' %]
+ URLs must start with "http" or "https".
+ [% ELSIF reason == 'show_bug' %]
+ [%+ terms.Bug %] URLs should point to <code>show_bug.cgi</code>
+ in a [% terms.Bugzilla %] installation.
+ [% ELSIF reason == 'id' %]
+ There is no valid [% terms.bug %] id in that URL.
+ [% END %]
+
+ [% ELSIF error == "bug_url_too_long" %]
+ [% title = "Invalid Bug URL" %]
+ [% terms.Bug %] URLs can not be longer than
+ [%+ constants.MAX_BUG_URL_LENGTH FILTER none %] characters long.
+ <code>[% url FILTER html %]</code> is too long.
+
[% ELSIF error == "buglist_parameters_required" %]
[% title = "Parameters Required" %]
[% docslinks = {'query.html' => "Searching for $terms.bugs",
diff --git a/template/en/default/pages/fields.html.tmpl b/template/en/default/pages/fields.html.tmpl
index 90ec2d045..f5458de37 100644
--- a/template/en/default/pages/fields.html.tmpl
+++ b/template/en/default/pages/fields.html.tmpl
@@ -315,4 +315,16 @@ 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>
+
[% INCLUDE global/footer.html.tmpl %]