Files
PyRIGS/RIGS/templates/RIGS/activity_feed_data.html
Tom Price 1eb7ea1181 Move selection logic from template to view
Required adding some extra data to the dict directly.
In theory this should produce better performance.
2015-05-26 00:20:09 +01:00

46 lines
1.6 KiB
HTML

{% extends request.is_ajax|yesno:"base_ajax_nomodal.html,base.html" %}
{% load static %}
{% load paginator from filters %}
{% load to_class_name from filters %}
{% block content %}
{% if request.is_ajax %}
<div class="list-group-item">
<div class="media">
{% for version in object_list %}
{% ifchanged version.revision.user %}
{% if not forloop.first %}
</div> {#/.media-body#}
</div> {#/.media#}
</div>
<div class="list-group-item">
<div class="media">
{% endif %}
<div class="media-left">
<a href="#">
<img class="media-object img-rounded" src="{{ version.revision.user.profile_picture}}" style="max-width: 3em;" />
</a>
</div>
<div class="media-body">
<h5>{{ version.revision.user.name }}</h5>
{% endifchanged %}
<p>
<small>
{% if version.old == None %}
Created
{% else %}
Changed {% include 'RIGS/version_changes.html' %} in
{% endif %}
{% include 'RIGS/object_button.html' with object=version.new %}
</small>
</p>
{% endfor %}
</div>
</div>
</div>
{% endif %}
{% endblock %}