41 lines
1.3 KiB
HTML
41 lines
1.3 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"
|
|
value={{name}}></paper-input>
|
|
<div class="layout horizontal around-justified wrap">
|
|
<paper-input id="weightInput" label="Weight" type="number" value={{weight}}>
|
|
</paper-input>
|
|
<paper-input id="valueInput" label="Value" type="number" value={{value}}>
|
|
</paper-input>
|
|
</div>
|
|
|
|
<hr class="vertMargin">
|
|
|
|
<paper-textarea label="Description" id="containerDescriptionInput" value={{description}}>
|
|
</paper-textarea>
|
|
</template>
|
|
|
|
<template name="containerView">
|
|
<div class="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="paper-font-body2"><td>Total</td><td>{{round totalWeight}} lbs</td><td>{{longValueString totalValue}}</td></tr>
|
|
</table>
|
|
</div>
|
|
{{#if description}}
|
|
<hr class="vertMargin">
|
|
<div>{{#markdown}}{{evaluateString charId description}}{{/markdown}}</div>
|
|
{{/if}}
|
|
</template>
|