mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-17 13:32:15 +00:00
Also: - Find and replace panel -> card - Some base template work - gulpfile things, added dep on django-gulp
35 lines
1.1 KiB
HTML
35 lines
1.1 KiB
HTML
{# pass in variable "change" to this template #}
|
|
{% if change.linebreaks and change.new and change.old %}
|
|
{% for diff in change.diff %}
|
|
{% if diff.type == "insert" %}
|
|
<ins class="dont-break-out">{{ diff.text|linebreaksbr }}</ins>
|
|
{% elif diff.type == "delete" %}
|
|
<del class="dont-break-out">{{diff.text|linebreaksbr}}</del>
|
|
{% else %}
|
|
<span class="dont-break-out">{{diff.text|linebreaksbr}}</span>
|
|
{% endif %}
|
|
{% endfor %}
|
|
{% else %}
|
|
{% if change.old %}
|
|
<del {% if change.long %}class="overflow-ellipsis"{% endif %}>
|
|
{% if change.linebreaks %}
|
|
{{change.old|linebreaksbr}}
|
|
{% else %}
|
|
{{change.old}}
|
|
{% endif %}
|
|
</del>
|
|
{% endif %}
|
|
{% if change.new and change.old %}
|
|
<br/>
|
|
{% endif %}
|
|
{% if change.new %}
|
|
<ins {% if change.long %}class="overflow-ellipsis"{% endif %}>
|
|
{% if change.linebreaks %}
|
|
{{change.new|linebreaksbr}}
|
|
{% else %}
|
|
{{change.new}}
|
|
{% endif %}
|
|
</ins>
|
|
{% endif %}
|
|
{% endif %}
|