/modules/mod_logging/templates/_admin_log_row.tpl

http://github.com/zotonic/zotonic · Smarty Template · 25 lines · 25 code · 0 blank · 0 comment · 7 complexity · 460d039577a5d6167df535006f18a8e3 MD5 · raw file

  1. {% with signal_props.log_id|default:id as id %}
  2. {% with m.log[id] as l %}
  3. <div class="alert alert-{{ l.type|default:"info" }}">
  4. <div class="pull-right">
  5. {% if l.user_id %}
  6. <a href="{% url admin_edit_rsc id=l.user_id %}">{{ m.rsc[l.user_id].title }}</a> @
  7. {% endif %}
  8. {{ l.created|date:_"d M Y, H:i" }}
  9. </div>
  10. <h5>
  11. {% if l.type %}{{ l.type }}{% if l.module %} &mdash; {% endif %}{% endif %}
  12. {% if l.module %}{{ l.module|default:"-" }}{% if l.line %}:{{ l.line }}{% endif %}{% endif %}
  13. </h5>
  14. <div>
  15. {% if l.message|length > 200 %}
  16. <pre>
  17. {{ l.message|truncate:255|force_escape|linebreaksbr }}
  18. </pre>
  19. {% else %}
  20. {{ l.message|force_escape|linebreaksbr }}
  21. {% endif %}
  22. </div>
  23. </div>
  24. {% endwith %}
  25. {% endwith %}