Skip to content

Commit

Permalink
Merge pull request etoa#213 from etoa/f/quest-system
Browse files Browse the repository at this point in the history
Quests: fix template rendering in twig
  • Loading branch information
glaubinix authored Apr 13, 2020
2 parents 711b0ea + 2b37a79 commit fff8f96
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions templates/layout/chunks/quests.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,30 @@
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<div id="quest-app">
<div class="tutorialBox" v-if="open">
<div class="tutorialTitle">Quests ({{quests.length}})
<div class="tutorialTitle">Quests (${ quests.length })
<span style="float:right;">
<input type="button" value="Min" title="Minimieren" v-on:click="hide" />
</span><br style="clear:both;">
</div>
<div v-for="quest in quests">
<div class="tutorialContent">
<h3>{{quest.title}}</h3>
<div>{{quest.description}}</div>
<h3>${quest.title}</h3>
<div>${quest.description}</div>

<h5>Aufgaben</h5>
<p>
{{quest.taskDescription}}
${quest.taskDescription}
<span v-if="quest.state==='available'">
:
<span v-for="progress in quest.taskProgress">
{{progress.progress}}/{{progress.maxProgress}}
${progress.progress}/${progress.maxProgress}
</span>
</span>
</p>
<h5>Belohnung</h5>
<div v-if="quest.rewards.length">
<div v-for="reward in quest.rewards">
<p>{{reward}}</p>
<p>${reward}</p>
</div>
</div>
<div v-else>
Expand All @@ -45,6 +45,7 @@
<script>
var questApp = new Vue({
el: '#quest-app',
delimiters: ['${', '}'],
data: {
activeRequest: false,
quests: {{ quests|json_encode|raw }},
Expand Down

0 comments on commit fff8f96

Please sign in to comment.