2013-10-27 00:23:52 +00:00
|
|
|
|
// Note here, we need this part of Habit to be a directive since we're going to be passing it variables from various
|
|
|
|
|
|
// parts of the app. The alternative would be to create new scopes for different containing sections, but that
|
|
|
|
|
|
// started to get unwieldy
|
|
|
|
|
|
script(id='templates/habitrpg-tasks.html', type="text/ng-template")
|
2014-02-04 20:27:05 +00:00
|
|
|
|
.tasks-lists.container-fluid
|
|
|
|
|
|
.row
|
2014-02-04 20:53:23 +00:00
|
|
|
|
.col-md-3.col-sm-6(bindonce='lists', ng-repeat='list in lists', bo-class='{"rewards-module": list.type==="reward"}')
|
2014-02-04 20:27:05 +00:00
|
|
|
|
.task-column(class='{{list.type}}s')
|
2013-08-25 14:57:19 +00:00
|
|
|
|
|
2014-02-04 20:27:05 +00:00
|
|
|
|
// Todos export/graph options
|
|
|
|
|
|
span.option-box.pull-right(bo-if='main && list.type=="todo"')
|
|
|
|
|
|
a.option-action(ng-show='obj.history.todos', ng-click='toggleChart("todos")', tooltip=env.t('progress'))
|
|
|
|
|
|
span.glyphicon.glyphicon-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')
|
|
|
|
|
|
span.glyphicon.glyphicon-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
|
|
|
|
|
2014-02-04 20:27:05 +00:00
|
|
|
|
// Header
|
|
|
|
|
|
h2.task-column_title {{list.header}}
|
2013-08-25 14:57:19 +00:00
|
|
|
|
|
2014-02-04 20:27:05 +00:00
|
|
|
|
// Todo Chart
|
|
|
|
|
|
.todos-chart(bo-if='list.type == "todo"', ng-show='charts.todos')
|
2013-08-25 14:57:19 +00:00
|
|
|
|
|
2014-02-04 20:27:05 +00:00
|
|
|
|
// Add New
|
2014-11-01 09:46:50 +00:00
|
|
|
|
form.addtask-form.form-inline.new-task-form(name='new{{list.type}}form', ng-hide='obj._locked', ng-submit='addTask(obj[list.type+"s"],list)')
|
2014-02-04 20:27:05 +00:00
|
|
|
|
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
|
|
|
|
|
2014-10-19 05:03:24 +00:00
|
|
|
|
mixin taskColumnTabs(position)
|
2014-10-19 08:04:28 +00:00
|
|
|
|
// Habits Tabs
|
|
|
|
|
|
div(bo-if='main && list.type=="habit"', class='tabbable tabs-below')
|
|
|
|
|
|
ul.nav.nav-tabs
|
|
|
|
|
|
li(ng-class='{active: list.view == "all"}')
|
|
|
|
|
|
a(ng-click='list.view = "all"')=env.t('all')
|
|
|
|
|
|
li(ng-class='{active: list.view == "yellowred"}')
|
|
|
|
|
|
a(ng-click='list.view = "yellowred"')=env.t('yellowred')
|
|
|
|
|
|
li(ng-class='{active: list.view == "greenblue"}')
|
|
|
|
|
|
a(ng-click='list.view = "greenblue"')=env.t('greenblue')
|
2014-10-19 05:03:24 +00:00
|
|
|
|
// Daily Tabs
|
|
|
|
|
|
div(bo-if='main && list.type=="daily"', class='tabbable tabs-below')
|
|
|
|
|
|
// remaining/completed tabs
|
|
|
|
|
|
ul.nav.nav-tabs
|
|
|
|
|
|
li(ng-class='{active: list.view == "all"}')
|
|
|
|
|
|
a(ng-click='list.view = "all"')=env.t('all')
|
|
|
|
|
|
li(ng-class='{active: list.view == "remaining"}')
|
|
|
|
|
|
a(ng-click='list.view = "remaining"')=env.t('due')
|
|
|
|
|
|
li(ng-class='{active: list.view == "complete"}')
|
|
|
|
|
|
a(ng-click='list.view = "complete"')=env.t('grey')
|
|
|
|
|
|
// Todo Tabs
|
|
|
|
|
|
div(bo-if='main && list.type=="todo"', bo-class='{"tabbable tabs-below": list.type=="todo"}')
|
|
|
|
|
|
if position=="bottom"
|
2014-11-01 09:54:41 +00:00
|
|
|
|
div(ng-show='list.view == "complete"')
|
2014-10-19 05:03:24 +00:00
|
|
|
|
.alert
|
|
|
|
|
|
=env.t('lotOfToDos')
|
|
|
|
|
|
button.task-action-btn.tile.spacious.bright(ng-click='user.ops.clearCompleted({})',popover=env.t('deleteToDosExplanation'),popover-trigger='mouseenter')=env.t('clearCompleted')
|
|
|
|
|
|
// remaining/completed tabs
|
|
|
|
|
|
ul.nav.nav-tabs
|
2014-11-01 09:54:41 +00:00
|
|
|
|
li(ng-class='{active: list.view == "remaining"}')
|
|
|
|
|
|
a(ng-click='list.view = "remaining"')=env.t('remaining')
|
2014-11-01 19:49:49 +00:00
|
|
|
|
li(ng-class='{active: list.view == "dated"}', tooltip=env.t('datedNotSorted'))
|
2014-11-01 10:34:36 +00:00
|
|
|
|
a(ng-click='list.view = "dated"')=env.t('dated')
|
2014-11-01 09:54:41 +00:00
|
|
|
|
li(ng-class='{active: list.view == "complete"}')
|
|
|
|
|
|
a(ng-click='list.view = "complete"')=env.t('complete')
|
2014-10-19 08:04:28 +00:00
|
|
|
|
// Rewards Tabs
|
|
|
|
|
|
div(bo-if='main && list.type=="reward"', class='tabbable tabs-below')
|
|
|
|
|
|
ul.nav.nav-tabs
|
|
|
|
|
|
li(ng-class='{active: list.view == "all"}')
|
|
|
|
|
|
a(ng-click='list.view = "all"')=env.t('all')
|
|
|
|
|
|
li(ng-class='{active: list.view == "ingamerewards"}')
|
|
|
|
|
|
a(ng-click='list.view = "ingamerewards"')=env.t('ingamerewards')
|
2014-10-19 05:03:24 +00:00
|
|
|
|
|
|
|
|
|
|
+taskColumnTabs('top')
|
|
|
|
|
|
|
2014-02-04 20:27:05 +00:00
|
|
|
|
// Actual List
|
2014-08-28 22:25:21 +00:00
|
|
|
|
ul(class='{{list.type}}s main-list', ng-show='obj[list.type + "s"].length > 0', hrpg-sort-tasks)
|
2014-02-04 20:27:05 +00:00
|
|
|
|
include ./task
|
2013-08-25 14:57:19 +00:00
|
|
|
|
|
2014-02-04 20:27:05 +00:00
|
|
|
|
// Static Rewards
|
|
|
|
|
|
ul.items.rewards(ng-if='main && list.type=="reward" && user.flags.itemsEnabled')
|
2014-03-06 17:10:58 +00:00
|
|
|
|
li.task.reward-item(ng-repeat='item in itemStore',popover-trigger='mouseenter', popover-placement='top', popover='{{item.notes()}}')
|
2014-02-04 20:27:05 +00:00
|
|
|
|
// right-hand side control buttons
|
|
|
|
|
|
.task-meta-controls
|
|
|
|
|
|
span.task-notes
|
|
|
|
|
|
span.glyphicon.glyphicon-comment
|
|
|
|
|
|
//left-hand size commands
|
2014-06-14 12:31:12 +00:00
|
|
|
|
.task-controls.task-primary
|
2014-02-04 20:27:05 +00:00
|
|
|
|
a.money.btn-buy.item-btn(ng-click='buy(item)')
|
|
|
|
|
|
span.reward-cost {{item.value}}
|
|
|
|
|
|
span.shop_gold
|
|
|
|
|
|
// main content
|
2014-06-14 12:31:12 +00:00
|
|
|
|
span(bo-class='{"shop_{{item.key}} shop-sprite item-img": true}').reward-img
|
2014-03-06 17:10:58 +00:00
|
|
|
|
p.task-text {{item.text()}}
|
2013-08-25 14:57:19 +00:00
|
|
|
|
|
2014-02-14 00:57:00 +00:00
|
|
|
|
// Events
|
2014-10-03 01:17:26 +00:00
|
|
|
|
ul.items.rewards(ng-if='main && list.type=="reward" && (user.items.special.snowball>0 || user.stats.buffs.snowball || user.items.special.spookDust>0 || user.stats.buffs.spookDust)')
|
2014-02-14 00:57:00 +00:00
|
|
|
|
|
2014-10-03 01:17:26 +00:00
|
|
|
|
mixin specialSpell(k,canceler)
|
|
|
|
|
|
li.task.reward-item(ng-if='#{canceler ? "user.stats.buffs."+canceler : "user.items.special."+k+">0"}',popover-trigger='mouseenter', popover-placement='top', popover='{{Content.spells.special.#{k}.notes()}}')
|
|
|
|
|
|
.task-meta-controls
|
|
|
|
|
|
span.task-notes
|
|
|
|
|
|
span.glyphicon.glyphicon-comment
|
|
|
|
|
|
//left-hand size commands
|
|
|
|
|
|
.task-controls
|
|
|
|
|
|
a.money.btn-buy.item-btn(ng-click='castStart(Content.spells.special.#{k})')
|
|
|
|
|
|
if canceler
|
|
|
|
|
|
span.reward-cost {{Content.spells.special.#{k}.value}}
|
|
|
|
|
|
span.shop_gold
|
|
|
|
|
|
else
|
|
|
|
|
|
span.reward-cost {{user.items.special.#{k}}}
|
|
|
|
|
|
span(class='shop_#{k}',style='display:inline-block;vertical-align:top;')
|
|
|
|
|
|
// main content
|
|
|
|
|
|
p.task-text {{Content.spells.special.#{k}.text()}}
|
2014-02-14 00:57:00 +00:00
|
|
|
|
|
2014-10-03 01:17:26 +00:00
|
|
|
|
+specialSpell('snowball')
|
|
|
|
|
|
+specialSpell('spookDust')
|
|
|
|
|
|
|
|
|
|
|
|
+specialSpell('salt','snowball')
|
|
|
|
|
|
+specialSpell('opaquePotion','spookDust')
|
2013-12-20 17:25:23 +00:00
|
|
|
|
|
2014-02-04 20:27:05 +00:00
|
|
|
|
// Spells
|
|
|
|
|
|
ul.items(ng-if='main && list.type=="reward" && user.stats.class && !user.preferences.disableClasses')
|
2014-03-10 14:26:05 +00:00
|
|
|
|
li.task.reward-item(ng-repeat='(k,spell) in Content.spells[user.stats.class]', ng-if='user.stats.lvl >= spell.lvl',popover-trigger='mouseenter', popover-placement='top', popover='{{spell.notes()}}')
|
2014-02-04 20:27:05 +00:00
|
|
|
|
.task-meta-controls
|
|
|
|
|
|
span.task-notes
|
|
|
|
|
|
span.glyphicon.glyphicon-comment
|
|
|
|
|
|
//left-hand size commands
|
2014-06-14 12:31:12 +00:00
|
|
|
|
.task-controls.task-primary
|
2014-02-04 20:27:05 +00:00
|
|
|
|
a.money.btn-buy.item-btn(ng-click='castStart(spell)')
|
|
|
|
|
|
span.reward-cost
|
|
|
|
|
|
strong {{spell.mana}}
|
|
|
|
|
|
=env.t('mp')
|
|
|
|
|
|
// main content
|
|
|
|
|
|
span(ng-class='{"shop_{{spell.key}} shop-sprite item-img": true}')
|
2014-03-10 14:26:05 +00:00
|
|
|
|
p.task-text {{spell.text()}}
|
2013-11-16 10:22:12 +00:00
|
|
|
|
|
2014-02-04 20:27:05 +00:00
|
|
|
|
br
|
2013-08-25 14:57:19 +00:00
|
|
|
|
|
2014-02-04 20:27:05 +00:00
|
|
|
|
// Ads
|
|
|
|
|
|
div(bo-if='main && !user.purchased.ads && !user.purchased.plan.customerId && list.type!="reward"')
|
|
|
|
|
|
span.pull-right
|
|
|
|
|
|
a(ui-sref='options.settings.subscription', popover=env.t('removeAds'), popover-trigger='mouseenter')
|
|
|
|
|
|
span.glyphicon.glyphicon-remove
|
|
|
|
|
|
// Habit3
|
|
|
|
|
|
ins.adsbygoogle(ng-init='initAds()', style='display: inline-block; width: 234px; height: 60px;', data-ad-client='ca-pub-3242350243827794', data-ad-slot='9529624576')
|
2013-08-25 14:57:19 +00:00
|
|
|
|
|
2014-10-19 05:03:24 +00:00
|
|
|
|
+taskColumnTabs('bottom')
|