Skip to content

Commit

Permalink
Truncate t.task output in task table (+ composer require twig/string-…
Browse files Browse the repository at this point in the history
…extra)
  • Loading branch information
Rayvented committed Nov 21, 2023
1 parent af0e75a commit 4d97c7a
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 2 deletions.
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
"twig/cssinliner-extra": "^3.0",
"twig/extra-bundle": "^2.12|^3.0",
"twig/inky-extra": "^3.0",
"twig/string-extra": "^3.7",
"twig/twig": "^2.0",
"vich/uploader-bundle": "^1.13"
},
Expand Down
69 changes: 68 additions & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion templates/task/index.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<tr class="{{ rowClass }}" data-href="{{ path('task_edit', {'id': t.id}) }}">
<td>{{ t.id }}</td>
<td>{{ t.title }}</td>
<td>{{ t.task|raw }}</td>
<td>{{ t.task|striptags|replace({'&nbsp;' : ' '})|u.truncate(20, '...') }}</td>
<td>{{ t.prioString }}</td>
<td>
{% trans from 'general' %}createdAt{% endtrans %}: {{ t.createdAt|date('d.m.Y') }}{% if t.endDate %}
Expand Down

0 comments on commit 4d97c7a

Please sign in to comment.