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
No related branches found
No related tags found
No related merge requests found
......@@ -71,6 +71,7 @@ class ContractAdmin(MarkdownxGuardedModelAdmin):
"summary",
"public_state",
"publishing_rejection_comment",
"legal_state",
"primary_contract",
]
}
......@@ -85,10 +86,9 @@ class ContractAdmin(MarkdownxGuardedModelAdmin):
}
),
(
"Administrativa",
"Fyzický dokument",
{
"fields": [
"legal_state",
"paper_form_state",
"filing_area",
]
......@@ -125,7 +125,7 @@ class ContractAdmin(MarkdownxGuardedModelAdmin):
if request.user.is_superuser or request.user.has_perm("approve", self):
fieldsets[0][1]["fields"].insert(
fieldsets[0][1]["fields"].index("publishing_rejection_comment"),
fieldsets[0][1]["fields"].index("primary_contract"),
"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 @@
<td>
<ul class="flex flex-wrap gap-1.5">
{% for signature in contract.signee_signatures.all %}
<li
class="p-1.5 rounded-sm whitespace-nowrap cursor-pointer bg-gray-200 duration-100 hover:bg-gray-300"
>{{ signature.signee.name }}</li>
<li class="flex">
{% include "contracts/includes/tag.html" with url="#TODO" content=signature.signee.name %}
</li>
{% endfor %}
</ul>
</td>
......
......@@ -4,13 +4,14 @@
{% block content %}
<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>
<tr>
<td colspan="2" class="text-lg font-bold">
<i class="ico--info mr-3"></i>Základní informace
</td>
</tr>
{% if contract.id_number %}
<tr>
<td class="w-1/5 !p-2.5">Identifikační číslo</td>
......@@ -23,10 +24,7 @@
<ul class="flex flex-wrap gap-1.5">
{% for type in contract.types.all %}
<li class="flex">
<a
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>
{% include "contracts/includes/tag.html" with url="#TODO" content=type.name %}
</li>
{% endfor %}
</ul>
......@@ -46,6 +44,39 @@
<td class="w-1/5 !p-2.5">Souhrn</td>
<td class="w-4/5 !p-2.5">{{ contract.summary }}</td>
</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>
<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>
......@@ -54,14 +85,32 @@
<td class="w-1/5 !p-2.5">Konec účinnosti</td>
<td class="w-4/5 !p-2.5">{{ contract.valid_end_date }}</td>
</tr>
</tbody>
</table>
<table class="table table-auto w-full table--striped table--bordered mb-7">
<tbody>
<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>
<td colspan="2" class="text-lg font-bold">
<i class="ico--file-pdf mr-3"></i>Fyzický dokument
</td>
</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>
</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>
<td class="w-1/5 !p-2.5">Výběrové řízení</td>
<td class="w-4/5 !p-2.5">
......@@ -96,10 +145,7 @@
<ul class="flex gap-2">
{% for intent in intents %}
<li class="flex">
<a
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>
{% include "contracts/includes/tag.html" with url=intent.url icon="ico--link" content=intent.name %}
</li>
{% endfor %}
</ul>
......@@ -109,23 +155,17 @@
{% endwith %}
</td>
</tr>
<tr>
<td class="w-1/5 !p-2.5">Poznámky</td>
<td class="w-4/5 !p-2.5">
{% 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>
</tr>
{% if contract.cost_amount %}
</tbody>
</table>
{% if contract.cost_amount %}
<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--calculator mr-3"></i>Finance
</td>
</tr>
<tr>
<td class="w-1/5 !p-2.5">Náklady</td>
<td class="w-4/5 !p-2.5">
......@@ -137,30 +177,36 @@
{% endif %}
</td>
</tr>
{% endif %}
<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 %}
</tbody>
</table>
{% 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>
<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">
<ul class="flex gap-2">
{% for file in files %}
{% for issue in issues %}
<li class="flex">
<a
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>
{% include "contracts/includes/tag.html" with url="#TODO" content=issue.name %}
</li>
{% endfor %}
</ul>
{% else %}
<span class="text-grey-200">Žádné</span>
{% endif %}
{% endwith %}
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
{% endif %}
{% endwith %}
<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