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")
|
2013-08-28 22:11:00 +00:00
|
|
|
|
.grid
|
2013-11-22 22:40:44 +00:00
|
|
|
|
.module(bindonce='lists', ng-repeat='list in lists', bo-class='{"rewards-module": list.type==="reward"}')
|
2013-08-28 22:11:00 +00:00
|
|
|
|
.task-column(class='{{list.type}}s')
|
2013-08-25 14:57:19 +00:00
|
|
|
|
|
2013-08-28 22:11:00 +00:00
|
|
|
|
// Todos export/graph options
|
2013-11-22 23:16:24 +00:00
|
|
|
|
span.option-box.pull-right(bo-if='main && list.type=="todo"')
|
2014-01-06 19:36:33 +00:00
|
|
|
|
a.option-action(ng-show='obj.history.todos', ng-click='toggleChart("todos")', tooltip=env.t('progress'))
|
2014-01-31 18:47:48 +00:00
|
|
|
|
span.glyphicon.glyphicon-signal
|
2013-11-23 17:26:39 +00:00
|
|
|
|
//a.option-action(ng-href='/v1/users/{{user.id}}/calendar.ics?apiToken={{user.apiToken}}', tooltip='iCal')
|
2013-10-19 23:15:48 +00:00
|
|
|
|
a.option-action(ng-click='notPorted()', tooltip='iCal', ng-show='false')
|
2014-01-31 18:47:48 +00:00
|
|
|
|
span.glyphicon.glyphicon-calendar
|
2013-08-28 22:11:00 +00:00
|
|
|
|
// <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
|
|
|
|
|
2013-08-28 22:11:00 +00:00
|
|
|
|
// Gold & Gems
|
2013-11-22 23:16:24 +00:00
|
|
|
|
span.option-box.pull-right.wallet(bo-if='main && list.type=="reward"')
|
2013-08-28 22:11:00 +00:00
|
|
|
|
.money
|
2013-12-11 16:30:39 +00:00
|
|
|
|
| {{Shared.gold(user.stats.gp)}}
|
2014-01-06 19:36:33 +00:00
|
|
|
|
span.shop_gold(tooltip=env.t('gold'))
|
2013-08-28 22:11:00 +00:00
|
|
|
|
.money
|
2013-12-11 16:30:39 +00:00
|
|
|
|
| {{Shared.silver(user.stats.gp)}}
|
2014-01-06 19:36:33 +00:00
|
|
|
|
span.shop_silver(tooltip=env.t('silver'))
|
2013-08-25 14:57:19 +00:00
|
|
|
|
|
2013-08-28 22:11:00 +00:00
|
|
|
|
// Header
|
|
|
|
|
|
h2.task-column_title {{list.header}}
|
2013-08-25 14:57:19 +00:00
|
|
|
|
|
2013-08-28 22:11:00 +00:00
|
|
|
|
// Todo Chart
|
2013-11-22 23:16:24 +00:00
|
|
|
|
.todos-chart(bo-if='list.type == "todo"', ng-show='charts.todos')
|
2013-08-25 14:57:19 +00:00
|
|
|
|
|
2013-08-28 22:11:00 +00:00
|
|
|
|
// Add New
|
2013-10-30 02:07:39 +00:00
|
|
|
|
form.addtask-form.form-inline.new-task-form(name='new{{list.type}}form', ng-hide='obj._locked || (list.showCompleted && list.type=="todo")', ng-submit='addTask(obj[list.type+"s"],list)')
|
2013-08-28 22:11:00 +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
|
|
|
|
|
2013-08-28 22:11:00 +00:00
|
|
|
|
// Actual List
|
2013-12-17 20:47:44 +00:00
|
|
|
|
ul(class='{{list.type}}s main-list', ng-show='obj[list.type + "s"].length > 0', habitrpg-sortable)
|
2013-08-28 22:11:00 +00:00
|
|
|
|
include ./task
|
2013-08-25 14:57:19 +00:00
|
|
|
|
|
2013-08-28 22:11:00 +00:00
|
|
|
|
// Static Rewards
|
2013-12-13 02:29:20 +00:00
|
|
|
|
ul.items.rewards(ng-if='main && list.type=="reward" && user.flags.itemsEnabled')
|
2014-01-07 04:54:01 +00:00
|
|
|
|
li.task.reward-item(ng-repeat='item in itemStore',popover-trigger='mouseenter', popover-placement='top', popover='{{item.notes}}')
|
2013-08-28 22:11:00 +00:00
|
|
|
|
// right-hand side control buttons
|
|
|
|
|
|
.task-meta-controls
|
2014-01-06 19:47:16 +00:00
|
|
|
|
span.task-notes
|
2014-01-31 18:47:48 +00:00
|
|
|
|
span.glyphicon.glyphicon-comment
|
2013-08-28 22:11:00 +00:00
|
|
|
|
//left-hand size commands
|
|
|
|
|
|
.task-controls
|
2013-12-09 02:04:18 +00:00
|
|
|
|
a.money.btn-buy.item-btn(ng-click='buy(item)')
|
2013-08-28 22:11:00 +00:00
|
|
|
|
span.reward-cost {{item.value}}
|
|
|
|
|
|
span.shop_gold
|
|
|
|
|
|
// main content
|
2013-12-02 02:51:36 +00:00
|
|
|
|
span(bo-class='{"shop_{{item.key}} shop-sprite item-img": true}')
|
2013-08-28 22:11:00 +00:00
|
|
|
|
p.task-text {{item.text}}
|
2013-08-25 14:57:19 +00:00
|
|
|
|
|
2013-12-21 01:35:50 +00:00
|
|
|
|
// Winter Event
|
|
|
|
|
|
ul.items.rewards(ng-if='main && list.type=="reward" && (user.items.special.snowball>0 || user.stats.buffs.snowball)')
|
2013-12-30 00:34:21 +00:00
|
|
|
|
li.task.reward-item(ng-if='user.items.special.snowball>0',popover-trigger='mouseenter', popover-placement='top', popover='{{Content.spells.special.snowball.notes}}')
|
2013-12-20 17:25:23 +00:00
|
|
|
|
.task-meta-controls
|
2013-12-30 00:34:21 +00:00
|
|
|
|
span.task-notes
|
2014-01-31 18:47:48 +00:00
|
|
|
|
span.glyphicon.glyphicon-comment
|
2013-12-20 17:25:23 +00:00
|
|
|
|
//left-hand size commands
|
|
|
|
|
|
.task-controls
|
|
|
|
|
|
a.money.btn-buy.item-btn(ng-click='castStart(Content.spells.special.snowball)')
|
2013-12-21 01:35:50 +00:00
|
|
|
|
span.reward-cost {{user.items.special.snowball}}
|
|
|
|
|
|
span.shop_snowball(style='display:inline-block;vertical-align:top;')
|
2013-12-20 17:25:23 +00:00
|
|
|
|
// main content
|
|
|
|
|
|
p.task-text {{Content.spells.special.snowball.text}}
|
2013-12-30 00:34:21 +00:00
|
|
|
|
li.task.reward-item(ng-if='user.stats.buffs.snowball',popover-trigger='mouseenter', popover-placement='top', popover='{{Content.spells.special.salt.notes}}')
|
2013-12-21 01:35:50 +00:00
|
|
|
|
.task-meta-controls
|
2013-12-30 00:34:21 +00:00
|
|
|
|
span.task-notes
|
2014-01-31 18:47:48 +00:00
|
|
|
|
span.glyphicon.glyphicon-comment
|
2013-12-21 01:35:50 +00:00
|
|
|
|
//left-hand size commands
|
|
|
|
|
|
.task-controls
|
|
|
|
|
|
a.money.btn-buy.item-btn(ng-click='castStart(Content.spells.special.salt)')
|
|
|
|
|
|
span.reward-cost {{Content.spells.special.salt.value}}
|
|
|
|
|
|
span.shop_gold
|
|
|
|
|
|
// main content
|
|
|
|
|
|
span.shop_salt.shop-sprite.item-img
|
|
|
|
|
|
p.task-text {{Content.spells.special.salt.text}}
|
2013-12-20 17:25:23 +00:00
|
|
|
|
|
2013-11-16 10:22:12 +00:00
|
|
|
|
// Spells
|
2013-12-17 23:44:46 +00:00
|
|
|
|
ul.items(ng-if='main && list.type=="reward" && user.stats.class && !user.preferences.disableClasses')
|
2013-12-30 00:34:21 +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}}')
|
2013-11-16 10:22:12 +00:00
|
|
|
|
.task-meta-controls
|
2013-12-30 00:34:21 +00:00
|
|
|
|
span.task-notes
|
2014-01-31 18:47:48 +00:00
|
|
|
|
span.glyphicon.glyphicon-comment
|
2013-11-16 10:22:12 +00:00
|
|
|
|
//left-hand size commands
|
|
|
|
|
|
.task-controls
|
|
|
|
|
|
a.money.btn-buy.item-btn(ng-click='castStart(spell)')
|
|
|
|
|
|
span.reward-cost
|
|
|
|
|
|
strong {{spell.mana}}
|
2014-01-06 19:36:33 +00:00
|
|
|
|
=env.t('mp')
|
2013-11-16 10:22:12 +00:00
|
|
|
|
// main content
|
2013-11-30 21:55:39 +00:00
|
|
|
|
span(ng-class='{"shop_{{spell.key}} shop-sprite item-img": true}')
|
2013-11-16 10:22:12 +00:00
|
|
|
|
p.task-text {{spell.text}}
|
|
|
|
|
|
|
2013-08-28 22:11:00 +00:00
|
|
|
|
br
|
2013-08-25 14:57:19 +00:00
|
|
|
|
|
2013-10-27 00:23:52 +00:00
|
|
|
|
// Ads
|
2014-01-28 00:34:22 +00:00
|
|
|
|
div(bo-if='main && !user.purchased.ads && !user.purchased.plan.customerId && list.type!="reward"')
|
2013-10-27 00:23:52 +00:00
|
|
|
|
span.pull-right
|
2014-01-28 00:34:22 +00:00
|
|
|
|
a(ui-sref='options.settings.subscription', popover=env.t('removeAds'), popover-trigger='mouseenter')
|
2014-01-31 18:47:48 +00:00
|
|
|
|
span.glyphicon.glyphicon-remove
|
2013-10-27 00:23:52 +00:00
|
|
|
|
// 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
|
|
|
|
|
2013-08-28 22:11:00 +00:00
|
|
|
|
// Todo Tabs
|
2013-11-22 22:40:44 +00:00
|
|
|
|
div(bo-if='main && list.type=="todo"', bo-class='{"tabbable tabs-below": list.type=="todo"}')
|
2014-01-15 00:29:05 +00:00
|
|
|
|
div(ng-show='list.showCompleted')
|
|
|
|
|
|
.alert
|
|
|
|
|
|
=env.t('lotOfToDos')
|
|
|
|
|
|
button.task-action-btn.tile.spacious.bright(ng-click='user.ops.clearCompleted({})')=env.t('clearCompleted')
|
2013-08-28 22:11:00 +00:00
|
|
|
|
// remaining/completed tabs
|
|
|
|
|
|
ul.nav.nav-tabs
|
|
|
|
|
|
li(ng-class='{active: !list.showCompleted}')
|
2014-01-06 19:36:33 +00:00
|
|
|
|
a(ng-click='list.showCompleted = false')=env.t('remaining')
|
2013-08-28 22:11:00 +00:00
|
|
|
|
li(ng-class='{active: list.showCompleted}')
|
2014-01-06 19:36:33 +00:00
|
|
|
|
a(ng-click='list.showCompleted= true')=env.t('complete')
|