Files
www.gittip.com/templates/open-group-members.html
2013-04-14 14:06:37 -04:00

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, &ldquo;Who is {{ participant.username }}?&rdquo;</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>&ldquo;Who is {{ participant.username }}?&rdquo;</b>
before we'll start distributing money collected for
{{ participant.username }}.</p>
<table>
<tr ng-repeat="participant in split">
<td>&#123;{ participant.username }}</td>
<td class="percentage">&#123;{ 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>&#123;{ participant.username }}</td>
<td>
<input type="radio"
name="weight-&#123;{ participant.username }}"
value="&#123;{ weight }}"
title="weight = &#123;{ 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()"
/>&nbsp;<button type="submit"
tabindex="2">Add</button>
</form>
<ul id="lookup-results">
<li ng-repeat="participant in lookup">
<span>&#123;{ 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 &ldquo;Who
is {{ participant.username }}?&rdquo;</p>
{% end %}
</div>
</div>
</div>