habitica/views/tasks/index.jade

70 lines
3.2 KiB
Text
Raw Normal View History

2013-08-25 14:57:19 +00:00
div(ng-controller='TasksCtrl')
.module(ng-controller='TasksCtrl', ng-repeat='list in taskLists', ng-class='{"rewards-module": list.type==="reward"}')
2013-08-25 23:47:18 +00:00
.task-column(class='{{list.type}}s')
2013-08-25 14:57:19 +00:00
// 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', tooltip='Progress')
2013-08-25 14:57:19 +00:00
i.icon-signal
a.option-action(ng-href='/v1/users/{{user.id}}/calendar.ics?apiToken={{user.apiToken}}', tooltip='iCal')
2013-08-25 14:57:19 +00:00
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
2013-08-25 18:35:26 +00:00
| {{gold(user.stats.gp)}}
span.shop_gold(tooltip='Gold')
2013-08-25 14:57:19 +00:00
.money
| {{silver(user.stats.gp)}}
span.shop_silver(tooltip='Silver')
2013-08-25 14:57:19 +00:00
// 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='list.showCompleted && list.type=="todo"', data-task-type='{{list.type}}', ng-submit='addTask(list)')
2013-08-25 14:57:19 +00:00
span.addtask-field
2013-08-25 17:44:49 +00:00
input(type='text', ng-model='list.newTask', placeholder='{{list.placeHolder}}', required)
input.addtask-btn(type='submit', value='', ng-disabled='new{{list.type}}form.$invalid')
2013-08-25 14:57:19 +00:00
hr
// Actual List
2013-08-25 17:44:49 +00:00
ul(class='{{list.type}}s', ng-show='user[list.type + "s"]')
2013-08-25 15:47:10 +00:00
include ./task
2013-08-25 14:57:19 +00:00
// Static Rewards
2013-08-25 18:35:26 +00:00
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
2013-08-26 00:57:36 +00:00
span.task-notes(popover-trigger='mouseenter', popover-placement='left', popover='{{item.notes}}', popover-title='{{item.text}}')
2013-08-25 18:35:26 +00:00
i.icon-comment
//left-hand size commands
.task-controls
a.task-action-btn.btn-reroll(ng-if='item.type=="reroll"', ng-click='modals.reroll = true')
2013-08-25 18:35:26 +00:00
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}')
2013-08-25 18:35:26 +00:00
p.task-text {{item.text}}
2013-08-25 14:57:19 +00:00
br
2013-08-28 17:16:53 +00:00
include ./ads
2013-08-25 14:57:19 +00:00
// Todo Tabs
2013-08-25 23:47:18 +00:00
div(ng-if='list.type=="todo"', ng-class='{"tabbable tabs-below": list.type=="todo"}')
2013-08-25 14:57:19 +00:00
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