Skip to content

Commit

Permalink
Desgin a lot of index pages (set title, cta, data table)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rayvented committed Nov 16, 2023
1 parent 3ed5078 commit 82bf1a1
Show file tree
Hide file tree
Showing 17 changed files with 385 additions and 393 deletions.
4 changes: 2 additions & 2 deletions assets/styles/dataTablesApp.css
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@ table.dataTable > tbody {
@apply divide-y divide-surface-200 bg-white;
}

table.dataTable > tbody > tr:nth-child(odd) > td {
table.dataTable > tbody > tr:not(.row-color):nth-child(odd) > td {
@apply bg-surface-50;
}

table.dataTable > tbody > tr:nth-child(even) > td {
table.dataTable > tbody > tr:not(.row-color):nth-child(even) > td {
@apply bg-white;
}

Expand Down
5 changes: 3 additions & 2 deletions templates/audit_tom/index.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@
<tbody>
{% for a in audit %}
<tr data-href='{{ path('audit_tom_edit',{'tom':a.id}) }}'
style="background-color: {{ a.status.color }}">
<th scope="row">{{ a.nummer }}</th>
style="background-color: {{ a.status.color }}"
class="row-color">
<td>{{ a.nummer }}</td>
<td>{{ a.frage }}</td>
<td>{% for ab in a.abteilung %}{{ ab.name }}<br>{% endfor %}</td>
<td>{{ a.kategorie | trans }}</td>
Expand Down
69 changes: 34 additions & 35 deletions templates/client_request/indexInternal.html.twig
Original file line number Diff line number Diff line change
@@ -1,47 +1,46 @@
{% extends 'base.html.twig' %}
{% trans_default_domain 'client_request' %}

{% block title %}
{% trans %}request.all{% endtrans %}
{% endblock %}

{% block CTA %}
{% if currentTeam.slug %}
<a href="{{ path('client_new',{'slug':currentTeam.slug}) }}">
<span>{% trans %}request.create.link{% endtrans %}</span>
<a href="{{ path('client_new',{'slug':currentTeam.slug}) }}" class="btn btn-create">
{% trans %}request.create.link{% endtrans %}
</a>
<a target="_blank" href="{{ path('client_index',{'slug':currentTeam.slug}) }}">
<span>{% trans %}customerPortal{% endtrans %}</span>
<a target="_blank" href="{{ path('client_index',{'slug':currentTeam.slug}) }}" class="btn">
{% trans %}customerPortal{% endtrans %}
</a>
{% endif %}
{% endblock %}

{% block body %}
<h2>{% trans %}request.all{% endtrans %}</h2>
<div>
<div>
<table id="data-table">
<thead>
<tr>
<th scope="col">{% trans from 'general' %}uuid{% endtrans %}</th>
<th scope="col">{% trans from 'general' %}regard{% endtrans %}</th>
<th scope="col">{% trans from 'general' %}date{% endtrans %}</th>
<th scope="col">{% trans from 'general' %}email{% endtrans %}</th>
<th scope="col">{% trans from 'general' %}name{% endtrans %}</th>
<th scope="col">{% trans from 'general' %}reason{% endtrans %}</th>
<th scope="col">{% trans from 'general' %}state{% endtrans %}</th>
</tr>
</thead>
<tbody>
{% for a in client %}
<tr data-href='{{ path('client_requests_show',{'id':a.id}) }}'>
<th scope="row">{{ a.uuid }}</th>
<td>{{ a.title }}</td>
<td>{{ a.createdAt|date('d.m.Y') }}</td>
<td>{{ a.email }}</td>
<td>{{ a.name }}</td>
<td>{{ a.itemString }}</td>
<td>{{ a.activ?'Aktiv':'Archiviert' }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
<table id="data-table" class="dataTable">
<thead>
<tr>
<th scope="col">{% trans from 'general' %}uuid{% endtrans %}</th>
<th scope="col">{% trans from 'general' %}regard{% endtrans %}</th>
<th scope="col">{% trans from 'general' %}date{% endtrans %}</th>
<th scope="col">{% trans from 'general' %}email{% endtrans %}</th>
<th scope="col">{% trans from 'general' %}name{% endtrans %}</th>
<th scope="col">{% trans from 'general' %}reason{% endtrans %}</th>
<th scope="col">{% trans from 'general' %}state{% endtrans %}</th>
</tr>
</thead>
<tbody>
{% for a in client %}
<tr data-href='{{ path('client_requests_show',{'id':a.id}) }}'>
<td>{{ a.uuid }}</td>
<td>{{ a.title }}</td>
<td>{{ a.createdAt|date('d.m.Y') }}</td>
<td>{{ a.email }}</td>
<td>{{ a.name }}</td>
<td>{{ a.itemString }}</td>
<td>{{ a.activ?'Aktiv':'Archiviert' }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endblock %}
57 changes: 26 additions & 31 deletions templates/datenweitergabe/__indexTable.html.twig
Original file line number Diff line number Diff line change
@@ -1,32 +1,27 @@
{% trans_default_domain 'datenweitergabe' %}
<h2>{{ titel }}</h2>
<div>
<div>
<table id="data-table">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">{% trans from 'general' %}fileNumber{% endtrans %}</th>
<th scope="col">{% trans from 'general' %}object{% endtrans %}</th>
<th scope="col">{% trans from 'general' %}responsible{% endtrans %}</th>
<th scope="col">{% trans from 'general' %}contact{% endtrans %}</th>
<th scope="col">{% trans from 'general' %}subscriptionDate{% endtrans %}</th>
<th scope="col">{% trans from 'general' %}approved{% endtrans %}</th>
</tr>
</thead>
<tbody>
{% for t in table %}
<tr data-href='{{ path('datenweitergabe_edit',{'id':t.id}) }}'>
<th scope="row">{{ t.nummer }}</th>
<td>{{ t.reference }}</td>
<td>{{ t.gegenstand }}</td>
<td>{{ t.verantwortlich }}</td>
<td>{{ t.kontakt.firma }} (id:{{ t.kontakt.id }})</td>
<td>{{ t.zeichnungsdatum|date('Y.m.d') }}</td>
<td>{{ t.approved?'yes':'no' | trans( [], 'general') }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
<table id="data-table" class="dataTable">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">{% trans from 'general' %}fileNumber{% endtrans %}</th>
<th scope="col">{% trans from 'general' %}object{% endtrans %}</th>
<th scope="col">{% trans from 'general' %}responsible{% endtrans %}</th>
<th scope="col">{% trans from 'general' %}contact{% endtrans %}</th>
<th scope="col">{% trans from 'general' %}subscriptionDate{% endtrans %}</th>
<th scope="col">{% trans from 'general' %}approved{% endtrans %}</th>
</tr>
</thead>
<tbody>
{% for t in table %}
<tr data-href='{{ path('datenweitergabe_edit',{'id':t.id}) }}'>
<td>{{ t.nummer }}</td>
<td>{{ t.reference }}</td>
<td>{{ t.gegenstand }}</td>
<td>{{ t.verantwortlich }}</td>
<td>{{ t.kontakt.firma }} (id:{{ t.kontakt.id }})</td>
<td>{{ t.zeichnungsdatum|date('Y.m.d') }}</td>
<td>{{ t.approved?'yes':'no' | trans( [], 'general') }}</td>
</tr>
{% endfor %}
</tbody>
</table>
11 changes: 7 additions & 4 deletions templates/datenweitergabe/index.html.twig
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
{% extends 'base.html.twig' %}
{% trans_default_domain 'datenweitergabe' %}

{% block title %}{{ titel }}{% endblock %}

{% block CTA %}
<a href="{{ path('datenweitergabe_new') }}">
<span>{% trans %}dataTransfer.create{% endtrans %}</span>
<a href="{{ path('datenweitergabe_new') }}" class="btn btn-create">
{% trans %}dataTransfer.create{% endtrans %}
</a>
<!-- Button trigger modal -->
<button type="button" data-toggle="modal" data-target="#centralModalMd">

<button type="button" data-toggle="modal" data-target="#centralModalMd" class="btn">
{% trans %}info{% endtrans %}
</button>
{% endblock %}
Expand Down
9 changes: 6 additions & 3 deletions templates/datenweitergabe/indexAuftragsverarbeitung.html.twig
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
{% extends 'base.html.twig' %}
{% trans_default_domain 'datenweitergabe' %}

{% block title %}{{ titel }}{% endblock %}

{% block CTA %}
<a href="{{ path('auftragsverarbeitung_new') }}">
<span>{% trans %}requestProcessing.create{% endtrans %}</span>
<a href="{{ path('auftragsverarbeitung_new') }}" class="btn btn-create">
{% trans %}requestProcessing.create{% endtrans %}
</a>
<!-- Button trigger modal -->
<button type="button" data-toggle="modal" data-target="#centralModalMd">
<button type="button" data-toggle="modal" data-target="#centralModalMd" class="btn">
{% trans %}info{% endtrans %}
</button>
{% endblock %}
Expand Down
73 changes: 34 additions & 39 deletions templates/forms/__indexTable.html.twig
Original file line number Diff line number Diff line change
@@ -1,40 +1,35 @@
{% trans_default_domain 'forms' %}
<h2>{{ titel }}</h2>
<div>
<div>
<table id="data-table">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">{% trans from 'general' %}title{% endtrans %}</th>
<th scope="col">{% trans from 'general' %}state{% endtrans %}</th>
<th scope="col">{% trans from 'general' %}version{% endtrans %}</th>
<th scope="col">{% trans from 'general' %}description{% endtrans %}</th>
<th scope="col">{% trans from 'general' %}products{% endtrans %}</th>
<th scope="col">{% trans from 'general' %}department.words{% endtrans %}</th>
<th scope="col">{% trans from 'general' %}date{% endtrans %}</th>
</tr>
</thead>
<tbody>
{% for t in table %}
<tr data-href='{{ path('forms_edit',{'id':t.id}) }}'>
<th scope="row">{{ t.id }}</th>
<td>{{ t.title }}</td>
<td>
{% if t.approved %}
{% trans from 'general' %}approved{% endtrans %}
{% else %}
{{ t.statusString }}
{% endif %}
</td>
<td>{{ t.version }}</td>
<td>{{ t.description }}</td>
<td>{% if t.products %}{% for de in t.products %}{{ de.name }}<br>{% endfor %}{% endif %}</td>
<td>{% if t.departments %}{% for de in t.departments %}{{ de.name }}<br>{% endfor %}{% endif %}</td>
<td>{{ t.createdAt|date('Y.m.d') }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
<table id="data-table" class="dataTable">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">{% trans from 'general' %}title{% endtrans %}</th>
<th scope="col">{% trans from 'general' %}state{% endtrans %}</th>
<th scope="col">{% trans from 'general' %}version{% endtrans %}</th>
<th scope="col">{% trans from 'general' %}description{% endtrans %}</th>
<th scope="col">{% trans from 'general' %}products{% endtrans %}</th>
<th scope="col">{% trans from 'general' %}department.words{% endtrans %}</th>
<th scope="col">{% trans from 'general' %}date{% endtrans %}</th>
</tr>
</thead>
<tbody>
{% for t in table %}
<tr data-href="{{ path('forms_edit',{'id':t.id}) }}">
<td>{{ t.id }}</td>
<td>{{ t.title }}</td>
<td>
{% if t.approved %}
{% trans from 'general' %}approved{% endtrans %}
{% else %}
{{ t.statusString }}
{% endif %}
</td>
<td>{{ t.version }}</td>
<td>{{ t.description }}</td>
<td>{% if t.products %}{% for de in t.products %}{{ de.name }}<br>{% endfor %}{% endif %}</td>
<td>{% if t.departments %}{% for de in t.departments %}{{ de.name }}<br>{% endfor %}{% endif %}</td>
<td>{{ t.createdAt|date('Y.m.d') }}</td>
</tr>
{% endfor %}
</tbody>
</table>
9 changes: 7 additions & 2 deletions templates/forms/index.html.twig
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
{% extends 'base.html.twig' %}
{% trans_default_domain 'forms' %}

{% block title %}
{{ titel }}
{% endblock %}

{% block CTA %}
<a href="{{ path('forms_new') }}">
<span>{% trans %}newForm{% endtrans %}</span>
<a href="{{ path('forms_new') }}" class="btn btn-create">
{% trans %}newForm{% endtrans %}
</a>
{% endblock %}

Expand Down
9 changes: 7 additions & 2 deletions templates/forms/indexAuftragsverarbeitung.html.twig
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
{% extends 'base.html.twig' %}
{% trans_default_domain 'forms' %}

{% block title %}
{{ titel }}
{% endblock %}

{% block CTA %}
<a href="{{ path('auftragsverarbeitung_new') }}">
<span>{% trans %}taskProcessing.create{% endtrans %}</span>
<a href="{{ path('auftragsverarbeitung_new') }}" class="btn btn-create">
{% trans %}taskProcessing.create{% endtrans %}
</a>
{% endblock %}

Expand Down
68 changes: 33 additions & 35 deletions templates/kontakt/index.html.twig
Original file line number Diff line number Diff line change
@@ -1,43 +1,41 @@
{% extends 'base.html.twig' %}
{% trans_default_domain 'kontakt' %}

{% block title %}{{ title }}{% endblock %}

{% block CTA %}
<a href="{{ path('kontakt_new') }}">
<span>{{ title }} {% trans %}create{% endtrans %}</span>
<a href="{{ path('kontakt_new') }}" class="btn btn-create">
{{ title }} {% trans %}create{% endtrans %}
</a>
{% endblock %}

{% block body %}
<h2>{{ title }}</h2>
<div>
<div>
<table id="data-table">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">{% trans %}company{% endtrans %}</th>
<th scope="col">{% trans from 'general' %}name{% endtrans %}</th>
<th scope="col">{% trans %}location{% endtrans %}</th>
<th scope="col">{% trans %}function{% endtrans %}</th>
</tr>
</thead>
<tbody>
{% for k in kontakte %}
<tr data-href='{{ path('kontakt_edit',{'id':k.id}) }}'>
<th scope="row">{{ k.nummer }}</th>
<td>{{ k.firma }}</td>
<td>{{ k.nachname }}</td>
<td>{{ k.ort }}</td>
<td>
{% if k.art == 1 %}
{% trans %}client{% endtrans %}
{% elseif k.art == 2 %}
{% trans %}contractor{% endtrans %}
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
<table id="data-table" class="dataTable">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">{% trans %}company{% endtrans %}</th>
<th scope="col">{% trans from 'general' %}name{% endtrans %}</th>
<th scope="col">{% trans %}location{% endtrans %}</th>
<th scope="col">{% trans %}function{% endtrans %}</th>
</tr>
</thead>
<tbody>
{% for k in kontakte %}
<tr data-href='{{ path('kontakt_edit',{'id':k.id}) }}'>
<td>{{ k.nummer }}</td>
<td>{{ k.firma }}</td>
<td>{{ k.nachname }}</td>
<td>{{ k.ort }}</td>
<td>
{% if k.art == 1 %}
{% trans %}client{% endtrans %}
{% elseif k.art == 2 %}
{% trans %}contractor{% endtrans %}
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endblock %}
Loading

0 comments on commit 82bf1a1

Please sign in to comment.