8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-28 15:42:25 +00:00

Limit length of displayed diff

This commit is contained in:
Jean-Romain Garnier 2020-04-24 16:45:37 +00:00 committed by Supelec Rezo Rennes
parent 968551e50b
commit 0c0ad39cc4
2 changed files with 7 additions and 4 deletions

View file

@ -71,11 +71,11 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<strong>{{ edit.0 }}</strong><br/> <strong>{{ edit.0 }}</strong><br/>
{% elif edit.1 is None %} {% elif edit.1 is None %}
<strong>{{ edit.0 }}:</strong> <strong>{{ edit.0 }}:</strong>
<i class="text-success"> {{ edit.2 }}</i><br/> <i class="text-success"> {{ edit.2|truncatechars:50 }}</i><br/>
{% else %} {% else %}
<strong>{{ edit.0 }}:</strong> <strong>{{ edit.0 }}:</strong>
<i class="text-danger"> {{ edit.1 }} </i> <i class="text-danger"> {{ edit.1|truncatechars:50 }} </i>
<i class="text-success">{{ edit.2 }}</i><br/> <i class="text-success">{{ edit.2|truncatechars:50 }}</i><br/>
{% endif %} {% endif %}
{% endfor %} {% endfor %}
</td> </td>

View file

@ -177,7 +177,10 @@ def stats_logs(request):
pagination_number = GeneralOption.get_cached_value("pagination_number") pagination_number = GeneralOption.get_cached_value("pagination_number")
revisions = re2o_paginator(request, revisions, pagination_number) revisions = re2o_paginator(request, revisions, pagination_number)
revisions = map(RevisionAction, revisions)
# Only do this now so it's not applied to objects which aren't displayed
# It can take a bit of time because it has to compute the diff of each version
revisions.object_list = [RevisionAction(r) for r in revisions.object_list]
return render(request, "logs/stats_logs.html", {"revisions_list": revisions}) return render(request, "logs/stats_logs.html", {"revisions_list": revisions})
return render(request, "logs/search_stats_logs.html", {"actions_form": actions_form}) return render(request, "logs/search_stats_logs.html", {"actions_form": actions_form})