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-10-27 00:23:52 +00:00
|
|
|
|
.module(ng-repeat='list in lists', ng-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-10-27 00:23:52 +00:00
|
|
|
|
span.option-box.pull-right(ng-if='main && list.type=="todo"')
|
|
|
|
|
|
a.option-action(ng-show='obj.history.todos', ng-click='toggleChart("todos")', tooltip='Progress')
|
2013-08-28 22:11:00 +00:00
|
|
|
|
i.icon-signal
|
|
|
|
|
|
//-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')
|
2013-08-28 22:11:00 +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>
|
2013-08-25 14:57:19 +00:00
|
|
|
|
|
2013-08-28 22:11:00 +00:00
|
|
|
|
// Gold & Gems
|
2013-10-27 00:23:52 +00:00
|
|
|
|
span.option-box.pull-right.wallet(ng-if='main && list.type=="reward"')
|
2013-08-28 22:11:00 +00:00
|
|
|
|
.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
|
|
|
|
|
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-10-19 23:15:48 +00:00
|
|
|
|
.todos-chart(ng-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-27 21:44:50 +00:00
|
|
|
|
form.addtask-form.form-inline.new-task-form(name='new{{list.type}}form', ng-hide='locked || (list.showCompleted && list.type=="todo")', ng-submit='addTask(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-10-27 00:23:52 +00:00
|
|
|
|
ul(class='{{list.type}}s', 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-10-27 00:23:52 +00:00
|
|
|
|
ul.items(ng-show='main && list.type=="reward" && user.flags.itemsEnabled')
|
2013-08-28 22:11:00 +00:00
|
|
|
|
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
|
|
|
|
|
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
|
|
|
|
|
|
div(ng-if='main && !user.purchased.ads && list.type!="reward"')
|
|
|
|
|
|
span.pull-right
|
|
|
|
|
|
a(ng-click='modals.buyGems=true', tooltip='Remove Ads')
|
|
|
|
|
|
i.icon-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
|
|
|
|
|
2013-08-28 22:11:00 +00:00
|
|
|
|
// Todo Tabs
|
2013-10-27 00:23:52 +00:00
|
|
|
|
div(ng-if='main && list.type=="todo"', ng-class='{"tabbable tabs-below": list.type=="todo"}')
|
2013-08-29 02:51:45 +00:00
|
|
|
|
button.task-action-btn.tile.spacious.bright(ng-show='list.showCompleted', ng-click='clearCompleted()') Clear Completed
|
2013-08-28 22:11:00 +00:00
|
|
|
|
// 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}')
|
2013-10-27 00:23:52 +00:00
|
|
|
|
a(ng-click='list.showCompleted= true') Complete
|