From a4186ab0762833a4c4dd741e6dd112185efc2272 Mon Sep 17 00:00:00 2001 From: Fibinger Ádám <adam.fibinger@wup.hu> Date: Thu, 17 Oct 2019 16:51:42 +0200 Subject: [PATCH] History felület alapok és némi refaktor --- templates/admin/history.twig | 28 ++++++++++++++++++++++++++++ 1 files changed, 28 insertions(+), 0 deletions(-) diff --git a/templates/admin/history.twig b/templates/admin/history.twig new file mode 100644 index 0000000..387fabf --- /dev/null +++ b/templates/admin/history.twig @@ -0,0 +1,28 @@ +{% extends "admin/html-skeleton.twig" %} +{% block body %} + <form action="/generator/match-history.php" method="post"> + <select name="currentMap" id="currentMap" onchange="updateSites()"> + {% for map in history.getMapNames %} + <option value="{{ map }}" {{ history.getCurrentMap == map ? "selected" }}>{{ map }}</option> + {% endfor %} + </select> + <div class="form-group"> + <pre> + {% for round in history %} + {% include "admin/history-round.twig" %} + {% endfor %} + </pre> + </div> + </form> +{% endblock %} + +{% block lazyload %} + {{ parent() }} + <script type="text/javascript"> + var maps = {{ history.getMaps|json_encode|raw }} + function updateSites() { + var currentMap = document.getElementById('currentMap').value; + console.log(maps[currentMap]); + } + </script> +{% endblock %} \ No newline at end of file -- Gitblit v1.8.0