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;
|
||||
},
|
||||
pluralName: function(){
|
||||
if(this.plural && this.quantity > 1){
|
||||
if(this.plural && this.quantity !== 1){
|
||||
return this.plural;
|
||||
} else{
|
||||
return this.name;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<div class="detailContent">
|
||||
<!--Name and plural name-->
|
||||
<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-->
|
||||
{{# if canEquip}}
|
||||
<div center horizontal layout>
|
||||
|
||||
@@ -116,5 +116,8 @@ Template.itemDialog.helpers({
|
||||
},
|
||||
canEquip: function(){
|
||||
return this.equipmentSlot !== "none";
|
||||
},
|
||||
ne1: function(num){
|
||||
return num != 1;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user