blockchain/templates_eth/rentsDo.html
2020-08-06 15:15:48 -04:00

66 lines
2.1 KiB
HTML

{{define "title"}}
Rent
{{end}}
{{define "content"}}
{{ if .Error }}
<div class="jumbotron">
<p>{{ .Error }}</p>
</div>
{{ else }}
{{ if (eq .Block.Owner .User.AddressHex )}}
<div class="jumbotron">
<div class="col-10 mx-auto">
<form method="POST" action="/blockchain/rents/do/{{ .Block.Id }}">
<div class="form-group">
<input type="number" class="form-control" name="days" placeholder="Days">
</div>
<div class="form-group">
<input type="number" class="form-control" name="price" placeholder="Price">
</div>
<input type="submit" class="btn btn-success w-100" name="submit" value="Do rent">
</form>
</div>
</div>
{{ end }}
<table border="1">
<tr>
<th>Id</th>
<td width="100%">{{ .Block.Id }}</td>
</tr>
<tr>
<th>Owner</th>
<td width="100%">{{ .Block.Owner }}</td>
</tr>
<tr>
<th>Info</th>
<td width="100%">{{ .Block.Info }}</td>
</tr>
<tr>
<th>Squere</th>
<td width="100%">{{ .Block.Squere }}</td>
</tr>
<tr>
<th>UsefulSquere</th>
<td width="100%">{{ .Block.UsefulSquere }}</td>
</tr>
<tr>
<th>RenterAddress</th>
<td width="100%">{{ .Block.RenterAddress }}</td>
</tr>
<tr>
<th>PresentStatus</th>
<td width="100%">{{ .Block.PresentStatus }}</td>
</tr>
<tr>
<th>SaleStatus</th>
<td width="100%">{{ .Block.SaleStatus }}</td>
</tr>
<tr>
<th>RentStatus</th>
<td width="100%">{{ .Block.RentStatus }}</td>
</tr>
</table>
{{ end }}
{{end}}