From e285cd53d0ddbca4b9fbe40dcbe7f88c1cd5e485 Mon Sep 17 00:00:00 2001 From: Ilmari Marttila Date: Tue, 17 Dec 2024 10:53:08 +0200 Subject: [PATCH 01/15] Use lowercase in form method name --- web/templates/tupa/maarita.html | 2 +- web/templates/tupa/maaritaValitseTehtava.html | 2 +- web/templates/tupa/maarita_riisuttu.html | 2 +- web/templates/tupa/poista_kisa.html | 2 +- web/templates/tupa/upload.html | 2 +- web/templates/tupa/upload_riisuttu.html | 2 +- web/templates/tupa/valitse_form.html | 2 +- web/templates/tupa/valitse_formset.html | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/web/templates/tupa/maarita.html b/web/templates/tupa/maarita.html index 8e399bf..0b2a20a 100644 --- a/web/templates/tupa/maarita.html +++ b/web/templates/tupa/maarita.html @@ -3,7 +3,7 @@ {% block content %} {% load kipatags %}

{{ heading|alaviiva_pois }}

-
+

{% include "tupa/tallenna.html" %}

{% if forms %} {% for form in forms %} diff --git a/web/templates/tupa/maaritaValitseTehtava.html b/web/templates/tupa/maaritaValitseTehtava.html index 7e31680..7e2ed23 100644 --- a/web/templates/tupa/maaritaValitseTehtava.html +++ b/web/templates/tupa/maaritaValitseTehtava.html @@ -1,7 +1,7 @@ {% extends "tupa/valitse.html" %} {{ block.super }} {% block sarake %} - + {{ sarake }}

Lisää uusi tehtävä diff --git a/web/templates/tupa/maarita_riisuttu.html b/web/templates/tupa/maarita_riisuttu.html index ab8b920..53860e4 100644 --- a/web/templates/tupa/maarita_riisuttu.html +++ b/web/templates/tupa/maarita_riisuttu.html @@ -2,7 +2,7 @@ {% block title %}{{ heading }}{% endblock %} {% block content %}

{{ heading }}

- +

{% include "tupa/tallenna.html" %}

{% if forms %} {% for form in forms %} diff --git a/web/templates/tupa/poista_kisa.html b/web/templates/tupa/poista_kisa.html index 0c07a27..5416652 100644 --- a/web/templates/tupa/poista_kisa.html +++ b/web/templates/tupa/poista_kisa.html @@ -2,7 +2,7 @@ {% block title %}{{ heading }}{% endblock %} {% block content %}

{{ heading }}

- +


diff --git a/web/templates/tupa/upload.html b/web/templates/tupa/upload.html index a4b11c0..4e010e7 100644 --- a/web/templates/tupa/upload.html +++ b/web/templates/tupa/upload.html @@ -2,7 +2,7 @@ {% block title %}{{ heading }}{% endblock %} {% block content %}

{{ heading }}

- +


diff --git a/web/templates/tupa/upload_riisuttu.html b/web/templates/tupa/upload_riisuttu.html index ed01912..0a1d01f 100644 --- a/web/templates/tupa/upload_riisuttu.html +++ b/web/templates/tupa/upload_riisuttu.html @@ -2,7 +2,7 @@ {% block title %}{{ heading }}{% endblock %} {% block content %}

{{ heading }}

- +


diff --git a/web/templates/tupa/valitse_form.html b/web/templates/tupa/valitse_form.html index d510f66..b36a636 100644 --- a/web/templates/tupa/valitse_form.html +++ b/web/templates/tupa/valitse_form.html @@ -2,7 +2,7 @@ {% block alku %}{{ form }}{% endblock %} {% block sarake %}{{ sarake }}{% endblock %} {% block content %} - + {{ block.super }} {% if napin_tyyppi == "kopioi" %} {% include "tupa/kopioi.html" %} diff --git a/web/templates/tupa/valitse_formset.html b/web/templates/tupa/valitse_formset.html index 57a618a..c2b5388 100644 --- a/web/templates/tupa/valitse_formset.html +++ b/web/templates/tupa/valitse_formset.html @@ -1,6 +1,6 @@ {% extends "tupa/valitse.html" %} {% block alku %} - + {% include "tupa/tallenna.html" %}

From 4308a0bfff23e8f55a4328c66408ca87fb4bb135 Mon Sep 17 00:00:00 2001 From: Ilmari Marttila Date: Tue, 17 Dec 2024 12:01:48 +0200 Subject: [PATCH 02/15] Remove empty HTML tags where appropriate --- web/templates/tupa/forms/maksimi_suoritus.html | 4 ---- web/templates/tupa/forms/nolla_suoritus.html | 9 --------- web/templates/tupa/heijasta.html | 8 ++------ web/templates/tupa/laskennan_tilanne.html | 3 --- web/templates/tupa/tulokset.html | 14 +++----------- web/templates/tupa/tuloksetHTML.html | 14 +++----------- 6 files changed, 8 insertions(+), 44 deletions(-) diff --git a/web/templates/tupa/forms/maksimi_suoritus.html b/web/templates/tupa/forms/maksimi_suoritus.html index 58ad3a1..51f8c10 100644 --- a/web/templates/tupa/forms/maksimi_suoritus.html +++ b/web/templates/tupa/forms/maksimi_suoritus.html @@ -5,9 +5,6 @@ - - - + {% else %} @@ -123,9 +121,7 @@

{{ heading }}

- + diff --git a/web/templates/tupa/laskennan_tilanne.html b/web/templates/tupa/laskennan_tilanne.html index 40024bd..f4ce8ac 100644 --- a/web/templates/tupa/laskennan_tilanne.html +++ b/web/templates/tupa/laskennan_tilanne.html @@ -66,8 +66,5 @@

Laskennan tilanne {% now " j.n.Y G:i" %}

- - - Parhaat pisteet saa:

- Montako kisapistettä jaetaan: {{ jaettavat.errors }} diff --git a/web/templates/tupa/forms/nolla_suoritus.html b/web/templates/tupa/forms/nolla_suoritus.html index 18b8ed0..167bbb5 100644 --- a/web/templates/tupa/forms/nolla_suoritus.html +++ b/web/templates/tupa/forms/nolla_suoritus.html @@ -8,12 +8,6 @@ Tämä voi olla jokin kiinteä suoritus tai interpoloinnissa keskimmäisestä tuloksesta laskettu.

- - - -
@@ -55,9 +49,6 @@
Kerroin keskimmäisestä tuloksesta

- - - {{ heading }} {% if forloop.first %} {% comment %} ylarivin eka {% endcomment %}

- - SIJ. - - VARTIO    syöttövirhe
-

-
-

{% endblock %} diff --git a/web/templates/tupa/tulokset.html b/web/templates/tupa/tulokset.html index cc55689..ec8fb6f 100644 --- a/web/templates/tupa/tulokset.html +++ b/web/templates/tupa/tulokset.html @@ -39,11 +39,7 @@

{{ heading }}

{% if tulos_taulukko %} {% for rivi in tulos_taulukko %} - {% if forloop.counter|add:"3"|divisibleby:"5" %} - - - - {% endif %} + {% if forloop.counter|add:"3"|divisibleby:"5" %}{% endif %} {% if forloop.first %} {% for sarake in rivi %} @@ -51,9 +47,7 @@

{{ heading }}

{% if forloop.first %} {% comment %} ylarivin eka {% endcomment %} - + {% else %} @@ -123,9 +117,7 @@

{{ heading }}

- + diff --git a/web/templates/tupa/tuloksetHTML.html b/web/templates/tupa/tuloksetHTML.html index b87ed1e..dd8f754 100755 --- a/web/templates/tupa/tuloksetHTML.html +++ b/web/templates/tupa/tuloksetHTML.html @@ -32,11 +32,7 @@

{{ heading }}

{% if tulos_taulukko %}
- - SIJ. - - VARTIO
{% for rivi in tulos_taulukko %} - {% if forloop.counter|add:"3"|divisibleby:"5" %} - - - - {% endif %} + {% if forloop.counter|add:"3"|divisibleby:"5" %}{% endif %} {% if forloop.first %} {% for sarake in rivi %} @@ -44,9 +40,7 @@

{{ heading }}

{% if forloop.first %} {% comment %} ylarivin eka {% endcomment %} - + {% else %} @@ -122,9 +116,7 @@

{{ heading }}

- + From 4869e92e033c966dcb35bccc07f1c1a9ef656790 Mon Sep 17 00:00:00 2001 From: Ilmari Marttila Date: Tue, 17 Dec 2024 15:36:28 +0200 Subject: [PATCH 03/15] Use proper HTML doctype preamble Also fix class names not working anymore in non-quirks mode. --- web/media/kipa.css | 10 +++++----- web/templates/404.html | 1 + web/templates/500.html | 1 + web/templates/tupa/base.html | 3 ++- web/templates/tupa/base_riisuttu.html | 3 ++- web/templates/tupa/heijasta.html | 2 +- web/templates/tupa/index.html | 3 ++- web/templates/tupa/kisa.html | 10 +++++----- web/templates/tupa/syota_tehtava.html | 6 +++--- web/templates/tupa/tuloksetHTML.html | 1 + web/tupa/views.py | 8 +++++--- 11 files changed, 28 insertions(+), 20 deletions(-) diff --git a/web/media/kipa.css b/web/media/kipa.css index 513e9bd..340f407 100644 --- a/web/media/kipa.css +++ b/web/media/kipa.css @@ -110,7 +110,7 @@ h3 font-size:11px; } -.etusivunotsikko +.etusivun-otsikko { font:20px Georgia,Helvetica,"Lucida Sans Unicode",Tahoma,Verdana,Arial,Helvetica,sans-serif; letter-spacing:0; @@ -148,7 +148,7 @@ h3 text-decoration:underline; } -.etusivunotsikko img +.etusivun-otsikko img { padding:10px; padding-left:40px; @@ -230,7 +230,7 @@ tr .odd:hover color:#339; } -.tauluotsikko +.taulu-otsikko { font-family:Verdana, Arial, Helvetica, sans-serif; font-size:x-small; @@ -352,7 +352,7 @@ tr .odd:hover background:url(/kipamedia/header.png) repeat-x; } -#pagetitle { +#page-title { text-transform:uppercase; text-decoration:none; color:#9fa8a9; @@ -364,7 +364,7 @@ tr .odd:hover line-height:normal; } -#pagetitle a, #pagetitle a:visited { +#page-title a, #page-title a:visited { text-decoration:none; color:#9fa8a9; font-family:Verdana,"Lucida Grande",Lucida,sans-serif; diff --git a/web/templates/404.html b/web/templates/404.html index d3a3ed9..1c1bce2 100644 --- a/web/templates/404.html +++ b/web/templates/404.html @@ -1,3 +1,4 @@ + diff --git a/web/templates/500.html b/web/templates/500.html index 6774735..4ca528e 100644 --- a/web/templates/500.html +++ b/web/templates/500.html @@ -1,3 +1,4 @@ + diff --git a/web/templates/tupa/base.html b/web/templates/tupa/base.html index 10b835b..ef7e89a 100644 --- a/web/templates/tupa/base.html +++ b/web/templates/tupa/base.html @@ -1,3 +1,4 @@ + {% if tilanne.0 == "a" %} - {% endif %} {% if tilanne.0 == "o" %} - {% endif %} {% if tilanne.0 == "s" %} - {% endif %} {% if tilanne.0 == "t" %} - {% endif %} {% if tilanne.0 == "v" %} - {% endif %} diff --git a/web/templates/tupa/tulokset.html b/web/templates/tupa/tulokset.html index ec8fb6f..c603c39 100644 --- a/web/templates/tupa/tulokset.html +++ b/web/templates/tupa/tulokset.html @@ -125,7 +125,7 @@

{{ heading }}

YHT - + {% else %} {% for sarake in rivi %} {% comment %} ylarivi {% endcomment %} @@ -167,7 +167,7 @@

{{ heading }}

{% for rivi in ulkona_taulukko %} - + {% for sarake in rivi %} {% if forloop.counter == 2 %} {% comment %} ekasarake {% endcomment %} diff --git a/web/templates/tupa/tuloksetHTML.html b/web/templates/tupa/tuloksetHTML.html index 8e42acf..a1e304f 100755 --- a/web/templates/tupa/tuloksetHTML.html +++ b/web/templates/tupa/tuloksetHTML.html @@ -125,7 +125,7 @@

{{ heading }}

YHT - + {% else %} {% for sarake in rivi %} {% comment %} ylarivi {% endcomment %} @@ -167,7 +167,7 @@

{{ heading }}

{% for rivi in ulkona_taulukko %} - + {% for sarake in rivi %} {% if forloop.counter == 2 %} {% comment %} ekasarake {% endcomment %} diff --git a/web/templates/tupa/tulosta.html b/web/templates/tupa/tulosta.html index 3a362cc..918fcf1 100644 --- a/web/templates/tupa/tulosta.html +++ b/web/templates/tupa/tulosta.html @@ -4,7 +4,7 @@

Tulokset sarjoittain

{% for sarja in sarja_list %} - {{ sarja.nimi }} + {{ sarja.nimi }}
{% endfor %}
From 93cd428c09bfa9ebeea3b8f282c087c3126c1828 Mon Sep 17 00:00:00 2001 From: Ilmari Marttila Date: Tue, 17 Dec 2024 21:46:19 +0200 Subject: [PATCH 05/15] Use lang attributes in html tag --- web/templates/404.html | 2 +- web/templates/500.html | 2 +- web/templates/tupa/base.html | 2 +- web/templates/tupa/base_riisuttu.html | 2 +- web/templates/tupa/heijasta.html | 2 +- web/templates/tupa/index.html | 2 +- web/templates/tupa/tuloksetHTML.html | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/web/templates/404.html b/web/templates/404.html index 87e5ff5..8d16c66 100644 --- a/web/templates/404.html +++ b/web/templates/404.html @@ -1,5 +1,5 @@ - +

404 Sivua ei löydy

diff --git a/web/templates/500.html b/web/templates/500.html index 229d28e..0437264 100644 --- a/web/templates/500.html +++ b/web/templates/500.html @@ -1,5 +1,5 @@ - +

diff --git a/web/templates/tupa/base.html b/web/templates/tupa/base.html index ef7e89a..0b6f7e6 100644 --- a/web/templates/tupa/base.html +++ b/web/templates/tupa/base.html @@ -1,5 +1,5 @@ - + - + Kipa - diff --git a/web/templates/tupa/heijasta.html b/web/templates/tupa/heijasta.html index 74c2e15..22980d8 100644 --- a/web/templates/tupa/heijasta.html +++ b/web/templates/tupa/heijasta.html @@ -1,5 +1,5 @@ <!DOCTYPE html> -<html xmlns="http://www.w3.org/1999/xhtml"> +<html lang="fi" xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> {% block header %} diff --git a/web/templates/tupa/index.html b/web/templates/tupa/index.html index 1edfaa9..8ef44c4 100644 --- a/web/templates/tupa/index.html +++ b/web/templates/tupa/index.html @@ -1,5 +1,5 @@ <!DOCTYPE html> -<html xmlns="http://www.w3.org/1999/xhtml"> +<html lang="fi" xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Kipa - kaikki kisat diff --git a/web/templates/tupa/tuloksetHTML.html b/web/templates/tupa/tuloksetHTML.html index a1e304f..d24feae 100755 --- a/web/templates/tupa/tuloksetHTML.html +++ b/web/templates/tupa/tuloksetHTML.html @@ -1,5 +1,5 @@ - + Sarjakohtaiset tulokset From f5533f1ef1f129e06887f8aff1f3110921f972b2 Mon Sep 17 00:00:00 2001 From: Ilmari Marttila Date: Tue, 17 Dec 2024 21:48:55 +0200 Subject: [PATCH 06/15] HTML document needs title --- web/templates/404.html | 4 +++- web/templates/500.html | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/web/templates/404.html b/web/templates/404.html index 8d16c66..cda06e7 100644 --- a/web/templates/404.html +++ b/web/templates/404.html @@ -1,6 +1,8 @@ - + + Sivua ei löydy +

404 Sivua ei löydy

alkuun diff --git a/web/templates/500.html b/web/templates/500.html index 0437264..15e4bd3 100644 --- a/web/templates/500.html +++ b/web/templates/500.html @@ -1,6 +1,8 @@ - + + Ohjelmistovirhe +


From 5bd8fe49b390099700ce17d25de1ecd5cfd82259 Mon Sep 17 00:00:00 2001 From: Ilmari Marttila Date: Tue, 17 Dec 2024 21:58:48 +0200 Subject: [PATCH 07/15] Remove duplicate attribute --- web/templates/tupa/base.html | 6 ++---- web/templates/tupa/laskennan_tilanne.html | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/web/templates/tupa/base.html b/web/templates/tupa/base.html index 0b6f7e6..e74173e 100644 --- a/web/templates/tupa/base.html +++ b/web/templates/tupa/base.html @@ -1,10 +1,8 @@ - + + Kipa - {% block title %}{% endblock %} diff --git a/web/templates/tupa/laskennan_tilanne.html b/web/templates/tupa/laskennan_tilanne.html index 9d35750..ed78098 100644 --- a/web/templates/tupa/laskennan_tilanne.html +++ b/web/templates/tupa/laskennan_tilanne.html @@ -1,10 +1,8 @@ {% extends "tupa/base.html" %} {% block title %}Tulokset sarjoittain{% endblock %} {% block header %} - + + Tulokset sarjoittain {% endblock header %} From 0f4184aa6362d0503397b5c9980b46408a14e69b Mon Sep 17 00:00:00 2001 From: Ilmari Marttila Date: Tue, 17 Dec 2024 22:01:26 +0200 Subject: [PATCH 08/15] Remove excess whitespace --- web/templates/tupa/syota_tehtava.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/templates/tupa/syota_tehtava.html b/web/templates/tupa/syota_tehtava.html index 04a770f..2d28175 100755 --- a/web/templates/tupa/syota_tehtava.html +++ b/web/templates/tupa/syota_tehtava.html @@ -141,7 +141,7 @@

{{ tehtava.nimi|alaviiva_pois }}

{% for osatehtava in vartio.1 %} {% for kentta in osatehtava %} - - + - + {% else %} {% comment %} ylarivi {% endcomment %} {% if sarake.jarjestysnro %} - {% endif %} @@ -75,11 +75,11 @@

{{ heading }}

{% else %} {% comment %} ylarivi {% endcomment %} {% if sarake.lyhenne %} - {% else %} - {% for sarake in rivi %} {% if forloop.first %} - {% else %} {% if forloop.counter != 0 %} {% if forloop.counter != 1 %} {% if forloop.counter != 2 %} - {% endif %} @@ -121,11 +121,11 @@

{{ heading }}

- + - @@ -135,7 +135,7 @@

{{ heading }}

{% comment %} ylarivi {% endcomment %} {% if forloop.counter == 2 %} {% comment %} ekasarake {% endcomment %} - + {% else %} {% if forloop.counter == 3 %} - + {% comment %} muut sarakkeet {% endcomment %} {% else %} - + {% else %} {% comment %} muut sarakkeet {% endcomment %} - - + - + {% else %} {% comment %} ylarivi {% endcomment %} {% if sarake.jarjestysnro %} - {% endif %} @@ -71,11 +72,11 @@

{{ heading }}

{% else %} {% comment %} ylarivi {% endcomment %} {% if sarake.lyhenne %} - {% else %} - {% for sarake in rivi %} {% if forloop.first %} - {% else %} {% if forloop.counter != 0 %} {% if forloop.counter != 1 %} {% if forloop.counter != 2 %} - {% endif %} @@ -117,21 +118,21 @@

{{ heading }}

- + - - + {% else %} {% for sarake in rivi %} {% comment %} ylarivi {% endcomment %} {% if forloop.counter == 2 %} {% comment %} ekasarake {% endcomment %} - + {% else %} {% if forloop.counter == 3 %} - + {% comment %} muut sarakkeet {% endcomment %} {% else %} - {% for rivi in ulkona_taulukko %} - + {% for sarake in rivi %} {% if forloop.counter == 2 %} {% comment %} ekasarake {% endcomment %} - + {% else %} {% comment %} muut sarakkeet {% endcomment %} - - + - + {% else %} {% comment %} ylarivi {% endcomment %} {% if sarake.jarjestysnro %} - {% endif %} @@ -66,16 +66,16 @@

{{ heading }}

{% comment %} ylarivi {% endcomment %} {% if sarake.lyhenne %} {% if sarake.rastikasky %} - {% else %} - {% endif %} {% else %} - {% for sarake in rivi %} {% if forloop.first %} - {% else %} {% if forloop.counter != 0 %} {% if forloop.counter != 1 %} {% if forloop.counter != 2 %} - {% endif %} @@ -117,11 +117,11 @@

{{ heading }}

- + - @@ -131,7 +131,7 @@

{{ heading }}

{% comment %} ylarivi {% endcomment %} {% if forloop.counter == 2 %} {% comment %} ekasarake {% endcomment %} - + {% else %} {% if forloop.counter == 3 %} - + {% comment %} muut sarakkeet {% endcomment %} {% else %} - + {% else %} {% comment %} muut sarakkeet {% endcomment %} -
- - SIJ. - - VARTIO
-

+

Suoritusten syöttö

@@ -33,7 +33,7 @@

-

+

Tulokset

@@ -75,7 +75,7 @@
-

+

Kisan määritykset

@@ -94,7 +94,7 @@
-

+

Ylläpito

@@ -124,7 +124,7 @@

-

+

Apua

diff --git a/web/templates/tupa/syota_tehtava.html b/web/templates/tupa/syota_tehtava.html index 08f05ce..b568d09 100755 --- a/web/templates/tupa/syota_tehtava.html +++ b/web/templates/tupa/syota_tehtava.html @@ -43,15 +43,15 @@

{{ tehtava.nimi|alaviiva_pois }}

{% include "tupa/tallenna.html" %}

- + - + - + {% if tilanne.0 == "a" %} - + {% else %} {% for sarake in rivi %} {% comment %} ylarivi {% endcomment %} @@ -171,7 +171,7 @@

{{ heading }}

{% for rivi in ulkona_taulukko %} - + {% for sarake in rivi %} {% if forloop.counter == 2 %} {% comment %} ekasarake {% endcomment %} diff --git a/web/templates/tupa/index.html b/web/templates/tupa/index.html index 233979c..1edfaa9 100644 --- a/web/templates/tupa/index.html +++ b/web/templates/tupa/index.html @@ -28,18 +28,18 @@

Kisat

{% if object_list %} {% for kisa in object_list %} - {{ kisa.nimi }} + {{ kisa.nimi }}
{% endfor %} {% else %}

Ei määriteltyjä kisoja.

{% endif %}

- Luo uusi kisa + Luo uusi kisa

- Lisää kisa tiedostosta + Lisää kisa tiedostosta

diff --git a/web/templates/tupa/kisa.html b/web/templates/tupa/kisa.html index d30e2b3..d59689d 100644 --- a/web/templates/tupa/kisa.html +++ b/web/templates/tupa/kisa.html @@ -99,7 +99,7 @@ Ylläpito

- + listaa kaikki kisat diff --git a/web/templates/tupa/laskennan_tilanne.html b/web/templates/tupa/laskennan_tilanne.html index f4ce8ac..9d35750 100644 --- a/web/templates/tupa/laskennan_tilanne.html +++ b/web/templates/tupa/laskennan_tilanne.html @@ -22,19 +22,19 @@

Laskennan tilanne {% now " j.n.Y G:i" %}

{% else %} {% if sarake.0 == "a" %} - + {% else %} {% if sarake.0 == "o" %} - + {% else %} {% if sarake.0 == "s" %} - + {% else %} {% if sarake.0 == "t" %} - + {% else %} {% if sarake.0 == "v" %} - + {% else %} {% endif %} @@ -51,19 +51,19 @@

Laskennan tilanne {% now " j.n.Y G:i" %}


Tehtävä:Tehtävä: {{ tehtava.jarjestysnro }}     {{ tehtava.nimi|alaviiva_pois }}
Sarja:Sarja: {{ tehtava.sarja.nimi }}
Tehtävän tila:Tehtävän tila: diff --git a/web/templates/tupa/tuloksetHTML.html b/web/templates/tupa/tuloksetHTML.html index dd8f754..8e42acf 100755 --- a/web/templates/tupa/tuloksetHTML.html +++ b/web/templates/tupa/tuloksetHTML.html @@ -1,3 +1,4 @@ + diff --git a/web/tupa/views.py b/web/tupa/views.py index 3ce00b3..fbe862b 100644 --- a/web/tupa/views.py +++ b/web/tupa/views.py @@ -51,7 +51,7 @@ def kipaResponseRedirect(url): return HttpResponse( - '' ) @@ -1242,7 +1242,7 @@ def tehtavanVaiheet(request, kisa_nimi, tehtava_id, vartio_id=None): tehtava = get_object_or_404(Tehtava, id=tehtava_id) vartiot = Vartio.objects.filter(sarja=tehtava.sarja) if not len(vartiot): - responssi = "

Ei vartioita


" + responssi = "

Ei vartioita


" responssi += ( 'Vartion laskennan vaiheet tehtävässä " + tehtava.nimi + "
" + "Vartion laskennan vaiheet tehtävässä " + + tehtava.nimi + + "
" ) enableLogging() clearLoki() From 1844a36e6eba7678084c21dd014c3a23e48644c8 Mon Sep 17 00:00:00 2001 From: Ilmari Marttila Date: Tue, 17 Dec 2024 21:26:32 +0200 Subject: [PATCH 04/15] Use double quotes in HTML attributes --- web/templates/404.html | 2 +- web/templates/500.html | 2 +- web/templates/admin/base_site.html | 4 ++-- web/templates/tupa/forms/osa_tehtava.html | 4 ++-- web/templates/tupa/forms/puhdas_kaava.html | 2 +- web/templates/tupa/forms/vapaa_kaava.html | 2 +- web/templates/tupa/heijasta.html | 4 ++-- web/templates/tupa/index.html | 6 +++--- web/templates/tupa/kisa.html | 2 +- web/templates/tupa/laskennan_tilanne.html | 20 ++++++++++---------- web/templates/tupa/syota_tehtava.html | 10 +++++----- web/templates/tupa/tulokset.html | 4 ++-- web/templates/tupa/tuloksetHTML.html | 4 ++-- web/templates/tupa/tulosta.html | 2 +- 14 files changed, 34 insertions(+), 34 deletions(-) diff --git a/web/templates/404.html b/web/templates/404.html index 1c1bce2..87e5ff5 100644 --- a/web/templates/404.html +++ b/web/templates/404.html @@ -3,6 +3,6 @@

404 Sivua ei löydy

-
alkuun + alkuun diff --git a/web/templates/500.html b/web/templates/500.html index 4ca528e..229d28e 100644 --- a/web/templates/500.html +++ b/web/templates/500.html @@ -8,7 +8,7 @@

ERROR 500

- Ohjelmistovirhe . Paina alkuun jatkaaksesi. + Ohjelmistovirhe . Paina alkuun jatkaaksesi.

Kyborgin kahvimuki : {{ error }} diff --git a/web/templates/admin/base_site.html b/web/templates/admin/base_site.html index f8d4b48..c04c3ca 100644 --- a/web/templates/admin/base_site.html +++ b/web/templates/admin/base_site.html @@ -1,9 +1,9 @@ {% extends "admin/base.html" %} {% load i18n %} {% block title %} - {{ title }} | {% trans 'Django site admin' %} + {{ title }} | {% trans "Django site admin" %} {% endblock %} {% block branding %} -

{% trans 'Django administration' %}

+

{% trans "Django administration" %}

{% endblock %} {% block nav-global %}{% endblock %} diff --git a/web/templates/tupa/forms/osa_tehtava.html b/web/templates/tupa/forms/osa_tehtava.html index 4f396b4..349aa4e 100644 --- a/web/templates/tupa/forms/osa_tehtava.html +++ b/web/templates/tupa/forms/osa_tehtava.html @@ -22,11 +22,11 @@

{{ heading }}

name="{{ osatehtava.id }}" value="{{ sarake.tyyppi }}" onclick=" {% for sa in taulukko %} {% if sa.tyyppi == sarake.tyyppi %} setVisibility('{{ sa.id }}','inline'); {% else %} setVisibility('{{ sa.id }}','none'); {% endif %} {% endfor %} " - {% if sarake.tyyppi == tyyppi %}checked='checked'{% endif %} /> + {% if sarake.tyyppi == tyyppi %}checked="checked"{% endif %} /> {{ sarake.otsikko }}     {% endfor %} {% for sarake in taulukko %} -
{{ sarake.1|alaviiva_pois }}{{ sarake.1|alaviiva_pois }}{{ sarake.1 }}{{ sarake.1 }}{{ sarake.1 }}{{ sarake.1 }}{{ sarake.1|alaviiva_pois }}{{ sarake.1|alaviiva_pois }}{{ sarake.1|alaviiva_pois }}{{ sarake.1|alaviiva_pois }}{{ sarake.1 }}
- + - + - + - + - +
   aloittamatta   aloittamatta
   syötetty osittain   syötetty osittain
   syötetty   syötetty
   tarkistettu   tarkistettu
   syöttövirhe   syöttövirhe
diff --git a/web/templates/tupa/syota_tehtava.html b/web/templates/tupa/syota_tehtava.html index b568d09..04a770f 100755 --- a/web/templates/tupa/syota_tehtava.html +++ b/web/templates/tupa/syota_tehtava.html @@ -53,27 +53,27 @@

{{ tehtava.nimi|alaviiva_pois }}

Tehtävän tila: + + + + +
{{ vartio.0.nimi }} + {{ kentta.errors }} {{ kentta.arvo }} {{ kentta.tarkistus }} From 55cdec9aa429a468f00e1a8b97a673a94d9d99cf Mon Sep 17 00:00:00 2001 From: Ilmari Marttila Date: Tue, 17 Dec 2024 22:03:47 +0200 Subject: [PATCH 09/15] Remove empty attribute --- web/templates/tupa/valitse.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/templates/tupa/valitse.html b/web/templates/tupa/valitse.html index 3cf7d41..d18ce86 100644 --- a/web/templates/tupa/valitse.html +++ b/web/templates/tupa/valitse.html @@ -21,7 +21,7 @@

{{ heading }}

{% for sarake in taulukko %}
-
    +
      {% block sarake %}{{ sarake }}{% endblock %}
From d0ecde8070e847ec6df2b6c9e913bc92e524fb4b Mon Sep 17 00:00:00 2001 From: Ilmari Marttila Date: Tue, 17 Dec 2024 22:17:22 +0200 Subject: [PATCH 10/15] HTML doesn't need xmlns attribute in html tag Especially not one referring to XHTML namespace. --- web/templates/tupa/base.html | 2 +- web/templates/tupa/base_riisuttu.html | 2 +- web/templates/tupa/heijasta.html | 2 +- web/templates/tupa/index.html | 2 +- web/templates/tupa/tuloksetHTML.html | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/web/templates/tupa/base.html b/web/templates/tupa/base.html index e74173e..2c10e5a 100644 --- a/web/templates/tupa/base.html +++ b/web/templates/tupa/base.html @@ -1,5 +1,5 @@ - + diff --git a/web/templates/tupa/base_riisuttu.html b/web/templates/tupa/base_riisuttu.html index e20226b..c92eede 100644 --- a/web/templates/tupa/base_riisuttu.html +++ b/web/templates/tupa/base_riisuttu.html @@ -1,5 +1,5 @@ - + Kipa - diff --git a/web/templates/tupa/heijasta.html b/web/templates/tupa/heijasta.html index 22980d8..ea1aaa2 100644 --- a/web/templates/tupa/heijasta.html +++ b/web/templates/tupa/heijasta.html @@ -1,5 +1,5 @@ <!DOCTYPE html> -<html lang="fi" xmlns="http://www.w3.org/1999/xhtml"> +<html lang="fi"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> {% block header %} diff --git a/web/templates/tupa/index.html b/web/templates/tupa/index.html index 8ef44c4..e0938e8 100644 --- a/web/templates/tupa/index.html +++ b/web/templates/tupa/index.html @@ -1,5 +1,5 @@ <!DOCTYPE html> -<html lang="fi" xmlns="http://www.w3.org/1999/xhtml"> +<html lang="fi"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Kipa - kaikki kisat diff --git a/web/templates/tupa/tuloksetHTML.html b/web/templates/tupa/tuloksetHTML.html index d24feae..ef92ca2 100755 --- a/web/templates/tupa/tuloksetHTML.html +++ b/web/templates/tupa/tuloksetHTML.html @@ -1,5 +1,5 @@ - + Sarjakohtaiset tulokset From 4261524eb79f483efd9d5f714747fb0a71717ad1 Mon Sep 17 00:00:00 2001 From: Ilmari Marttila Date: Wed, 18 Dec 2024 14:16:01 +0200 Subject: [PATCH 11/15] Remove right padding inline style from result table cells --- web/media/tulostaulukko.css | 3 +++ web/templates/tupa/heijasta.html | 30 ++++++++++++------------- web/templates/tupa/tulokset.html | 33 ++++++++++++++-------------- web/templates/tupa/tuloksetHTML.html | 32 +++++++++++++-------------- 4 files changed, 51 insertions(+), 47 deletions(-) create mode 100644 web/media/tulostaulukko.css diff --git a/web/media/tulostaulukko.css b/web/media/tulostaulukko.css new file mode 100644 index 0000000..4f6d016 --- /dev/null +++ b/web/media/tulostaulukko.css @@ -0,0 +1,3 @@ +.tulostaulukko-solu { + padding-right:10px; +} diff --git a/web/templates/tupa/heijasta.html b/web/templates/tupa/heijasta.html index ea1aaa2..ef3ce91 100644 --- a/web/templates/tupa/heijasta.html +++ b/web/templates/tupa/heijasta.html @@ -10,7 +10,7 @@ {% endblock header %} Sarjakohtaiset tulokset - + {% load kipatags %} @@ -51,13 +51,13 @@

{{ heading }}

{% if forloop.first %} {% comment %} ylarivin eka {% endcomment %}
+ {{ sarake.jarjestysnro }}. + {{ sarake.lyhenne }} + {{ sarake.nimi|slice:":6" }}
@@ -101,14 +101,14 @@

{{ heading }}

+ {{ sarake.maksimipisteet }} + {{ sarake.maksimipisteet }} SIJ. VARTIO + YHT
{{ sarake.nro }}{{ sarake.nro }} {{ sarake.nimi }} {% if sarake.lippukunta %}
{% endif %} @@ -145,10 +145,10 @@

{{ heading }}

{{ sarake }}{{ sarake }} + {% if forloop.first %}{% endif %} {{ sarake }} {% if forloop.first %}{% endif %} @@ -175,7 +175,7 @@

{{ heading }}

{% for sarake in rivi %} {% if forloop.counter == 2 %} {% comment %} ekasarake {% endcomment %} -
{{ sarake.nro }}{{ sarake.nro }} {{ sarake.nimi }} {% if sarake.lippukunta %}
{% endif %} @@ -185,7 +185,7 @@

{{ heading }}

+ {% if forloop.first %}{% endif %} {{ sarake }} {% if forloop.first %}{% endif %} diff --git a/web/templates/tupa/tulokset.html b/web/templates/tupa/tulokset.html index c603c39..b3173c3 100644 --- a/web/templates/tupa/tulokset.html +++ b/web/templates/tupa/tulokset.html @@ -7,6 +7,7 @@ {% endif %} + {% endblock header %} {% block content %} {% load kipatags %} @@ -47,13 +48,13 @@

{{ heading }}

{% if forloop.first %} {% comment %} ylarivin eka {% endcomment %}
+ {{ sarake.jarjestysnro }}. + {{ sarake.lyhenne }} + {{ sarake.nimi|slice:":6" }}
@@ -97,14 +98,14 @@

{{ heading }}

+ {{ sarake.maksimipisteet }} + {{ sarake.maksimipisteet }} SIJ. VARTIO + YHT
{{ sarake.nro }}{{ sarake.nro }} {{ sarake.nimi }} {% if sarake.lippukunta %}
{% endif %} @@ -141,10 +142,10 @@

{{ heading }}

{{ sarake }}{{ sarake }} + {% if forloop.first %}{% endif %} {{ sarake }} {% if forloop.first %}{% endif %} @@ -167,11 +168,11 @@

{{ heading }}

{{ sarake.nro }}{{ sarake.nro }} {{ sarake.nimi }} {% if sarake.lippukunta %}
{% endif %} @@ -181,7 +182,7 @@

{{ heading }}

+ {% if forloop.first %}{% endif %} {{ sarake }} {% if forloop.first %}{% endif %} diff --git a/web/templates/tupa/tuloksetHTML.html b/web/templates/tupa/tuloksetHTML.html index ef92ca2..84af259 100755 --- a/web/templates/tupa/tuloksetHTML.html +++ b/web/templates/tupa/tuloksetHTML.html @@ -4,7 +4,7 @@ Sarjakohtaiset tulokset - + {% load kipatags %} @@ -41,13 +41,13 @@

{{ heading }}

{% if forloop.first %} {% comment %} ylarivin eka {% endcomment %}
+ {{ sarake.jarjestysnro }}. + {{ sarake.lyhenne }} + {{ sarake.lyhenne }} + {{ sarake.nimi|slice:":6" }}
@@ -97,14 +97,14 @@

{{ heading }}

+ {{ sarake.maksimipisteet }} + {{ sarake.maksimipisteet }} SIJ. VARTIO + YHT
{{ sarake.nro }}{{ sarake.nro }} {{ sarake.nimi }} {% if sarake.lippukunta %}
{% endif %} @@ -141,10 +141,10 @@

{{ heading }}

{{ sarake }}{{ sarake }} + {% if forloop.first %}{% endif %} {{ sarake }} {% if forloop.first %}{% endif %} @@ -171,7 +171,7 @@

{{ heading }}

{% for sarake in rivi %} {% if forloop.counter == 2 %} {% comment %} ekasarake {% endcomment %} -
{{ sarake.nro }}{{ sarake.nro }} {{ sarake.nimi }} {% if sarake.lippukunta %}
{% endif %} @@ -181,7 +181,7 @@

{{ heading }}

+ {% if forloop.first %}{% endif %} {{ sarake }} {% if forloop.first %}{% endif %} From ad9e1227ca92026b90e1326826cabace9655ba43 Mon Sep 17 00:00:00 2001 From: Ilmari Marttila Date: Wed, 18 Dec 2024 17:04:41 +0200 Subject: [PATCH 12/15] Move rest of inline styles to css file --- web/media/kipa.css | 20 +++++++++++++++++++- web/media/tulostaulukko.css | 10 ++++++++++ web/templates/tupa/base.html | 6 +----- web/templates/tupa/base_riisuttu.html | 6 +----- web/templates/tupa/forms/vapaa_kaava.html | 2 +- web/templates/tupa/heijasta.html | 8 ++++---- web/templates/tupa/index.html | 6 +----- web/templates/tupa/login.html | 2 +- web/templates/tupa/tulokset.html | 6 +++--- web/templates/tupa/tuloksetHTML.html | 8 ++++---- web/templates/tupa/valitse.html | 2 +- 11 files changed, 46 insertions(+), 30 deletions(-) diff --git a/web/media/kipa.css b/web/media/kipa.css index 340f407..def1383 100644 --- a/web/media/kipa.css +++ b/web/media/kipa.css @@ -500,4 +500,22 @@ td.th_erotin { .oneRowInlineForm { display: flex; -} \ No newline at end of file +} + +.login-form { + float:right; + margin-top:-4px; + margin-bottom:0; + padding-bottom:0; + height:18px +} + +.tab-selection-box { + border:1px solid gray; + margin-bottom: 1em; + padding: 10px +} + +.vapaakaava-input { + width: 100%; +} diff --git a/web/media/tulostaulukko.css b/web/media/tulostaulukko.css index 4f6d016..1022be7 100644 --- a/web/media/tulostaulukko.css +++ b/web/media/tulostaulukko.css @@ -1,3 +1,13 @@ .tulostaulukko-solu { padding-right:10px; } + +.vartiosarake-solu { + min-width:100px; +} + +.tulostaulukko-otsikko { + margin:0; + padding:0; + line-height:normal; +} \ No newline at end of file diff --git a/web/templates/tupa/base.html b/web/templates/tupa/base.html index 2c10e5a..7831cae 100644 --- a/web/templates/tupa/base.html +++ b/web/templates/tupa/base.html @@ -51,11 +51,7 @@ -
{% include "tupa/login.html" %}
+