diff options
author | Petr Šmerkl <46304018+SveterCZE@users.noreply.github.com> | 2021-04-18 00:16:48 +0200 |
---|---|---|
committer | Petr Šmerkl <46304018+SveterCZE@users.noreply.github.com> | 2021-04-18 00:16:48 +0200 |
commit | 9cceba9b3466a2e5a7e712414bdf006215d7cb18 (patch) | |
tree | 759ffa8973d32fae04acd2bf5899e0459b087b46 /templates | |
parent | 9a9914e21a4813e1ebb810be2b3b8084067c63b4 (diff) | |
download | justice-9cceba9b3466a2e5a7e712414bdf006215d7cb18.tar.gz |
add search by persons
Diffstat (limited to 'templates')
-rw-r--r-- | templates/header.html | 10 | ||||
-rw-r--r-- | templates/most_common_degree.html | 28 | ||||
-rw-r--r-- | templates/results2.html | 4 | ||||
-rw-r--r-- | templates/results_persons.html | 85 | ||||
-rw-r--r-- | templates/trivia.html | 2 |
5 files changed, 113 insertions, 16 deletions
diff --git a/templates/header.html b/templates/header.html index 30a4ebd..14b8bda 100644 --- a/templates/header.html +++ b/templates/header.html @@ -8,4 +8,12 @@ <!-- Bootstrap CSS --> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-giJF6kkoqNQ00vy+HMDP7azOuL0xtbfIcaT9wjKHr8RbDVddVHyTfAAsrekwKmP1" crossorigin="anonymous"> <title>Search Results - Flask Justice Database</title> -<body>
\ No newline at end of file +<body> +<table class="table"> + <tr> + <td><a href="/">Veřejný rejstřík podle subjektů</a></td> + <td><a href="/osoby">Veřejný rejstřík podle fyzických osob v angažmá</a></td> + <td>Veřejný rejstřík podle právnických osob v angažmá (coming soon)</td> + <td><a href="/trivia">Zajímavosti z obchodního rejstříku</a></td> + </tr> +</table>
\ No newline at end of file diff --git a/templates/most_common_degree.html b/templates/most_common_degree.html new file mode 100644 index 0000000..72ac5b2 --- /dev/null +++ b/templates/most_common_degree.html @@ -0,0 +1,28 @@ +{% include 'header.html' %} + +<h1>Nejčastější tituly:</h1> + +<table class="table table-hover" style="width: auto"> + <thead class="thead-dark"> + <tr class="table-info"> + <th scope="col">#</th> + <th scope="col">Titul před jménem</th> + <th scope="col">Frekvence</th> + <th scope="col">Titul za jménem</th> + <th scope="col">Frekvence</th> + </tr> + </thead> + <tbody> + {% for i in range (most_common_degree_before|length) %} + <tr> + <th scope = "row">{{ i + 1 }}</th> + <td>{{ most_common_degree_before[i][0] }}</td> + <td>{{ most_common_degree_before[i][1] }}</td> + <td>{{ most_common_degree_after[i][0] }}</td> + <td>{{ most_common_degree_after[i][1] }}</td> + </tr> + {% endfor %} + </tbody> +</table> + +{% include 'footer.html' %}
\ No newline at end of file diff --git a/templates/results2.html b/templates/results2.html index 3e686da..9f41c18 100644 --- a/templates/results2.html +++ b/templates/results2.html @@ -1,7 +1,7 @@ -{% include 'header.html' %} - {% if show_form == True %} {% include 'search_form.html' %} +{% else %} + {% include 'header.html' %} {% endif %} <p><b>Počet nalezených subjektů: {{ results|length }}</b></p> diff --git a/templates/results_persons.html b/templates/results_persons.html index a3ceb38..666e8d9 100644 --- a/templates/results_persons.html +++ b/templates/results_persons.html @@ -1,24 +1,85 @@ -{% include 'header.html' %} - {% if show_form == True %} {% include 'search_form_person.html' %} +{% else %} + {% include 'header.html' %} {% endif %} <p><b>Počet nalezených osob: {{ results|length }}</b></p> +{% set count = namespace(value=0) %} + {% for row in results %} + {% set test_list = [] %} + {% for elem in row.statut_org_association %} + {% set my_dict = {} %} + {% set x = my_dict.__setitem__("adresa", elem.adresa) %} + {% set x = my_dict.__setitem__("funkce", elem.funkce) %} + {% set x = my_dict.__setitem__("nazev", elem.statutarni_organ.company.nazev) %} + {% set x = my_dict.__setitem__("ico", elem.statutarni_organ.company.ico) %} + {% set x = my_dict.__setitem__("oddil", elem.statutarni_organ.company.oddil) %} + {% set x = my_dict.__setitem__("vlozka", elem.statutarni_organ.company.vlozka) %} + {% set x = my_dict.__setitem__("soud", elem.statutarni_organ.company.soud) %} + {% set x = my_dict.__setitem__("zapis", elem.statutarni_organ.company.zapis) %} + {% set test_list = test_list.append(my_dict) %} + {% endfor %} + + {% for elem in row.supervisory_board_member_association %} + {% set my_dict = {} %} + {% set x = my_dict.__setitem__("adresa", elem.adresa) %} + {% set x = my_dict.__setitem__("funkce", elem.funkce) %} + {% set x = my_dict.__setitem__("nazev", elem.dozorci_rada.company.nazev) %} + {% set x = my_dict.__setitem__("ico", elem.dozorci_rada.company.ico) %} + {% set x = my_dict.__setitem__("oddil", elem.dozorci_rada.company.oddil) %} + {% set x = my_dict.__setitem__("vlozka", elem.dozorci_rada.company.vlozka) %} + {% set x = my_dict.__setitem__("soud", elem.dozorci_rada.company.soud) %} + {% set x = my_dict.__setitem__("zapis", elem.dozorci_rada.company.zapis) %} + {% set test_list = test_list.append(my_dict) %} + {% endfor %} -{% set count = namespace(value=0) %} -{% for row in results %} -<p>{{ row }} {{ row.statut_org_association }} {% for elem in row.spolecnik_association %} - {{ elem.company.nazev }} {{ elem.adresa }} + {% set my_dict = {} %} + {% set x = my_dict.__setitem__("adresa", elem.adresa) %} + {% set x = my_dict.__setitem__("funkce", "společník") %} + {% set x = my_dict.__setitem__("nazev", elem.company.nazev) %} + {% set x = my_dict.__setitem__("ico", elem.company.ico) %} + {% set x = my_dict.__setitem__("oddil", elem.company.oddil) %} + {% set x = my_dict.__setitem__("vlozka", elem.company.vlozka) %} + {% set x = my_dict.__setitem__("soud", elem.company.soud) %} + {% set x = my_dict.__setitem__("zapis", elem.company.zapis) %} + {% set test_list = test_list.append(my_dict) %} + {% endfor %} + + {% for elem in row.sole_shareholder_association %} + {% set my_dict = {} %} + {% set x = my_dict.__setitem__("adresa", elem.adresa) %} + {% set x = my_dict.__setitem__("funkce", "jediný akcionář") %} + {% set x = my_dict.__setitem__("nazev", elem.company.nazev) %} + {% set x = my_dict.__setitem__("ico", elem.company.ico) %} + {% set x = my_dict.__setitem__("oddil", elem.company.oddil) %} + {% set x = my_dict.__setitem__("vlozka", elem.company.vlozka) %} + {% set x = my_dict.__setitem__("soud", elem.company.soud) %} + {% set x = my_dict.__setitem__("zapis", elem.company.zapis) %} + {% set test_list = test_list.append(my_dict) %} {% endfor %} - </p> - {% for elem in row.statut_org_association %} + + {% for elem in row.prokurista_association %} + {% set my_dict = {} %} + {% set x = my_dict.__setitem__("adresa", elem.adresa) %} + {% set x = my_dict.__setitem__("funkce", "prokurista") %} + {% set x = my_dict.__setitem__("nazev", elem.company.nazev) %} + {% set x = my_dict.__setitem__("ico", elem.company.ico) %} + {% set x = my_dict.__setitem__("oddil", elem.company.oddil) %} + {% set x = my_dict.__setitem__("vlozka", elem.company.vlozka) %} + {% set x = my_dict.__setitem__("soud", elem.company.soud) %} + {% set x = my_dict.__setitem__("zapis", elem.company.zapis) %} + {% set test_list = test_list.append(my_dict) %} + {% endfor %} + + {% for elem in test_list %} {% if count.value % 2 == 0 %} {% set table_style = "table table-light" %} {% else %} {% set table_style = "table table-secondary" %} {% endif %} + <table class= "{{table_style}}" style="width: 100%"> <p></p> <tr> @@ -37,16 +98,16 @@ <tr> <td>Název subjektu:</td> - <td><b>{{ elem.statutarni_organ.company.nazev }}</b></td> + <td><b>{{ elem.nazev }}</b></td> <td>IČO:</td> - <td><a href="/{{ elem.statutarni_organ.company.ico }}"><b>{{ elem.statutarni_organ.company.ico }}</b></a></td> + <td><a href="/{{ elem.ico }}"><b>{{ elem.ico }}</b></a></td> </tr> <tr> <td>Spisová značka:</td> - <td>{{elem.statutarni_organ.company.oddil}} {{elem.statutarni_organ.company.vlozka}} vedená u {{elem.statutarni_organ.company.soud}}</td> + <td>{{elem.oddil}} {{elem.vlozka}} vedená u {{elem.soud}}</td> <td>Den zápisu:</td> - <td>{{elem.statutarni_organ.company.zapis}}</td> + <td>{{elem.zapis}}</td> </tr> </table> diff --git a/templates/trivia.html b/templates/trivia.html index 5bc274a..750706c 100644 --- a/templates/trivia.html +++ b/templates/trivia.html @@ -9,6 +9,6 @@ <p><a href="/most_common_purpose">Seznam nejčastějších účelů</a></p> <p><a href="/most_common_business">Seznam nejčastějších předmětů podnikání</a></p> <p><a href="/most_common_activity">Seznam nejčastějších předmětů činnosti</a></p> - +<p><a href="/most_common_degree">Seznam nejčastějších titulů</a></p> {% include 'footer.html' %}
\ No newline at end of file |