diff options
Diffstat (limited to 'views/http/village.twig')
-rw-r--r-- | views/http/village.twig | 72 |
1 files changed, 67 insertions, 5 deletions
diff --git a/views/http/village.twig b/views/http/village.twig index c157a04..a498ea6 100644 --- a/views/http/village.twig +++ b/views/http/village.twig @@ -132,7 +132,7 @@ {% endif %} {% if events['SendUnits'] %} - <h4>Send Resources / Units</h4> + <h4>Send Units</h4> <table> <thead> <tr> @@ -172,6 +172,68 @@ </tbody> </table> {% endif %} + + {% if events['SendResources'] %} + <h4>Send Resources</h4> + <table> + <thead> + <tr> + <th>Source</th> + <th>Destination</th> + <th>Resources</th> + <th>Time</th> + <th></th> + </tr> + </thead> + <tbody> + {% for event in events['SendResources'] %} + <tr> + <td>{{ village.get(event.source).name }}</td> + <td>{{ village.get(event.destination).name }}</td> + <td>Resources</td> + <td class="timer"> + {% include 'components/timer.twig' with { 'time': event.event.time|date('c') } %} + </td> + <td> + {% if event.isCanceled %} + Canceled + {% else %} + {% if event.event.villageId == village.id %} + <form action="/event/{{ event.event.id }}/cancel" method="post"> + <input type="submit" value="Cancel"> + </form> + {% endif %} + {% endif %} + </td> + </tr> + {% endfor %} + </tbody> + </table> + {% endif %} + + {% if events['SendResourcesCarriers'] %} + <h4>Send Resources Carriers</h4> + <table> + <thead> + <tr> + <th>Source</th> + <th>Destination</th> + <th>Time</th> + </tr> + </thead> + <tbody> + {% for event in events['SendResourcesCarriers'] %} + <tr> + <td>{{ village.get(event.source).name }}</td> + <td>{{ village.get(event.destination).name }}</td> + <td class="timer"> + {% include 'components/timer.twig' with { 'time': event.event.time|date('c') } %} + </td> + </tr> + {% endfor %} + </tbody> + </table> + {% endif %} </div> <div class="village__main"> @@ -344,10 +406,10 @@ {% if village.getBuilding(village.id, 'PostOffice') %} <h3>Send Resources</h3> <form action="/village/{{ village.x }}/{{ village.y }}/send-resources" method="post"> - <input type="number" min="1" name="wood" placeholder="Amount Wood" required> - <input type="number" min="1" name="clay" placeholder="Amount Clay" required> - <input type="number" min="1" name="iron" placeholder="Amount Iron" required> - <input type="number" min="1" name="food" placeholder="Amount Food" required> + <input type="number" min="0" name="wood" placeholder="Amount Wood" required> + <input type="number" min="0" name="clay" placeholder="Amount Clay" required> + <input type="number" min="0" name="iron" placeholder="Amount Iron" required> + <input type="number" min="0" name="food" placeholder="Amount Food" required> <select name="village"> {% for v in villages %} <option value="{{ v.id }}">{{ v.name }}</option> |