view MoinMoin/templates/mail/content_diff.html @ 2765:d7b6ecfa9e8f

restructure 3 templates to pass coding-std.py indentation checks
author RogerHaase <haaserd@gmail.com>
date Tue, 26 Aug 2014 08:04:21 -0700
parents 31628ac3ec21
children
line wrap: on
line source
{% macro content_diff(diff) %}
    <table border="0" cellpadding="0" cellspacing="0" style="margin:0; padding:1em;
            width:100%; font-family:monospace; background-color:#F9F9F9;">
        {% for line in diff -%}
            {% if line[:2] == "+ " -%}
                <tr style="color:#00B000; height:1.2em;">
                    <td style="font-family:monospace; width:1.2em; vertical-align:top;">{{ line[0] }}</td>
                    <td style="font-family:monospace;"><ins style="text-decoration:none;">{{ line[2:] }}</ins></td>
                </tr>
            {% elif line[:2] == "- " -%}
                <tr style="color:#991111; height:1.2em;">
                    <td style="font-family:monospace; width:1.2em; vertical-align:top;">{{ line[0] }}</td>
                    <td style="font-family:monospace;"><del style="text-decoration:none;">{{ line[2:] }}</del></td>
                </tr>
            {% elif line[:2] == "@@" -%}
                <tr style="color:#440088; height:1.2em;">
                    <td style="font-family:monospace; width:1.2em;"></td>
                    <td style="font-family:monospace;">{{ line }}</td>
                </tr>
            {% else -%}
                <tr style="color:#000000; height:1.2em;">
                    <td style="font-family:monospace; width:1.2em;"></td>
                    <td style="font-family:monospace;">{{ line[2:] }}</td>
                </tr>
            {%- endif %}
        {%- endfor %}
    </table>
{% endmacro %}