Files
habitica/views/tasks/task-list.jade
T
2013-08-25 18:20:07 -04:00

85 lines
5.3 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
div(ng-controller='TasksCtrl')
.module(ng-controller='TasksCtrl', ng-repeat='list in taskLists', ng-class='{"rewards-module": list.type==="reward"}')
.task-column(class='{{list.type}}s', ng-class='{"tabbable tabs-below": list.type=="todo"}')
// Todos export/graph options
span.option-box.pull-right(ng-if='list.main && list.type=="todo"')
a.option-action(ng-show='user.history.todos', x-bind='click:toggleChart', data-id='todos', rel='tooltip', title='Progress')
i.icon-signal
a.option-action(ng-href='/v1/users/{{user.id}}/calendar.ics?apiToken={{user.apiToken}}', rel='tooltip', title='iCal')
i.icon-calendar
// <a href="https://www.google.com/calendar/render?cid={{encodeiCalLink(_user.id, _user.apiToken)}}" rel=tooltip title="Google Calendar"><i class=icon-calendar></i></a>
// Gold & Gems
span.option-box.pull-right.wallet(ng-if='list.main && list.type=="reward"')
.money
| {{gold(user.stats.gp)}}
span.shop_gold(rel='tooltip', title='Gold')
.money
| {{silver(user.stats.gp)}}
span.shop_silver(rel='tooltip', title='Silver')
// Header
h2.task-column_title {{list.header}}
// Todo Chart
.todos-chart(ng-if='list.type == "todo"', ng-show='_page.charts.todos')
// Add New
form.addtask-form.form-inline.new-task-form(name='new{{list.type}}form', ng-show='list.editable', ng-hide='_showCompleted && list.type=="todo"', data-task-type='{{list.type}}', ng-submit='addTask(list.newTask)')
span.addtask-field
input(type='text', ng-model='list.newTask', placeholder='{{list.placeHolder}}', required)
input.addtask-btn(type='submit', value='', ng-disabled='new{{list.type}}form.$invalid')
hr
// Actual List
ul(class='{{list.type}}s', ng-show='user[list.type + "s"]')
include ./task
// Static Rewards
ul.items(ng-show='list.main && list.type=="reward" && user.flags.itemsEnabled')
li.task.reward-item(ng-hide='item.hide', ng-repeat='item in itemStore')
// right-hand side control buttons
.task-meta-controls
span.task-notes(rel='popover', data-trigger='hover', data-placement='left', data-content='{{item.notes}}', data-original-title='{{item.text}}')
i.icon-comment
//left-hand size commands
.task-controls
a.task-action-btn.btn-reroll(ng-if='item.type=="reroll"', data-toggle='modal', data-target='#reroll-modal')
i.icon-repeat
a.money.btn-buy.item-btn(ng-if='item.type!="reroll"', ng-click='buy(item.type)')
span.reward-cost {{item.value}}
span.shop_gold
// main content
span(ng-class='{"shop_{{item.classes}} shop-sprite item-img": true}')
p.task-text {{item.text}}
br
// Ads
div(ng-if='authenticated() && user.flags.ads != "hide" && list.main')
span.pull-right
a(x-bind='click:showStripe', rel='tooltip', title='Remove Ads')
i.icon-remove
br
a(href='#', data-target='#why-ads-modal', data-toggle='modal', rel='tooltip', title='Why Ads?')
i.icon-question-sign
a(ng-if='list.type=="habit"', href='http://www.amazon.com/gp/product/1400069289/ref=as_li_tf_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1400069289&linkCode=as2&tag=ha0d2-20') The Power of Habit&colon; Why We Do What We Do in Life and Business
img(src='//www.assoc-amazon.com/e/ir?t=ha0d2-20&l=as2&o=1&a=1400069289', width='1', height='1', border='0', alt='', style='border:none !important; margin:0px !important;')
a(ng-if='list.type=="daily"', href='http://www.amazon.com/gp/product/0142000280/ref=as_li_tf_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=0142000280&linkCode=as2&tag=ha0d2-20') Getting Things Done&colon; The Art of Stress-Free Productivity
img(src='//www.assoc-amazon.com/e/ir?t=ha0d2-20&l=as2&o=1&a=0142000280', width='1', height='1', border='0', alt='', style='border:none !important; margin:0px !important;')
a(ng-if='list.type=="todo"', href='http://www.amazon.com/gp/product/0312430000/ref=as_li_tf_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=0312430000&linkCode=as2&tag=ha0d2-20') The Checklist Manifesto&colon; How to Get Things Right
img(src='//www.assoc-amazon.com/e/ir?t=ha0d2-20&l=as2&o=1&a=0312430000', width='1', height='1', border='0', alt='', style='border:none !important; margin:0px !important;')
a(ng-if='list.type=="reward"', href='http://www.amazon.com/gp/product/1594484805/ref=as_li_tf_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1594484805&linkCode=as2&tag=ha0d2-20') Drive&colon; The Surprising Truth About What Motivates Us
img(src='//www.assoc-amazon.com/e/ir?t=ha0d2-20&l=as2&o=1&a=1594484805', width='1', height='1', border='0', alt='', style='border:none !important; margin:0px !important;')
// Todo Tabs
div(ng-if='list.type=="todo"')
button.task-action-btn.tile.spacious.bright(ng-show='_showCompleted', x-bind='click:clearCompleted') Clear Completed
// remaining/completed tabs
ul.nav.nav-tabs
li(ng-class='{active: !list.showCompleted}')
a(ng-click='list.showCompleted = false') Remaining
li(ng-class='{active: list.showCompleted}')
a(ng-click='list.showCompleted= true') Complete