habitica/website/views/options/inventory/quests.jade

41 lines
2.8 KiB
Text
Raw Normal View History

// Created by Sabe on 7/6/2015.
script(type='text/ng-template', id='partials/options.inventory.quests.html')
.container-fluid
.row
.col-md-2
.npc_ian
.col-md-10
.popover.static-popover.fade.right.in
.arrow
h3.popover-title=env.t('ian')
.popover-content
p.muted!=env.t('scrollsText1') + ' <a href="/#/options/groups/party">' + env.t('scrollsText2') + '</a>.'
.row
- var questCategories = {'unlockable':'unlockableQuests','pet':'petQuests','gold':'goldQuests'}
.col-md-6
h3.equipment-title=env.t('yourQuests')
menu.inventory-list
li.customize-menu
p.muted(ng-show='questCount < 1')=env.t('noScrolls')
each caption,type in questCategories
menu.pets-menu(label=env.t(caption))
div(ng-repeat='(quest_key,points) in ownedItems(user.items.quests)', ng-init='quest = Content.quests[quest_key]', ng-if='Content.quests[quest_key].category === "#{type}"')
button.customize-option(data-popover-html="{{::lockQuest(quest) ? env.t('scrollsPre') : questPopover(quest) | markdown}}", popover-title='{{::quest.text()}}', popover-trigger='mouseenter', popover-placement='right', popover-append-to-body='true', ng-click='showQuest(quest_key)', ng-class='lockQuest(quest) ? "inventory_quest_scroll_locked inventory_quest_scroll_{{::quest.key}}_locked locked" : "inventory_quest_scroll inventory_quest_scroll_{{::quest.key}}"')
.badge.badge-info.stack-count {{points}}
.col-md-6.border-left
li.customize-menu
h3.equipment-title=env.t('questsForSale')
each caption,type in questCategories
menu.pets-menu(label=env.t(caption))
div(ng-repeat='quest in Content.questsByLevel', ng-if='quest.canBuy && quest.category === "#{type}"')
button.customize-option(data-popover-html="{{::lockQuest(quest,true) ? env.t('scrollsPre') : questPopover(quest) | markdown}}", popover-title='{{::quest.text()}}', popover-append-to-body="true", popover-trigger='mouseenter', ng-click='buyQuest(quest.key)', ng-class='lockQuest(quest) ? "inventory_quest_scroll_locked inventory_quest_scroll_{{::quest.key}}_locked locked" : "inventory_quest_scroll inventory_quest_scroll_{{::quest.key}}"')
p(ng-if='quest.unlockCondition')
| {{::quest.unlockCondition.text()}}
p(ng-if='quest.value && quest.category !== "gold" && !lockQuest(quest)')
| {{::quest.value}}&nbsp;
span.Pet_Currency_Gem1x.inline-gems
p(ng-if='quest.value && quest.category === "gold" && !lockQuest(quest)')
| {{::quest.value}}&nbsp;
span.shop_gold
p(ng-if='quest.lvl && lockQuest(quest)')=env.t('level')
| {{::quest.lvl}}