Item plural now shows whenever quantity is not 1
This commit is contained in:
@@ -27,7 +27,7 @@ Items.helpers({
|
|||||||
return this.weight * this.quantity;
|
return this.weight * this.quantity;
|
||||||
},
|
},
|
||||||
pluralName: function(){
|
pluralName: function(){
|
||||||
if(this.plural && this.quantity > 1){
|
if(this.plural && this.quantity !== 1){
|
||||||
return this.plural;
|
return this.plural;
|
||||||
} else{
|
} else{
|
||||||
return this.name;
|
return this.name;
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
<div class="detailContent">
|
<div class="detailContent">
|
||||||
<!--Name and plural name-->
|
<!--Name and plural name-->
|
||||||
<paper-input id="itemNameInput" label="Name" floatinglabel value={{name}}></paper-input>
|
<paper-input id="itemNameInput" label="Name" floatinglabel value={{name}}></paper-input>
|
||||||
{{# if quantity}}<paper-input id="itemPluralInput" label="Plural Name" floatinglabel value={{plural}}></paper-input>{{/if}}
|
{{# if ne1 quantity}}<paper-input id="itemPluralInput" label="Plural Name" floatinglabel value={{plural}}></paper-input>{{/if}}
|
||||||
<!--Equipped-->
|
<!--Equipped-->
|
||||||
{{# if canEquip}}
|
{{# if canEquip}}
|
||||||
<div center horizontal layout>
|
<div center horizontal layout>
|
||||||
|
|||||||
@@ -116,5 +116,8 @@ Template.itemDialog.helpers({
|
|||||||
},
|
},
|
||||||
canEquip: function(){
|
canEquip: function(){
|
||||||
return this.equipmentSlot !== "none";
|
return this.equipmentSlot !== "none";
|
||||||
|
},
|
||||||
|
ne1: function(num){
|
||||||
|
return num != 1;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
Reference in New Issue
Block a user