aboutsummaryrefslogtreecommitdiffstats
path: root/template/en
diff options
context:
space:
mode:
authorgerv%gerv.net <>2002-08-20 04:17:18 +0000
committergerv%gerv.net <>2002-08-20 04:17:18 +0000
commit9c0a26d3a5a35788694f5f284c69b995a3298c86 (patch)
tree15cc4cfb1e5e9fb7bcc3898530776f44c7b52492 /template/en
parente6fff23fcd99b09511b62c4db4eca658fe5257c4 (diff)
downloadbugs-9c0a26d3a5a35788694f5f284c69b995a3298c86.tar
bugs-9c0a26d3a5a35788694f5f284c69b995a3298c86.tar.gz
bugs-9c0a26d3a5a35788694f5f284c69b995a3298c86.tar.bz2
bugs-9c0a26d3a5a35788694f5f284c69b995a3298c86.tar.xz
bugs-9c0a26d3a5a35788694f5f284c69b995a3298c86.zip
Bug 143286 - Add support for Insiders, Private comments, Private Attachments. Patch by bugreport@peshkin.net; r=gerv.
Diffstat (limited to 'template/en')
-rw-r--r--template/en/default/attachment/create.html.tmpl17
-rw-r--r--template/en/default/attachment/edit.html.tmpl3
-rw-r--r--template/en/default/attachment/list.html.tmpl6
-rw-r--r--template/en/default/bug/comments.html.tmpl32
-rw-r--r--template/en/default/bug/edit.html.tmpl7
-rw-r--r--template/en/default/bug/show-multiple.html.tmpl2
6 files changed, 52 insertions, 15 deletions
diff --git a/template/en/default/attachment/create.html.tmpl b/template/en/default/attachment/create.html.tmpl
index a80708ee3..1c00146e5 100644
--- a/template/en/default/attachment/create.html.tmpl
+++ b/template/en/default/attachment/create.html.tmpl
@@ -94,15 +94,28 @@
onchange="if (this.value) this.form.contenttypemethod[2].checked = true;">
</td>
</tr>
+ [% IF (Param("insidergroup") && UserInGroup(Param("insidergroup"))) %]
+ <tr>
+ <th>Privacy:</th>
+ <td>
+ <em>If the attachment is private, check the box below.</em><br>
+ <input type="checkbox" name="isprivate" id="isprivate" value="1">
+ <label for="isprivate">Private</label>
+ </td>
+ </tr>
+ [% END %]
<tr>
<th>Obsoletes:</th>
<td>
<em>(optional) Check each existing attachment made obsolete by your new attachment.</em><br>
[% IF attachments.size %]
[% FOREACH attachment = attachments %]
- <input type="checkbox" id="[% attachment.id %]"
+ [% IF ((attachment.isprivate == 0) || (Param("insidergroup")
+ && UserInGroup(Param("insidergroup")))) %]
+ <input type="checkbox" id="[% attachment.id %]"
name="obsolete" value="[% attachment.id %]">
- <a href="attachment.cgi?id=[% attachment.id %]&amp;action=edit">[% attachment.id %]: [% attachment.description FILTER html %]</a><br>
+ <a href="attachment.cgi?id=[% attachment.id %]&amp;action=edit">[% attachment.id %]: [% attachment.description FILTER html %]</a><br>
+ [% END %]
[% END %]
[% ELSE %]
[no attachments can be made obsolete]
diff --git a/template/en/default/attachment/edit.html.tmpl b/template/en/default/attachment/edit.html.tmpl
index 5d01d2898..c9bc7c1cd 100644
--- a/template/en/default/attachment/edit.html.tmpl
+++ b/template/en/default/attachment/edit.html.tmpl
@@ -163,6 +163,9 @@
<input type="checkbox" id="isobsolete" name="isobsolete" value="1"
[% 'checked="checked"' IF isobsolete %]>
<label for="isobsolete">obsolete</label><br>
+ [% IF (Param("insidergroup") && UserInGroup(Param("insidergroup"))) %]
+ <input type="checkbox" name="isprivate" value="1"[% " checked" IF isprivate %]> private<br><br>
+ [% END %]
[% IF statusdefs.size %]
<b>Status:</b><br>
diff --git a/template/en/default/attachment/list.html.tmpl b/template/en/default/attachment/list.html.tmpl
index bc25c5721..e7aa8b0ef 100644
--- a/template/en/default/attachment/list.html.tmpl
+++ b/template/en/default/attachment/list.html.tmpl
@@ -28,9 +28,10 @@
<th bgcolor="#cccccc" align="left">Status</th>
<th bgcolor="#cccccc" align="left">Actions</th>
</tr>
-
+ [% canseeprivate = !Param("insidergroup") || UserInGroup(Param("insidergroup")) %]
[% FOREACH attachment = attachments %]
- <tr>
+ [% IF !attachment.isprivate || canseeprivate %]
+ <tr [% "class=\"bz_private\"" IF attachment.isprivate %]>
<td valign="top">
[% IF attachment.isobsolete %]
<strike><a href="attachment.cgi?id=[% attachment.attachid %]&amp;action=view">[% attachment.description FILTER html %]</a></strike>
@@ -67,6 +68,7 @@
[% END %]
</td>
</tr>
+ [% END %]
[% END %]
<tr>
diff --git a/template/en/default/bug/comments.html.tmpl b/template/en/default/bug/comments.html.tmpl
index f1f8e762e..7a8ae73db 100644
--- a/template/en/default/bug/comments.html.tmpl
+++ b/template/en/default/bug/comments.html.tmpl
@@ -19,8 +19,9 @@
# Contributor(s): Gervase Markham <gerv@gerv.net>
#%]
-[% DEFAULT start_at = 0 %]
+[% DEFAULT start_at = 0 mode = "show" %]
[% count = 0 %]
+[% isinsider = Param("insidergroup") && UserInGroup(Param("insidergroup")) %]
[% FOREACH comment = comments %]
[% IF count >= start_at %]
[% PROCESS a_comment %]
@@ -35,14 +36,25 @@
[%############################################################################%]
[% BLOCK a_comment %]
- [% IF count > 0 %]
- <br>
- <i>------- Additional Comment
- <a name="c[% count %]" href="#c[% count %]">#[% count %]</a> From
- <a href="mailto:[% comment.email FILTER html %]">[% comment.name FILTER html %]</a>
- [%+ comment.time %] -------
- </i>
- [% END %]
+ [% IF NOT comment.isprivate || isinsider %]
+ <div [% "class=\"bz_private\"" IF comment.isprivate %]>
+ [% IF count > 0 %]
+ <br>
+ <i>------- Additional Comment
+ <a name="c[% count %]" href="#c[% count %]">#[% count %]</a> From
+ <a href="mailto:[% comment.email FILTER html %]">[% comment.name FILTER html %]</a>
+ [%+ comment.time %] -------
+ </i>
+ [% END %]
+ [% IF mode == "edit" && isinsider %]
+ <i>
+ <input type=hidden name="oisprivate-[% count %]"
+ value="[% comment.isprivate %]">
+ <input type=hidden name="when-[% count %]" value="[% comment.when %]">
+ <input type=checkbox name="isprivate-[% count %]" value="1"
+ [% " checked=\"checked\"" IF comment.isprivate %]> Private
+ </i>
+ [% END %]
[%# Don't indent the <pre> block, since then the spaces are displayed in the
# generated HTML
@@ -50,4 +62,6 @@
<pre>
[%- quoteUrls(comment.body) -%]
</pre>
+ </div>
+ [% END %]
[% END %]
diff --git a/template/en/default/bug/edit.html.tmpl b/template/en/default/bug/edit.html.tmpl
index 502952ef2..9cf33b8b5 100644
--- a/template/en/default/bug/edit.html.tmpl
+++ b/template/en/default/bug/edit.html.tmpl
@@ -28,6 +28,7 @@
h2 = filtered_desc
h3 = "Last modified: $bug.calc_disp_date"
header_html = navigation_links
+ style_urls = [ "css/edit_bug.css" ]
%]
[% END %]
@@ -310,6 +311,9 @@
<br>
<b>Additional <u>C</u>omments:</b>
+ [% IF Param("insidergroup") && UserInGroup(Param("insidergroup")) %]
+ <input type="checkbox" name="commentprivacy" value="1"> Private
+ [% END %]
<br>
<textarea wrap="hard" name="comment" rows="10" cols="80"
accesskey="c"></textarea>
@@ -482,7 +486,6 @@
value="[% Param("move-button-text") %]">
[% END %]
</p>
-</form>
[%# *** Additional Comments *** %]
@@ -502,8 +505,10 @@
[% PROCESS bug/comments.html.tmpl
comments = bug.comments
+ mode = "edit"
%]
+</form>
<hr>
[% PROCESS bug/navigate.html.tmpl %]
diff --git a/template/en/default/bug/show-multiple.html.tmpl b/template/en/default/bug/show-multiple.html.tmpl
index 7c3e7407f..0c089e9c5 100644
--- a/template/en/default/bug/show-multiple.html.tmpl
+++ b/template/en/default/bug/show-multiple.html.tmpl
@@ -22,8 +22,8 @@
[% PROCESS global/header.html.tmpl
title = "Full Text Bug Listing"
+ style_urls = [ "css/show_multiple.css" ]
%]
-
[% IF bugs.first %]
[% FOREACH bug = bugs %]
[% PROCESS bug_display %]