mirror of
https://github.com/kennethreitz-archive/www.gittip.com.git
synced 2026-06-21 15:50:59 +00:00
93 lines
3.6 KiB
HTML
93 lines
3.6 KiB
HTML
|
|
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.6/angular.min.js"></script>
|
|
<script src="/assets/{{ __version__ }}/open_group.js"></script>
|
|
|
|
<div id="open_group" ng-app="Gittip.open_group">
|
|
|
|
<div class="group" ng-controller="Gittip.open_group.IdentificationsCtrl">
|
|
<div id="split">
|
|
<h2>Money Distribution</h2>
|
|
|
|
{% if user.allowed_to_answer() %}
|
|
<p class="fine" ui-if="nanswers_needed == 0">This info is
|
|
<b>public</b>.</p>
|
|
{% end %}
|
|
|
|
<p class="fine" ui-if="nanswers_needed == 0">Money given to
|
|
{{ participant.username }} is split as follows, based on everyone's
|
|
answer to, “Who is {{ participant.username }}?”</p>
|
|
|
|
<p class="fine" ui-if="nanswers_needed > 0">We need
|
|
|
|
<ng-pluralize
|
|
count="nanswers_needed"
|
|
when="{ 'one': 'one more person'
|
|
, 'other': '{} more people'
|
|
}"></ng-pluralize>
|
|
|
|
to answer <b>“Who is {{ participant.username }}?”</b>
|
|
before we'll start distributing money collected for
|
|
{{ participant.username }}.</p>
|
|
|
|
<table>
|
|
<tr ng-repeat="participant in split">
|
|
<td>{{ participant.username }}</td>
|
|
<td class="percentage">{{ participant.weight * 100 | currency:"" }}%</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
<div id="identifications">
|
|
<h2>Who is {{ participant.username }}?</h2>
|
|
|
|
{% if user.allowed_to_answer() %}
|
|
<p class="fine">Your answer is <b>private</b>.</p>
|
|
|
|
<p class="fine">Whom do you associate with
|
|
{{ participant.username }}, and how strongly?</p>
|
|
|
|
<table>
|
|
<tr ng-repeat="participant in identifications">
|
|
<td>{{ participant.username }}</td>
|
|
<td>
|
|
<input type="radio"
|
|
name="weight-{{ participant.username }}"
|
|
value="{{ weight }}"
|
|
title="weight = {{ weight }}"
|
|
ng-repeat="weight in weights"
|
|
ng-model="participant.weight"
|
|
ng-change="change(participant, weight)"
|
|
/>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="2" id="lookup-container">
|
|
<br />
|
|
<form ng-submit="doAdd()">
|
|
<input tabindex="1" id="query"
|
|
autocomplete="off"
|
|
placeholder="Enter a Gittip username"
|
|
ng-model="query"
|
|
ng-change="doLookup()"
|
|
/> <button type="submit"
|
|
tabindex="2">Add</button>
|
|
</form>
|
|
<ul id="lookup-results">
|
|
<li ng-repeat="participant in lookup">
|
|
<span>{{ participant.username }}</span>
|
|
</li>
|
|
</ul>
|
|
</tr>
|
|
</table>
|
|
{% else %}
|
|
|
|
<p class="fine">Once you have successfully moved money into or out
|
|
of Gittip, you will be able to give your own answer to “Who
|
|
is {{ participant.username }}?”</p>
|
|
|
|
{% end %}
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|