Files
Chad Whitacre 28cb48c72a Big changeover from id to username; #287
I sort of did this one with the blast shield down. I haven't even run
the tests yet. The sorts of things I changed:

 - SQL {elsewhere,exchanges}.participant_id => .participant
 - SQL participants.id => .username
 - ORM {user,participant,self}.id => .username
2013-04-05 15:48:59 -04:00

130 lines
4.4 KiB
HTML

<div class="col1">
<!-- Name and Anonymous -->
<form class="username">
<h2>You are
<span class="view">{{ escape(user.username) }}</span>
<input tabindex="2" name="username" value="{{ escape(user.username) }}"/>
<button tabindex="1" class="edit">Edit</button>
<button tabindex="3" class="save" type="submit">Save</button>
<button tabindex="4" class="cancel" type="cancel">Cancel</button>
</h2>
<h2 class="warning">Have you linked to your Gittip profile from other
websites? Be sure to update those links!</h2>
</form>
<p>
<label tabindex="5" class="anonymous">
<input type="checkbox"
{% if participant.anonymous %}checked="true"{% end %} />
Hide total giving from others.
</label>
</p>
<!-- Statement -->
<form class="statement">
<h2>Statement
<button tabindex="6" class="edit">Edit</button>
<button tabindex="8" class="save" type="submit">Save</button>
<button tabindex="9" class="cancel" type="cancel">Cancel</button>
</h2>
<div class="edit">
{{ MAKING }} ...
<textarea tabindex="7">{{ participant.statement }}</textarea>
<span class="help">Newlines and links are converted to HTML.</span>
</div>
<div class="view">
{{ MAKING }} <span>{{ wrap(participant.statement) }}</span>
</div>
</form>
</div>
<div class="col2">
<!-- Funding Goal -->
<form class="goal">
<h2>Funding Goal
<button tabindex="10" class="edit">Edit</button>
<button tabindex="12" class="save" type="submit">Save</button>
<button tabindex="13" class="cancel" type="cancel">Cancel</button>
</h2>
<div class="view">
{% if user.goal > 0 %}
My goal is to receive
${{ locale.format("%.2f", user.goal, grouping=True) }} per week on
Gittip.
{% elif user.goal == 0 %}
I'm here as a patron.
{% else %}
I'm grateful for gifts, but I don't have a specific funding goal.
{% end %}
</div>
<table class="edit"><tr><td>
<input tabindex="14" type="radio" name="goal" id="goal-yes" value="custom"
{% if user.goal > 0 %} checked="true"{% end %}/>
<label for="goal-yes">My goal is to receive $</label><input
name="goal_custom" id="goal-custom"
{% if (user.goal is None) or (user.goal == 0) %}
{% else %}
value="{{ locale.format("%.2f", user.goal, grouping=True) }}"
{% end %} />
<label for="goal-yes"> per week on Gittip.</label>
<br />
<input tabindex="14" type="radio" name="goal" id="goal-0" value="null"
{% if user.goal is None %} checked="true"{% end %}/>
<label for="goal-0">I'm grateful for gifts, but I don't
have a specific funding goal.</label>
<br />
<input tabindex="14" type="radio" name="goal" id="goal-null" value="0.00"
{% if user.goal == 0 %} checked="true"{% end %}/>
<label for="goal-null">I'm here as a patron.</label>
</td></tr></table>
</form>
<!-- Connected Accounts -->
{% include "connected-accounts.html" %}
</div>
<div class="clear"></div>
{% if participant.get_dollars_receiving() > 0 %}
{% set tip_distribution = participant.get_tip_distribution()[0] %}
<div class="col1">
<h2>Tips Received, by Number of Tips</h2>
{% include "tip-distribution.html" %}
</div>
<div class="col2">
<h2>Tips Received, by Dollar Amount</h2>
<table class="tip-distribution">
{% for amount, ncontributors, summed, pcontributors, psummed in tip_distribution %}
<tr>
{% if str(amount) == '-1' %}
<td class="amount" colspan="2">Other</td>
{% else %}
<td class="dollar-sign">$</td>
<td class="amount">{{ amount }}</td>
{% end %}
<td colspan="2"></td>
<td class="count">
<span class="green bar" style="width: {{ psummed * 240 }}pt"></span>
{{ "%5.1f" % (psummed * 100) }}%
<span class="number">(${{ summed }})</span>
</td>
</tr>
{% end %}
</table>
</div>
{% end %}