Moved views out of private folder
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
<!--needs to be given charId, parentId and parentCollection-->
|
||||
<template name="attackEditList">
|
||||
{{#if attacks.count}}
|
||||
<hr style="margin: 16px 0 16px 0;">
|
||||
<div id="attacks">
|
||||
<h2>Attacks</h2>
|
||||
{{#each attacks}}
|
||||
{{>attackEdit}}
|
||||
{{/each}}
|
||||
</div>
|
||||
{{/if}}
|
||||
<paper-button id="addAttackButton" class="red-button" raised>Add Attack</paper-button>
|
||||
</template>
|
||||
@@ -0,0 +1,18 @@
|
||||
Template.attackEditList.helpers({
|
||||
attacks: function() {
|
||||
var cursor = Attacks.find({"parent.id": this.parentId, charId: this.charId});
|
||||
return cursor;
|
||||
}
|
||||
});
|
||||
|
||||
Template.attackEditList.events({
|
||||
"tap #addAttackButton": function() {
|
||||
Attacks.insert({
|
||||
charId: this.charId,
|
||||
parent: {
|
||||
id: this.parentId,
|
||||
collection: this.parentCollection
|
||||
}
|
||||
});
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user