challenge: don't allow to create new challenge unless in group

This commit is contained in:
Tyler Renelle 2013-05-31 09:36:00 -04:00
parent 1411d04518
commit 39d29f50f4

View file

@ -9,12 +9,16 @@
<div class="tab-content">
<div class="tab-pane active" id="challengesViewParty">
{#if _challenge.new}
<app:challenges:create-form />
{#unless _party.id}
Join a party first
{else}
<app:challenges:create-button type='party' gid={{_party.id}} text='Party'/>
{#each _party.challenges as :challenge}
<app:challenges:listing challenge={:challenge} />
{#if _challenge.new}
<app:challenges:create-form />
{else}
<app:challenges:create-button type='party' gid={{_party.id}} text='Party'/>
{#each _party.challenges as :challenge}
<app:challenges:listing challenge={:challenge} />
{/}
{/}
{/}
</div>