Equipment ordered by color, name
This commit is contained in:
@@ -30,11 +30,6 @@
|
|||||||
<div class="caption">{{round equipmentWeight}}lbs</div>
|
<div class="caption">{{round equipmentWeight}}lbs</div>
|
||||||
</div>
|
</div>
|
||||||
<div flex class="equipmentMain">
|
<div flex class="equipmentMain">
|
||||||
{{#if armor}}
|
|
||||||
{{#with armor}}
|
|
||||||
{{>inventoryItem}}
|
|
||||||
{{/with}}
|
|
||||||
{{/if}}
|
|
||||||
{{#each equipment}}
|
{{#each equipment}}
|
||||||
{{>inventoryItem}}
|
{{>inventoryItem}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
|
|||||||
@@ -7,13 +7,10 @@ Template.inventory.helpers({
|
|||||||
return Containers.find({charId: this._id}, {sort: {color: 1, name: 1}})
|
return Containers.find({charId: this._id}, {sort: {color: 1, name: 1}})
|
||||||
},
|
},
|
||||||
items: function(charId, containerId){
|
items: function(charId, containerId){
|
||||||
return Items.find({charId: charId, equipped: false, container: containerId }, {sort: {color: 1, name: 1}})
|
return Items.find({charId: charId, equipped: false, container: containerId }, {sort: {color: 1, name: 1}});
|
||||||
},
|
|
||||||
armor: function(){
|
|
||||||
return Items.findOne({ charId: this._id, equipped: true, equipmentSlot: "armor" })
|
|
||||||
},
|
},
|
||||||
equipment: function(){
|
equipment: function(){
|
||||||
return Items.find({ charId: this._id, equipped: true, equipmentSlot: {$ne: "armor"} })
|
return Items.find({ charId: this._id, equipped: true }, {sort: {color: 1, name: 1}});
|
||||||
},
|
},
|
||||||
showAddButtons: function(){
|
showAddButtons: function(){
|
||||||
return Template.instance().showAddButtons.get();
|
return Template.instance().showAddButtons.get();
|
||||||
|
|||||||
Reference in New Issue
Block a user