47 lines
1.6 KiB
HTML
47 lines
1.6 KiB
HTML
<template name="containerDialog">
|
|
{{#with container}}
|
|
{{#baseDialog title=name class=colorClass startEditing=../startEditing}}
|
|
{{> containerView}}
|
|
{{else}}
|
|
{{> containerEdit}}
|
|
{{/baseDialog}}
|
|
{{/with}}
|
|
</template>
|
|
|
|
<template name="containerEdit">
|
|
<paper-input id="containerNameInput"
|
|
label="Name"
|
|
floatinglabel
|
|
value={{name}}></paper-input>
|
|
<div layout horizontal around-justified wrap>
|
|
<paper-input-decorator label="Weight" floatinglabel>
|
|
<input id="weightInput" type="number" value={{weight}}>
|
|
</paper-input-decorator>
|
|
<paper-input-decorator label="Value" floatinglabel>
|
|
<input id="valueInput" type="number" value={{value}}>
|
|
</paper-input-decorator>
|
|
</div>
|
|
|
|
<hr class="vertMargin">
|
|
|
|
<paper-input-decorator label="Description" floatinglabel layout vertical>
|
|
<paper-autogrow-textarea>
|
|
<textarea id="containerDescriptionInput" placeholder aria-label="Description" value={{description}}></textarea>
|
|
</paper-autogrow-textarea>
|
|
</paper-input-decorator>
|
|
</template>
|
|
|
|
<template name="containerView">
|
|
<div layout horizontal wrap center justified>
|
|
<table class="summaryTable fullwidth">
|
|
<tr><td>Container</td><td>{{round weight}}lbs</td><td>{{longValueString value}}</td></tr>
|
|
<tr><td>Contents</td><td>{{round contentsWeight}}lbs</td><td>{{longValueString contentsValue}}</td></tr>
|
|
<tr class="body2"><td>Total</td><td>{{round totalWeight}}lbs</td><td>{{longValueString totalValue}}</td></tr>
|
|
</table>
|
|
</div>
|
|
{{#if description}}
|
|
<hr class="vertMargin">
|
|
<div class="pre-wrap">{{evaluateString charId description}}</div>
|
|
{{/if}}
|
|
</template>
|