From bce196c7f06c6d82102b4f7c422701055a6fc44b Mon Sep 17 00:00:00 2001 From: Petr Šmerkl <46304018+SveterCZE@users.noreply.github.com> Date: Sun, 31 Jan 2021 00:28:28 +0100 Subject: Add files via upload --- templates/_formhelpers.html | 18 +++++++ templates/footer.html | 3 ++ templates/header.html | 11 +++++ templates/index.html | 5 ++ templates/results2.html | 113 ++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 150 insertions(+) create mode 100644 templates/_formhelpers.html create mode 100644 templates/footer.html create mode 100644 templates/header.html create mode 100644 templates/index.html create mode 100644 templates/results2.html diff --git a/templates/_formhelpers.html b/templates/_formhelpers.html new file mode 100644 index 0000000..3a89e09 --- /dev/null +++ b/templates/_formhelpers.html @@ -0,0 +1,18 @@ +{% macro render_field(field) %} +
+
+ {{ field.label }} +
+
+ {{ field(**kwargs)|safe }} +
+
+ + {% if field.errors %} + + {% endif %} +{% endmacro %} \ No newline at end of file diff --git a/templates/footer.html b/templates/footer.html new file mode 100644 index 0000000..8f6dbe5 --- /dev/null +++ b/templates/footer.html @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/templates/header.html b/templates/header.html new file mode 100644 index 0000000..30a4ebd --- /dev/null +++ b/templates/header.html @@ -0,0 +1,11 @@ + + + + + + + + + +Search Results - Flask Justice Database + \ No newline at end of file diff --git a/templates/index.html b/templates/index.html new file mode 100644 index 0000000..267d6cb --- /dev/null +++ b/templates/index.html @@ -0,0 +1,5 @@ +{% include 'header.html' %} + +{% include 'search_form.html' %} + +{% include 'footer.html' %} \ No newline at end of file diff --git a/templates/results2.html b/templates/results2.html new file mode 100644 index 0000000..b7de3fc --- /dev/null +++ b/templates/results2.html @@ -0,0 +1,113 @@ +{% include 'header.html' %} + +{% include 'search_form.html' %} + +

Počet nalezených subjektů: {{ results|length }}

+ {% for row in results %} + + {% set insolvency_notes = [] %} + {% for elem in row.insolvence %} + {% set insolvency_notes = insolvency_notes.append(elem.insolvency_event) %} + {% endfor %} + + {% set zapis_split = row.zapis.split("-") %} + {% if zapis_split[1] == "01" %} + {% set mesic = "ledna" %} + {% elif zapis_split[1] == "02" %} + {% set mesic = "února" %} + {% elif zapis_split[1] == "03" %} + {% set mesic = "března" %} + {% elif zapis_split[1] == "04" %} + {% set mesic = "dubna" %} + {% elif zapis_split[1] == "05" %} + {% set mesic = "května" %} + {% elif zapis_split[1] == "06" %} + {% set mesic = "června" %} + {% elif zapis_split[1] == "07" %} + {% set mesic = "července" %} + {% elif zapis_split[1] == "08" %} + {% set mesic = "srpna" %} + {% elif zapis_split[1] == "09" %} + {% set mesic = "září" %} + {% elif zapis_split[1] == "10" %} + {% set mesic = "října" %} + {% elif zapis_split[1] == "11" %} + {% set mesic = "listopadu" %} + {% elif zapis_split[1] == "12" %} + {% set mesic = "prosince" %} + {% endif %} + + {% if zapis_split[2][0] == "0" %} + {% set den = zapis_split[2][1] %} + {% else %} + {% set den = zapis_split[2] %} + {% endif %} + + {% if row.soud == "MSPH" %} + {% set soud = "Městského soudu v Praze" %} + {% elif row.soud == "KSCB" %} + {% set soud = "Krajského soudu v Českých Budějovicích" %} + {% elif row.soud == "KSOS" %} + {% set soud = "Krajského soudu v Ostravě" %} + {% elif row.soud == "KSPL" %} + {% set soud = "Krajského soudu v Plzni" %} + {% elif row.soud == "KSBR" %} + {% set soud = "Krajského soudu v Brně" %} + {% elif row.soud == "KSHK" %} + {% set soud = "Krajského soudu v Hradci Králové" %} + {% elif row.soud == "KSUL" %} + {% set soud = "Krajského soudu v Ústí nad Labem" %} + {% endif %} + + {% if insolvency_notes|length > 0 %} + {% set table_style = "table table-danger" %} + {% elif loop.index % 2 == 0 %} + {% set table_style = "table table-light" %} + {% else %} + {% set table_style = "table table-secondary" %} + {% endif %} + + {% if row.ico|length != 8 %} + {% set ico_buffer = [] %} + {% for i in range (8 - row.ico|length) %} + {% set ico_buffer = ico_buffer.append("0") %} + {% endfor %} + + {% else %} + {% set ico_buffer = "" %} + {% endif %} + + + + + +

+ + + + + + + + + + + + + + + + + + + {% if insolvency_notes|length > 0 %} + {% for i in range (insolvency_notes|length) %} + + + + {% endfor %} + {% endif %} +
Název subjektu:{{ row.nazev }}IČO:{{ ico_buffer|join("") }}{{ row.ico }}
Spisová značka:{{ row.oddil }} {{ row.vlozka }} vedená u {{ soud }}Den zápisu:{{den}}. {{mesic}} {{zapis_split[0]}}
Sídlo:{{ row.sidlo }}
{{ insolvency_notes[i] }}
+ {% endfor %} + +{% include 'footer.html' %} \ No newline at end of file -- cgit