habitica/views/tasks/index.jade

73 lines
3.5 KiB
Text
Raw Normal View History

2013-08-25 14:57:19 +00:00
div(ng-controller='TasksCtrl')
include ./filters
.grid
.module(ng-controller='TasksCtrl', ng-repeat='list in taskLists', ng-class='{"rewards-module": list.type==="reward"}')
.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', ng-click='toggleChart("todos")', tooltip='Progress')
i.icon-signal
//-a.option-action(ng-href='/v1/users/{{user.id}}/calendar.ics?apiToken={{user.apiToken}}', tooltip='iCal')
a.option-action(ng-click='notPorted()', tooltip='iCal', ng-show='false')
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>
2013-08-25 14:57:19 +00:00
// Gold & Gems
span.option-box.pull-right.wallet(ng-if='list.main && list.type=="reward"')
.money
| {{gold(user.stats.gp)}}
span.shop_gold(tooltip='Gold')
.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}}
2013-08-25 14:57:19 +00:00
// Todo Chart
.todos-chart(ng-if='list.type == "todo"', ng-show='charts.todos')
2013-08-25 14:57:19 +00:00
// 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)')
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
2013-08-25 14:57:19 +00:00
// Actual List
2013-09-03 23:48:10 +00:00
ul(class='{{list.type}}s', ng-show='user[list.type + "s"].length > 0', habitrpg-sortable)
include ./task
2013-08-25 14:57:19 +00:00
// 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(popover-trigger='mouseenter', popover-placement='left', popover='{{item.notes}}', popover-title='{{item.text}}')
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')
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}}
2013-08-25 14:57:19 +00:00
br
2013-08-25 14:57:19 +00:00
include ./ads
2013-08-25 14:57:19 +00:00
// Todo Tabs
div(ng-if='list.type=="todo"', ng-class='{"tabbable tabs-below": list.type=="todo"}')
button.task-action-btn.tile.spacious.bright(ng-show='list.showCompleted', ng-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