Skip to content

Commit

Permalink
Style item history
Browse files Browse the repository at this point in the history
  • Loading branch information
Rayvented committed Nov 28, 2023
1 parent dcd1492 commit 51bcebc
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 5 deletions.
14 changes: 14 additions & 0 deletions assets/styles/tailmater.css
Original file line number Diff line number Diff line change
Expand Up @@ -1143,4 +1143,18 @@ trix-editor ol, .editor-output ol, ol.initial {

#client_request #back a {
@apply mb-5;
}

ol.item-history {
@apply text-sm card-outlined w-full max-w-2xl;
list-style: decimal;
list-style-position: outside;
}

ol.item-history li {
@apply mb-1 pl-1 ml-4;
}

ol.item-history li:last-of-type {
@apply mb-0;
}
8 changes: 6 additions & 2 deletions templates/tom/__history.html.twig
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{% trans_default_domain 'tom' %}
<a href="{{ path('tom_edit',{'tom':p.id}) }}"><span>{{ p.createdAt|date('d.m.Y H:i') }} -- {{ p.titel }}-- {{ p.user.email }} {{ p.approved?'versionApproved' |trans([], 'general') }}</span></a>
<li>
<a href="{{ path('tom_edit',{'tom':p.id}) }}">
{{ p.createdAt|date('d.m.Y H:i') }} -- {{ p.titel }}-- {{ p.user.email }} {{ p.approved?'versionApproved' |trans([], 'general') }}
</a>
</li>
{% if p.previous %}
{{ include('tom/__history.html.twig', {'p':p.previous}) }}
{% endif %}
{% endif %}
6 changes: 3 additions & 3 deletions templates/tom/edit.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
{{ include('tom/__form.html.twig') }}
<p class="text-muted mt-5 text-sm">{% trans from 'general' %}createdBy{% endtrans %}: {{ tom.user.email }}</p>
{% if tom.previous %}
<div>
<h2>{% trans from 'general' %}history{% endtrans %}</h2>
<h3 class="mt-10">{% trans from 'general' %}history{% endtrans %}</h3>
<ol class="item-history" reversed>
{{ include('tom/__history.html.twig', {'p':tom.previous}) }}
</div>
</ol>
{% endif %}
{{ include('base/__snack.html.twig') }}
{% endblock %}

0 comments on commit 51bcebc

Please sign in to comment.