habitica/views/app/party.html

42 lines
1.6 KiB
HTML
Raw Normal View History

<party:>
{#if _user.party.current}
<h2>{{_party.name}}</h2>
<table class="table table-striped">
{{#each _partyMembers as :member}}
<tr><td>{{username(:member.auth, :member.profile.name)}}</td><td>({{:member.id}})</td></tr>
{{/}}
</table>
<form class=form-inline x-bind="submit: partyInvite">
{#if _partyError}
<div class='alert alert-danger'>{_partyError}</div>
{/}
<div class='control-group'>
<input type="text" class="input-medium" placeholder="User Id" value="{_newPartyMember}">
<input type="submit" class="btn" value="Invite" />
</div>
</form>
<a class='btn btn-danger' x-bind="click: partyLeave">Leave</a>
2013-02-17 05:42:42 +00:00
{else if _user.party.invitation}
<!-- TODO show by whom -->
<h2>You're Invited To {_party.name}</h2>
<a class='btn btn-success' x-bind="click: partyAccept">Accept</a>
<a class='btn btn-danger' x-bind="click: partyReject">Reject</a>
2013-02-17 05:42:42 +00:00
{else}
<h2>Create A Party</h2>
<!-- Not in a party , no invites - create a new one -->
<p>You are not in a party. You can either create one and invite friends, or if you want to join an existing party, have them enter:</p>
<pre class=prettyprint>{_user.id}</pre>
<form class=form-inline x-bind="submit: partyCreate">
{#if _partyError}
<div class='alert alert-danger'>{_partyError}</div>
2013-02-17 05:42:42 +00:00
{/}
<div class=control-group>
<input type="text" class="input-medium" placeholder="Party Name" value="{_newParty}" />
<input type="submit" class="btn" value="Create" />
</div>
</form>
{/}