problems-report.html.twig 1.3 KB

123456789101112131415161718192021222324252627282930313233
  1. <ul class="problems">
  2. {% for problem in problems %}
  3. {% set status = problem.status ? 'success' : problem.level == 'critical' ? 'error' : 'warning' %}
  4. <li class="menu">
  5. <div class="toast toast-{{ status }}">
  6. <strong>{{ problem.id }}:</strong>
  7. {{ problem.msg|raw }}
  8. {% if problem.help %}<a href="{{ problem.help }}" class="btn btn-sm btn-{{ status }}" target="_blank"><i class="icon icon-bookmark"></i> Help</a>{% endif %}
  9. </div>
  10. {% if problem.details is iterable %}
  11. <ul class="details">
  12. {% for key,value in problem.details.errors %}
  13. <li class="menu-item">
  14. <div class="menu-badge">
  15. <label class="label label-error"><i class="icon icon-cross"></i></label>
  16. </div>
  17. <span class="active"><code>{{ key }}</code> - {{ value|raw }}</span>
  18. </li>
  19. {% endfor %}
  20. {% for key,value in problem.details.success %}
  21. <li class="menu-item">
  22. <div class="menu-badge">
  23. <label class="label label-success"><i class="icon icon-check"></i></label>
  24. </div>
  25. <span class=""><code>{{ key }}</code> - {{ value|raw }}</span>
  26. </li>
  27. {% endfor %}
  28. </ul>
  29. {% endif %}
  30. </li>
  31. {% endfor %}
  32. </ul>