I just wanted to have different colors for the different enum values in my DataTable. I also need th:text
for my filter I created.
What can I do so that I can use th:text
and keep my span formatting?
<td class="incident" th:text="${ticket.getStatus().toString()}">
<a th:if="${ticket.getStatus().toString()} == 'OPEN'">
<span th:text="${ticket.getStatus().toString()}" class="badge text-white" style="background-color: #F93154"></span>
</a>
<a th:if="${ticket.getStatus().toString()} == 'IN_PROCESS'">
<span th:text="${ticket.getStatus().toString()}" class="badge text-white" style="background-color: #FFEA00"></span>
</a>
<a th:if="${ticket.getStatus().toString()} == 'CLOSED'">
<span th:text="${ticket.getStatus().toString()}" class="badge text-white" style="background-color: #00E676"></span>
</a>
</td>