Implemented Effect View for skills
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
<!--needs to be given charId, sourceId and type-->
|
||||
<template name="effectsViewList">
|
||||
{{#if effects}}
|
||||
<hr style="margin: 16px 0 16px 0;">
|
||||
<div id="effects">
|
||||
<h2>Effects</h2>
|
||||
{{#each effects}}
|
||||
{{>effectView}}
|
||||
{{/each}}
|
||||
</div>
|
||||
{{/if}}
|
||||
</template>
|
||||
@@ -0,0 +1,10 @@
|
||||
Template.effectsViewList.helpers({
|
||||
effects: function(){
|
||||
if(this.sourceId){
|
||||
return Effects.find({sourceId: this.sourceId, type: this.type, charId: this.charId}, {fields: {sourceId: 0}});
|
||||
} else if(this.stat){
|
||||
return Effects.find({charId: this.charId, stat: this.stat});
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user