Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: includes/subscriptionList.tmpl

Issue 29326085: Issue 2823 - Display new subscription types on subscriptions page (Closed)
Patch Set: Created Sept. 16, 2015, 12:01 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | locales/en/subscriptions.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: includes/subscriptionList.tmpl
===================================================================
--- a/includes/subscriptionList.tmpl
+++ b/includes/subscriptionList.tmpl
@@ -17,7 +17,7 @@
{%- macro process_subscription(subscription, parent=None) %}
<tr{% if subscription["deprecated"] %} class="deprecated"{% endif %}>
- {%- if subscription["supplements"] %}
+ {%- if parent and subscription["supplements"] %}
<td rowspan="2" class="dummy"></td>
<td rowspan="2">
{%- else %}
@@ -68,20 +68,19 @@
{%- endmacro %}
{% macro display_subscriptions(subscriptions) %}
- {%- set current_type = subscriptions[0]["type"] -%}
- <h2>{{ get_string("type_" + current_type, "subscriptions") }}</h2>
-
- <table class="subscriptions">
{%- for subscription in subscriptions|subscription_sort -%}
- {%- if not subscription["supplements"] -%}
+ {%- if not (subscription["supplements"] and current_type == subscription["type"]) -%}
{%- if current_type != subscription["type"] -%}
+ {%- if current_type %}
+ </table>
+ {%- endif -%}
{%- set current_type = subscription["type"] %}
- </table>
-
- <h2>{{ get_string("type_" + current_type, "subscriptions") }}</h2>
+ <h2 id="type_{{ current_type }}">{{ get_string("type_" + current_type, "subscriptions") }}</h2>
<table class="subscriptions">
{%- endif -%}
+ {%- endif -%}
+ {%- if subscription["type"] not in subscription["supplementsType"] -%}
{{ process_subscription(subscription) }}
{%- endif -%}
{%- endfor %}
« no previous file with comments | « no previous file | locales/en/subscriptions.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld