challenges: float-right edit button, us icons for consistency

This commit is contained in:
Tyler Renelle 2013-05-31 18:42:02 -04:00
parent 28f45baf7b
commit 0fd74680c2

View file

@ -72,14 +72,28 @@
</div>
<div id="accordion-challenge-{{@challenge.id}}" class="accordion-body collapse in">
<div class="accordion-inner">
<!-- prize -->
{#if @challenge.prize}
<a class="pull-right gem-wallet">
<a class="gem-wallet">
<span class="task-action-btn tile flush neutral"><div class="Gems"></div> {@challenge.prize} Gem Prize</span>
</a>
{/}
<!-- Edit button -->
<span style='position:absolute; right:0;'>
{#if and(not(_editing.challenges[@challenge.id]),equal(@challenge.uid,_user.id))}
<ul class='nav nav-pills'><li>
<a x-bind='click:toggleChallengeEdit' data-id={{@challenge.id}} ><i class=icon-pencil></i></a>
</li></ul>
{else}
<ul class='nav nav-pills'><li>
<a x-bind='click:toggleChallengeEdit' data-id={{@challenge.id}} ><i class=icon-ok></i></a>
</li></ul>
{/}
</span>
{#if _editing.challenges[@challenge.id]}
<a class=btn x-bind='click:toggleChallengeEdit' data-id={{@challenge.id}} >Done</a>
<div class='-options'>
<input type=text class='option-content' value={@challenge.name} />
<textarea cols=3 class='option-content' placeholder='Description'>{@challenge.description}</textarea>
@ -89,13 +103,8 @@
<a class='btn btn-small btn-danger' x-bind=click:removeAt >Delete</a>
{{/}}
{/}
<!-- elseif breaks here, have to start a new if --->
{#if and(not(_editing.challenges[@challenge.id]),equal(@challenge.uid,_user.id))}
<a class=btn x-bind='click:toggleChallengeEdit' data-id={{@challenge.id}} >Edit</a>
{/}
{#if @challenge.description}<div>{@challenge.description}</div>{/}
<div class="grid">
<app:tasks:task-lists
habits={@challenge.habits}