Implemented item attack summaries

This commit is contained in:
Thaum
2015-04-16 11:52:17 +00:00
parent 7cd353894c
commit e6487c9416
9 changed files with 49 additions and 18 deletions

View File

@@ -0,0 +1,17 @@
<template name="attackView">
<div class="attackView" layout horizontal>
<div class="headline rightPadded" layout horizontal center>
{{evaluateSigned charId attackBonus}}
</div>
<div layout vertical>
<div>
{{damageDice}}&nbsp;{{{evaluateSignedSpaced charId damageBonus}}}&nbsp;{{damageType}}
</div>
{{#if details}}
<div class="caption">
{{details}}
</div>
{{/if}}
</div>
</div>
</template>

View File

@@ -1,3 +1,11 @@
<template name="attacksViewList">
Attacks view list goes here
{{#if attacks.count}}
<hr style="margin: 16px 0 16px 0;">
<div class="attacks">
<h2 class="spaceAfter">Attacks</h2>
{{#each attacks}}
{{> attackView}}
{{/each}}
</div>
{{/if}}
</template>

View File

@@ -0,0 +1,5 @@
Template.attacksViewList.helpers({
attacks: function(){
return Attacks.find({"parent.id": this.parentId, charId: this.charId});
}
});