Skip to content
Snippets Groups Projects
Commit 7b5f0ffe authored by Tomáš Valenta's avatar Tomáš Valenta
Browse files

clean up and linkify all tags

parent b8659a4b
Branches
No related tags found
No related merge requests found
...@@ -71,6 +71,7 @@ class ContractAdmin(MarkdownxGuardedModelAdmin): ...@@ -71,6 +71,7 @@ class ContractAdmin(MarkdownxGuardedModelAdmin):
"summary", "summary",
"public_state", "public_state",
"publishing_rejection_comment", "publishing_rejection_comment",
"legal_state",
"primary_contract", "primary_contract",
] ]
} }
...@@ -85,10 +86,9 @@ class ContractAdmin(MarkdownxGuardedModelAdmin): ...@@ -85,10 +86,9 @@ class ContractAdmin(MarkdownxGuardedModelAdmin):
} }
), ),
( (
"Administrativa", "Fyzický dokument",
{ {
"fields": [ "fields": [
"legal_state",
"paper_form_state", "paper_form_state",
"filing_area", "filing_area",
] ]
...@@ -125,7 +125,7 @@ class ContractAdmin(MarkdownxGuardedModelAdmin): ...@@ -125,7 +125,7 @@ class ContractAdmin(MarkdownxGuardedModelAdmin):
if request.user.is_superuser or request.user.has_perm("approve", self): if request.user.is_superuser or request.user.has_perm("approve", self):
fieldsets[0][1]["fields"].insert( fieldsets[0][1]["fields"].insert(
fieldsets[0][1]["fields"].index("publishing_rejection_comment"), fieldsets[0][1]["fields"].index("primary_contract"),
"approval_state", "approval_state",
) )
......
<a
class="p-1.5 rounded-sm text-ellipsis bg-gray-200 duration-100 hover:bg-gray-300 hover:no-underline"
href="{{ url }}"
>{% if icon %}<i class="{{ icon }} mr-2"></i>{% endif %}{{ content }}</a>
...@@ -43,9 +43,9 @@ ...@@ -43,9 +43,9 @@
<td> <td>
<ul class="flex flex-wrap gap-1.5"> <ul class="flex flex-wrap gap-1.5">
{% for signature in contract.signee_signatures.all %} {% for signature in contract.signee_signatures.all %}
<li <li class="flex">
class="p-1.5 rounded-sm whitespace-nowrap cursor-pointer bg-gray-200 duration-100 hover:bg-gray-300" {% include "contracts/includes/tag.html" with url="#TODO" content=signature.signee.name %}
>{{ signature.signee.name }}</li> </li>
{% endfor %} {% endfor %}
</ul> </ul>
</td> </td>
......
...@@ -4,13 +4,14 @@ ...@@ -4,13 +4,14 @@
{% block content %} {% block content %}
<h1 class="head-alt-lg mb-10">{{ contract.name }}</h1> <h1 class="head-alt-lg mb-10">{{ contract.name }}</h1>
<table class="table table-auto w-full table--striped table--bordered mb-10"> <table class="table table-auto w-full table--striped table--bordered mb-7">
<tbody> <tbody>
<tr> <tr>
<td colspan="2" class="text-lg font-bold"> <td colspan="2" class="text-lg font-bold">
<i class="ico--info mr-3"></i>Základní informace <i class="ico--info mr-3"></i>Základní informace
</td> </td>
</tr> </tr>
{% if contract.id_number %} {% if contract.id_number %}
<tr> <tr>
<td class="w-1/5 !p-2.5">Identifikační číslo</td> <td class="w-1/5 !p-2.5">Identifikační číslo</td>
...@@ -23,10 +24,7 @@ ...@@ -23,10 +24,7 @@
<ul class="flex flex-wrap gap-1.5"> <ul class="flex flex-wrap gap-1.5">
{% for type in contract.types.all %} {% for type in contract.types.all %}
<li class="flex"> <li class="flex">
<a {% include "contracts/includes/tag.html" with url="#TODO" content=type.name %}
class="p-1.5 rounded-sm whitespace-nowrap bg-gray-200 duration-100 hover:bg-gray-300 hover:no-underline"
href="#TODO"
>{{ type.name }}</a>
</li> </li>
{% endfor %} {% endfor %}
</ul> </ul>
...@@ -46,6 +44,39 @@ ...@@ -46,6 +44,39 @@
<td class="w-1/5 !p-2.5">Souhrn</td> <td class="w-1/5 !p-2.5">Souhrn</td>
<td class="w-4/5 !p-2.5">{{ contract.summary }}</td> <td class="w-4/5 !p-2.5">{{ contract.summary }}</td>
</tr> </tr>
<tr>
<td class="w-1/5 !p-2.5">Právní stav</td>
<td class="w-4/5 !p-2.5">{{ contract.get_legal_state_display }}</td>
</tr>
<tr>
<td class="w-1/5 !p-2.5">Soubory</td>
<td class="w-4/5 !p-2.5">
{% with contract.files.all as files %}
{% if files|length != 0 %}
<ul class="flex gap-2">
{% for file in files %}
<li class="flex">
{% include "contracts/includes/tag.html" with url=file.file.url icon="ico--attachment" content=file.name %}
</li>
{% endfor %}
</ul>
{% else %}
<span class="text-grey-200">Žádné</span>
{% endif %}
{% endwith %}
</td>
</tr>
</tbody>
<table>
<table class="table table-auto w-full table--striped table--bordered mb-7">
<tbody>
<tr>
<td colspan="2" class="text-lg font-bold">
<i class="ico--clock mr-3"></i>Data
</td>
</tr>
<tr> <tr>
<td class="w-1/5 !p-2.5">Začátek účinnosti</td> <td class="w-1/5 !p-2.5">Začátek účinnosti</td>
<td class="w-4/5 !p-2.5">{{ contract.valid_start_date }}</td> <td class="w-4/5 !p-2.5">{{ contract.valid_start_date }}</td>
...@@ -54,14 +85,32 @@ ...@@ -54,14 +85,32 @@
<td class="w-1/5 !p-2.5">Konec účinnosti</td> <td class="w-1/5 !p-2.5">Konec účinnosti</td>
<td class="w-4/5 !p-2.5">{{ contract.valid_end_date }}</td> <td class="w-4/5 !p-2.5">{{ contract.valid_end_date }}</td>
</tr> </tr>
</tbody>
</table>
<table class="table table-auto w-full table--striped table--bordered mb-7">
<tbody>
<tr> <tr>
<td class="w-1/5 !p-2.5">Právní stav</td> <td colspan="2" class="text-lg font-bold">
<td class="w-4/5 !p-2.5">{{ contract.get_legal_state_display }}</td> <i class="ico--file-pdf mr-3"></i>Fyzický dokument
</td>
</tr> </tr>
<tr> <tr>
<td class="w-1/5 !p-2.5">Stav papírové verze</td> <td class="w-1/5 !p-2.5">Stav</td>
<td class="w-4/5 !p-2.5">{{ contract.get_paper_form_state_display }}</td> <td class="w-4/5 !p-2.5">{{ contract.get_paper_form_state_display }}</td>
</tr> </tr>
</tbody>
</table>
<table class="table table-auto w-full table--striped table--bordered mb-7">
<tbody>
<tr>
<td colspan="2" class="text-lg font-bold">
<i class="ico--link mr-3"></i>Odkazy
</td>
</tr>
<tr> <tr>
<td class="w-1/5 !p-2.5">Výběrové řízení</td> <td class="w-1/5 !p-2.5">Výběrové řízení</td>
<td class="w-4/5 !p-2.5"> <td class="w-4/5 !p-2.5">
...@@ -96,10 +145,7 @@ ...@@ -96,10 +145,7 @@
<ul class="flex gap-2"> <ul class="flex gap-2">
{% for intent in intents %} {% for intent in intents %}
<li class="flex"> <li class="flex">
<a {% include "contracts/includes/tag.html" with url=intent.url icon="ico--link" content=intent.name %}
class="p-1.5 rounded-sm text-ellipsis bg-gray-200 duration-100 hover:bg-gray-300 hover:no-underline"
href="{{ intent.url }}"
><i class="ico--link mr-2"></i>{{ intent.name }}</a>
</li> </li>
{% endfor %} {% endfor %}
</ul> </ul>
...@@ -109,23 +155,17 @@ ...@@ -109,23 +155,17 @@
{% endwith %} {% endwith %}
</td> </td>
</tr> </tr>
</tbody>
</table>
{% if contract.cost_amount %}
<table class="table table-auto w-full table--striped table--bordered mb-7">
<tbody>
<tr> <tr>
<td class="w-1/5 !p-2.5">Poznámky</td> <td colspan="2" class="text-lg font-bold">
<td class="w-4/5 !p-2.5"> <i class="ico--calculator mr-3"></i>Finance
{% with contract.issues.all as issues %}
{% if issues|length != 0 %}
<ul class="flex gap-2">
{% for issue in issues %}
<li class="p-1.5 rounded-sm bg-gray-200">{{ issue.name }}</li>
{% endfor %}
</ul>
{% else %}
<span class="text-grey-200">Žádné</span>
{% endif %}
{% endwith %}
</td> </td>
</tr> </tr>
{% if contract.cost_amount %}
<tr> <tr>
<td class="w-1/5 !p-2.5">Náklady</td> <td class="w-1/5 !p-2.5">Náklady</td>
<td class="w-4/5 !p-2.5"> <td class="w-4/5 !p-2.5">
...@@ -137,30 +177,36 @@ ...@@ -137,30 +177,36 @@
{% endif %} {% endif %}
</td> </td>
</tr> </tr>
</tbody>
</table>
{% endif %} {% endif %}
{% with contract.issues.all as issues %}
{% if issues|length != 0 %}
<table class="table table-auto w-full table--striped table--bordered mb-10">
<tbody>
<tr> <tr>
<td class="w-1/5 !p-2.5">Soubory</td> <td colspan="2" class="text-lg font-bold">
<i class="ico--question mr-3"></i>Doplňující informace
</td>
</tr>
<tr>
<td class="w-1/5 !p-2.5">Poznámky</td>
<td class="w-4/5 !p-2.5"> <td class="w-4/5 !p-2.5">
{% with contract.files.all as files %}
{% if files|length != 0 %}
<ul class="flex gap-2"> <ul class="flex gap-2">
{% for file in files %} {% for issue in issues %}
<li class="flex"> <li class="flex">
<a {% include "contracts/includes/tag.html" with url="#TODO" content=issue.name %}
class="p-1.5 rounded-sm bg-gray-200 duration-100 hover:bg-gray-300 hover:no-underline"
href="{{ file.file.url }}"
><i class="ico--attachment mr-2"></i>{{ file.name }}</a>
</li> </li>
{% endfor %} {% endfor %}
</ul> </ul>
{% else %}
<span class="text-grey-200">Žádné</span>
{% endif %}
{% endwith %}
</td> </td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
{% endif %}
{% endwith %}
<h2 class="text-xl font-bold mb-5"><i class="ico--pencil mr-3"></i>Podpisy</h2> <h2 class="text-xl font-bold mb-5"><i class="ico--pencil mr-3"></i>Podpisy</h2>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment