Commits

Roger Haase  committed d7b6ecf

restructure 3 templates to pass coding-std.py indentation checks

  • Participants
  • Parent commits bfb5a9f

Comments (0)

Files changed (3)

File MoinMoin/templates/mail/content_diff.html

         {% 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 %}
-            {% if line[:2] == "+ " %}
-                <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>
-            {% elif line[:2] == "- " -%}
-                <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>
-            {% elif line[:2] == "@@" -%}
-                <td style="font-family:monospace; width:1.2em;"></td>
-                <td style="font-family:monospace;">{{ line }}</td>
-            {% else -%}
-                <td style="font-family:monospace; width:1.2em;"></td>
-                <td style="font-family:monospace;">{{ line[2:] }}</td>
-            {%- endif %}
-            </tr>
         {%- endfor %}
     </table>
 {% endmacro %}

File MoinMoin/templates/mail/meta_diff.html

         {% for change in diff -%}
             {% if change[0] == "insert" -%}
                 <tr style="color:#00B000; height:1.2em;">
-                {% set marker = '+' -%}
+                    <td style="font-family:monospace; width:1.2em; vertical-align:top;"> + </td>
+                    <td style="font-family:monospace;">
+                        <ins style="text-decoration:none;">
+                            {{ change[1] | join(".") }}{% if change[1] -%}:{%- endif %}
+                            {{ change[2] }}
+                        </ins>
+                    </td>
+                </tr>
             {% elif change[0] == "delete" -%}
                 <tr style="color:#991111; height:1.2em;">
-                {% set marker = '-' -%}
+                    <td style="font-family:monospace; width:1.2em; vertical-align:top;"> - </td>
+                    <td style="font-family:monospace;">
+                        <del style="text-decoration:none;">
+                            {{ change[1] | join(".") }}{% if change[1] -%}:{%- endif %}
+                            {{ change[2] }}
+                        </del>
+                    </td>
+                </tr>
             {%- endif %}
-                <td style="font-family:monospace; width:1.2em; vertical-align:top;">{{ marker }}</td>
-                <td style="font-family:monospace;">
-                {% if change[0] == "insert" -%}
-                    <ins style="text-decoration:none;">
-                        {{ change[1] | join(".") }}{% if change[1] -%}:{%- endif %}
-                        {{ change[2] }}
-                    </ins>
-                {% elif change[0] == "delete" -%}
-                    <del style="text-decoration:none;">
-                        {{ change[1] | join(".") }}{% if change[1] -%}:{%- endif %}
-                        {{ change[2] }}
-                    </del>
-                {% endif %}
-                </td>
-            </tr>
         {%- endfor %}
     </table>
 {% endmacro %}

File MoinMoin/templates/utils.html

 {% macro show_editor_info(info) %}
     {%- if info.uri -%}
         <a href="{{ info.uri }}" class="{{ info.css }}" title="{{ info.title }}">
+            {{ info.text }}
+        </a>
     {%- elif info.email -%}
         <a href="mailto:{{ info.email }}" class="{{ info.css }}" title="{{ info.title }}">
+            {{ info.text }}
+        </a>
     {%- else -%}
         <span class="{{ info.css }}" title="{{ info.title }}">
-    {%- endif -%}
-    {{ info.text }}
-    {%- if info.uri or info.email -%}
-        </a>
-    {%- else -%}
+            {{ info.text }}
         </span>
     {%- endif -%}
 {% endmacro %}