Commit 530c0dc7 authored by gerv%gerv.net's avatar gerv%gerv.net

Bug 117760 - Templatise showvotes.cgi and incorporate doeditvotes.cgi. Patch by…

Bug 117760 - Templatise showvotes.cgi and incorporate doeditvotes.cgi. Patch by gerv, r=myk, bbaetz.
parent 57f2b020
......@@ -1410,7 +1410,7 @@ Actions:
};
if ($loggedin) {
if ($::anyvotesallowed) {
$html .= " | <A HREF=\"showvotes.cgi\">My votes</A>\n";
$html .= " | <A HREF=\"votes.cgi?action=show_user\">My votes</A>\n";
}
}
if ($loggedin) {
......
......@@ -287,9 +287,10 @@
</th>
<td>
[% bug.votes %]&nbsp;&nbsp;&nbsp;
<a href="showvotes.cgi?bug_id=[% bug.bug_id %]">Show votes for this
bug</a>&nbsp;&nbsp;&nbsp;
<a href="showvotes.cgi?voteon=[% bug.bug_id %]">Vote for this bug</a>
<a href="votes.cgi?action=show_bug&bug_id=[% bug.bug_id %]">Show
votes for this bug</a>&nbsp;&nbsp;&nbsp;
<a href="votes.cgi?action=show_user&bug_id=[% bug.bug_id %]">Vote
for this bug</a>
</td>
</tr>
</table>
......
......@@ -97,7 +97,7 @@ function normal_keypress_handler( aEvent ) {
<text class="text-link" onclick="load_relative_url('[% mybugsurl FILTER html %]')" value="my bugs"/>
[% END %]
[% IF anyvotesallowed && username %]
<text class="text-link" onclick="load_relative_url('showvotes.cgi')" value="my votes"/>
<text class="text-link" onclick="load_relative_url('votes.cgi?action=show_user')" value="my votes"/>
[% END %]
[% FOREACH name = namedqueries %]
......
<!-- 1.0@bugzilla.org -->
[%# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is the Bugzilla Bug Tracking System.
#
# The Initial Developer of the Original Code is Netscape Communications
# Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s): Gervase Markham <gerv@gerv.net>
#%]
[% INCLUDE global/header
title = "Remove your votes?"
%]
<p>
You are about to remove all of your bug votes. Are you sure you wish to
remove your vote from every bug you've voted on?
</p>
<form action="votes.cgi" method="post">
<input type="hidden" name="action" value="vote">
<p>
<input type="radio" name="delete_all_votes" value="1">
Yes, delete all my votes
</p>
<p>
<input type="radio" name="delete_all_votes" value="0" checked="checked">
No, go back and review my votes
</p>
<p>
<input type="submit" value="Submit">
</p>
</form>
[% INCLUDE global/footer %]
<!-- 1.0@bugzilla.org -->
[%# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is the Bugzilla Bug Tracking System.
#
# The Initial Developer of the Original Code is Netscape Communications
# Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s): Gervase Markham <gerv@gerv.net>
#%]
[% INCLUDE global/header
title = "Show Votes"
h2 = "Bug <a href='show_bug.cgi?id=$bug_id'>$bug_id</a>"
%]
<table cellspacing="4">
<tr>
<th>Who</th>
<th>Number of votes</th>
</tr>
[% FOREACH user = users %]
<tr>
<td>
<a href="votes.cgi?action=show_user&user=[% user.name %]">
[% user.name %]
</a>
</td>
<td align="right">
[% user.count %]
</td>
</tr>
[% END %]
</table>
<p>Total votes: [% total %]</p>
[% INCLUDE global/footer %]
<!-- 1.0@bugzilla.org -->
[%# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is the Bugzilla Bug Tracking System.
#
# The Initial Developer of the Original Code is Netscape Communications
# Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s): Gervase Markham <gerv@gerv.net>
#%]
[% INCLUDE global/header
title = "Show Votes"
h2 = user.name
%]
[% IF votes_recorded %]
<p>
<font color="red">
The changes to your votes have been saved.
</font>
</p>
[% ELSE %]
<br>
[% END %]
[% IF products.size %]
<form action="votes.cgi">
<input type="hidden" name="action" value="vote">
<table cellspacing="4">
<tr>
<td></td>
<th>Bug #</th>
<th>Summary</th>
<th>Votes</th>
</tr>
[% FOREACH product = products %]
<tr>
<th>[% product.name FILTER html %]</th>
<td></td>
[% IF product.maxperbug < product.maxvotes AND
product.maxperbug > 1 %]
<td>
<font size="-1">
(Note: only [% product.maxperbug %] vote
[% "s" IF product.maxperbug != 1 %] allowed per bug in
this product.)
</font>
</td>
[% END %]
</tr>
[% FOREACH bug = product.bugs %]
<tr>
<td></td>
<td>
[% "<strike>" IF NOT bug.opened %]
<a href="show_bug.cgi?id=[% bug.id %]">
[% bug.id %]</a>
[% "</strike>" IF NOT bug.opened %]
</td>
<td>
<a href="votes.cgi?action=show_bug&bug_id=[% bug.id %]">
[% bug.summary FILTER html %]
</a>
</td>
<td align="right">
[% IF user.canedit %]
[% IF product.onevoteonly %]
<input type="checkbox" name="[% bug.id %]" value="1"
[% " checked" IF bug.count %]>
[% ELSE %]
<input name="[% bug.id %]" value="[% bug.count %]"
size="2">
[% END %]
[% ELSE %]
[% bug.count %]
[% END %]
</td>
</tr>
[% END %]
<tr>
<td></td>
<td colspan="3">[% product.total %] vote
[% "s" IF product.total != 1 %] used out of [% product.maxvotes %]
allowed.
<br>
<br>
</td>
</tr>
[% END %]
</table>
[% IF user.canedit %]
<input type="submit" value="Change My Votes">
<br>
<br>
To change your votes, type in new numbers (using zero to
mean no votes) or change the checkbox, and then click
<b>Change My Votes</b>.
[% END %]
</form>
[% ELSE %]
<p>
[% IF user.canedit %]
You are
[% ELSE %]
This user is
[% END %]
currently not voting on any bugs.
</p>
[% END %]
<p>
<a href="votehelp.html">Help with voting</a>.
</p>
[% INCLUDE global/footer %]
<HTML>
<html>
<!--
The contents of this file are subject to the Mozilla Public
License Version 1.1 (the "License"); you may not use this file
......@@ -21,25 +21,29 @@
Contributor(s): Terry Weissman <terry@mozilla.org>
-->
<head>
<title>Bugzilla Voting</title>
</head>
<TITLE>Bugzilla Voting</TITLE>
<H1>Bugzilla Voting</H1>
<body>
<h1>Bugzilla Voting</h1>
<p>
Bugzilla has a "voting" feature. Each product allows users to have a
certain number of votes. (Some products may not allow any, which
means you can't vote on things in that product at all.) With your
vote, you indicate which bugs you think are the most important to be
fixed.
</p>
<p>
Depending on how the administrator has configured the relevant
product, you may be able to vote for the same bug more than one time.
But remember, you only have so many votes to use in total! So, you
can either vote a little for many bugs, or vote a lot for a few bugs.
</p>
<p>
To look at votes:
<ul>
......@@ -47,9 +51,9 @@ To look at votes:
"At least ___ votes" field. This will show you items that
match your query that have at least one vote.
</ul>
</p>
<p>
To vote for a bug:
<ul>
......@@ -64,9 +68,12 @@ To vote for a bug:
You will automatically get email notifying you of any changes that
occur on bugs you vote for.
</p>
<p>
You may review your votes at any time by clicking on the "My Votes" link in
the page footer (which appears on most pages), or by clicking <a
href="showvotes.cgi">here</a>.
You may review your votes at any time by clicking on the "<a
href="votes.cgi?action=show_user">My Votes</a>" link in
the page footer.
</p>
</body>
</html>
This diff is collapsed. Click to expand it.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment