list.html 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. {% extends "admin/admin/list.html" %}
  2. {% block table_row scoped %}
  3. <td>
  4. <strong class="lead{% if not item.user %} muted{% endif %}">{% if item.user -%}
  5. <a href="{{ url('user', username=item.user.username_slug, user=item.user.id) }}">{{ item.user.username }}</a>
  6. {%- elif item.crawler -%}
  7. {{ item.crawler }}
  8. {%- else -%}
  9. {% trans %}Guest{% endtrans %}
  10. {%- endif %}</strong> <strong class="muted">{{ item.ip }}</strong> {% if item.user -%}
  11. <span class="label label-success">{% trans %}Registered Member{% endtrans %}</span>{% if item.hitten %} <span class="label label-info">{% trans %}Hidden{% endtrans %}</span>{% endif %}
  12. {%- elif item.crawler -%}
  13. <span class="label label-inverse">{% trans %}Crawler{% endtrans %}</span>
  14. {%- endif %}
  15. <div class="muted">{{ item.agent }}</div>
  16. </td>
  17. <td>
  18. {{ item.start|date("DATETIME_FORMAT") }}
  19. </td>
  20. <td>
  21. {{ item.last|date("TIME_FORMAT") }}
  22. </td>
  23. {% endblock %}
  24. {% block search_form %}
  25. {{ form_theme.row(search_form.ip_address, attrs={
  26. 'class': 'span3',
  27. 'placeholder': _("IP begins with..."),
  28. }) }}
  29. {{ form_theme.row(search_form.username, attrs={
  30. 'class': 'span3',
  31. 'placeholder': _("Username begings with..."),
  32. }) }}
  33. {{ form_theme.row(search_form.useragent, attrs={
  34. 'class': 'span3',
  35. 'placeholder': _("User Agent contains..."),
  36. }) }}
  37. {{ form_theme.row(search_form.type, attrs={'class': 'span3'}) }}
  38. {% endblock %}