habitica/views/app/party.html

46 lines
1.9 KiB
HTML
Raw Normal View History

2013-02-17 05:42:42 +00:00
<modals:>
2013-02-17 05:55:52 +00:00
<app:modals:modal modalId="party-modal">
2013-02-17 05:42:42 +00:00
{#if _user.party.current}
<h2>{_party.name}</h2>
<table class="table table-striped">
{#each _partyMembers as :member}
<tr><td>{username(:member.auth)}</td><td>({:member.id})</td></tr>
{/}
</table>
<form class=form-inline x-bind="submit: partyInvite">
{#if _view.partyError}
<div class='alert alert-danger'>{_view.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>
{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>
{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 _view.partyError}
<div class='alert alert-danger'>{_view.partyError}</div>
{/}
<div class=control-group>
<input type="text" class="input-medium" placeholder="Party Name" value="{_newParty}" />
<input type="submit" class="btn" value="Create" />
</div>
</form>
{/}
<@footer>
<button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
</@footer>
2013-02-17 05:55:52 +00:00
</app:modals:modal>