summaryrefslogtreecommitdiff
path: root/kpov_judge/web
diff options
context:
space:
mode:
Diffstat (limited to 'kpov_judge/web')
-rw-r--r--kpov_judge/web/kpov_judge/templates/params.html24
-rw-r--r--kpov_judge/web/kpov_judge/templates/results.html15
-rw-r--r--kpov_judge/web/kpov_judge/templates/task_greeting.html41
3 files changed, 80 insertions, 0 deletions
diff --git a/kpov_judge/web/kpov_judge/templates/params.html b/kpov_judge/web/kpov_judge/templates/params.html
new file mode 100644
index 0000000..e6d631d
--- /dev/null
+++ b/kpov_judge/web/kpov_judge/templates/params.html
@@ -0,0 +1,24 @@
+<html>
+<head>
+<link rel="stylesheet" href="/static/style.css">
+</head>
+<body>
+<h1>
+{{task_id}}
+</h1>
+<div>
+<h2>Parametri</h2>
+<form action="" method="post">
+{% for k, v in params.iteritems() %}
+<div><span class="hover">{{k}}: <div class="tooltip">{{params_meta[k]['descriptions']['si']}}</div></span>
+{% if params_meta[k]["w"] %}
+<input type=text name="{{k}}" value="{{v}}" />
+{% else %}
+{{v}}
+{% endif %}</div>
+{% endfor %}
+<p><input type=submit value="Submit"/></p>
+</form>
+</div>
+</body>
+</html>
diff --git a/kpov_judge/web/kpov_judge/templates/results.html b/kpov_judge/web/kpov_judge/templates/results.html
new file mode 100644
index 0000000..e944d38
--- /dev/null
+++ b/kpov_judge/web/kpov_judge/templates/results.html
@@ -0,0 +1,15 @@
+<html>
+<body>
+<h1>
+{{task_id}}
+</h1>
+<p>
+<h2>Rezultati</h2>
+<ul>
+{% for k, v in results.iteritems() %}
+<li>{{k}}: {{v}}</li>
+{% endfor %}
+</ul>
+</p>
+</body>
+</html>
diff --git a/kpov_judge/web/kpov_judge/templates/task_greeting.html b/kpov_judge/web/kpov_judge/templates/task_greeting.html
new file mode 100644
index 0000000..50d0ec2
--- /dev/null
+++ b/kpov_judge/web/kpov_judge/templates/task_greeting.html
@@ -0,0 +1,41 @@
+<html>
+<body>
+<h1>
+{{task_id}}
+</h1>
+<h2>Navodila</h2>
+<pre>
+{{instructions}}
+</pre>
+<p>
+<h2>Računalniki v vaji</h2>
+{% for c in computers %}
+ <h3>{{c['name']}}</h3>
+ {% if 'disk_urls' in c %}
+ <ul>
+ {% for u in c['disk_urls'] %}
+ <li><a href={{u['url']}}>{{u['name']}}</a></li>
+ {% endfor %}
+ </ul>
+ {% else %}
+ Slike navideznih diskov so v izdelavi in bodo kmalu na voljo.
+ {% endif %}
+{% endfor %}
+</p>
+<p>
+Lahko si ogledate surove:
+<ul>
+<li><a href='../results.html'>rezultate</a> (<a href='../results.json'>json</a>)</li>
+<li><a href='../params.html'>parametre</a> (<a href='../params.json'>json</a>)</li>
+<li><a href='../params_meta.html'>opise parametrov</a> (<a href='../params_meta.json'>json</a>)</li>
+<li><a href='../task.html'>preverjalni program</a> (<a href='../task.py'>source</a>)</li>
+</ul>
+</p>
+<p>
+{% if openstack %}
+Openstack projekt za to vajo je že ustvarjen ali v izdelavi (funkcionalnost še ne deluje).
+{% else %}
+<a href='?narediStack=true'>Ustvari</a> Openstack projekt za to vajo (funkcionalnost še ne deluje).
+{% endif %}
+</body>
+</html>