mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-21 19:24:15 +00:00
56 lines
2.3 KiB
Text
56 lines
2.3 KiB
Text
// 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
|
|
|
|
include ./task_view/mixins
|
|
script(id='templates/habitrpg-tasks.html', type="text/ng-template")
|
|
.tasks-lists.container-fluid
|
|
.row
|
|
.col-sm-6.col-md-3(
|
|
ng-repeat='list in lists',
|
|
ng-init="groupedList = _.groupBy(obj[list.type + 's'], 'challenge.name')",
|
|
ng-class='::{ "rewards-module": list.type==="reward", "new-row-sm": list.type==="todo" }')
|
|
.task-column(class='{{::list.type}}s')
|
|
|
|
include ./task_view/graph
|
|
|
|
h2.task-column_title(class='{{::list.type}}-title') {{::list.header}}
|
|
|
|
include ./task_view/help
|
|
|
|
.todos-chart(ng-if='::list.type == "todo"', ng-show='charts.todos')
|
|
|
|
include ./task_view/add_new
|
|
|
|
alert.alert-warning.dailiesRestingInInn(ng-if='list.type == "daily" && user.preferences.sleep && !$state.includes("options.social.challenges")')
|
|
i.glyphicon.glyphicon-warning-sign
|
|
=env.t('dailiesRestingInInn')
|
|
|
|
button.btn-block.btn.btn-lg.btn-success(ng-click='User.sleep({})')
|
|
| {{env.t('innCheckOut')}}
|
|
|
|
+taskColumnTabs('top')
|
|
|
|
// Actual List
|
|
ul(class='{{::list.type}}s main-list',
|
|
ng-init='taskList = obj[list.type+"s"]',
|
|
ng-show='obj[list.type + "s"].length > 0',
|
|
hrpg-sort-tasks, ng-if='!$state.includes("options.social.challenges") && !user.preferences.tasks.groupByChallenge')
|
|
include ./task
|
|
|
|
div(ng-repeat="(key, taskList) in groupedList", ng-if='user.preferences.tasks.groupByChallenge')
|
|
h3 {{key}}
|
|
ul(class='{{::list.type}}s main-list',
|
|
ng-show='taskList.length > 0', hrpg-sort-tasks,
|
|
ng-if='!$state.includes("options.social.challenges")')
|
|
include ./task
|
|
|
|
//Loads the non-sortable lists for challenges
|
|
ul(class='{{::list.type}}s main-list', ng-show='obj[list.type + "s"].length > 0', ng-if='$state.includes("options.social.challenges")')
|
|
include ./task
|
|
|
|
include ./task_view/static_rewards
|
|
|
|
include ./task_view/skills
|
|
|
|
+taskColumnTabs('bottom')
|