2013-05-02 12:17:04 +00:00
< party: >
2013-05-08 11:47:10 +00:00
{#if _partyMembers}
2013-05-02 18:26:25 +00:00
< div class = 'row-fluid' >
< div class = "span6 border-right" >
< h3 > {{_party.name}}< / h3 >
< 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 >
< / div >
< div class = "span6" >
< h3 > Chat< / h3 >
< form x-bind = 'submit:partySendChat' >
2013-05-07 16:48:00 +00:00
< textarea class = "span6" rows = "3" x-bind = 'keyup:partyMessageKeyup' > {_chatMessage}< / textarea > < br / >
2013-05-02 18:26:25 +00:00
< input class = btn type = submit value = Submit / >
< / form >
2013-05-05 17:07:36 +00:00
< ul class = 'party-chat unstyled' >
2013-05-02 18:26:25 +00:00
{#each _party.chat as :message}
2013-05-05 17:07:36 +00:00
< app:party:chat-message message = {{:message}} / >
2013-05-02 18:26:25 +00:00
{/}
< / ul >
< / div >
2013-05-02 12:17:04 +00:00
< / div >
2013-02-17 05:42:42 +00:00
2013-05-02 12:17:04 +00:00
{else if _user.party.invitation}
2013-05-02 18:26:25 +00:00
<!-- 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
2013-05-02 12:17:04 +00:00
{else}
2013-05-02 18:26:25 +00:00
< 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 >
{/}
< div class = control-group >
< input type = "text" class = "input-medium" placeholder = "Party Name" value = "{_newParty}" / >
< input type = "submit" class = "btn" value = "Create" / >
< / div >
< / form >
2013-05-02 12:17:04 +00:00
{/}
2013-05-04 15:03:03 +00:00
< chat-message: >
2013-05-05 22:29:10 +00:00
< li class = "{{#if indexOf(:message.text, username(_user.auth, _user.profile.name))}}highlight{{/if}}" >
2013-05-05 17:07:36 +00:00
< span
class="label {{#if @message.npc}}label-success{{else if @message.contributor}}label-inverse{{else if equal(@message.uuid,_user.id)}}label-info{{/}} chat-message"
rel='tooltip' title="{{@message.contributor}}{{@message.npc}}">
2013-05-05 17:44:24 +00:00
{{@message.user}}< / span > {{@message.text}} - < span class = 'muted time' > {relativeDate(@message.timestamp, _currentTime)}
2013-05-10 10:53:20 +00:00
{{#if equal(@message.uuid,_user.id)}}{{#with @message}}< a x-bind = "click:deleteChatMessage" > < i rel = tooltip title = Delete class = icon-remove > < / i > < / a > {{/}}{{/}}
2013-05-05 17:07:36 +00:00
< / span >
2013-05-05 17:44:24 +00:00
< / li >