| 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 %} |
| @@ -69,19 +69,21 @@ |
| {% macro display_subscriptions(subscriptions) %} |
|
kzar
2015/09/09 12:23:35
The logic in this macro is getting increasingly ha
Thomas Greiner
2015/09/15 13:21:05
I agree, that this entire template is quite convol
|
| {%- set current_type = subscriptions[0]["type"] -%} |
| - <h2>{{ get_string("type_" + current_type, "subscriptions") }}</h2> |
| + <h2 id="type_{{ current_type }}">{{ get_string("type_" + current_type, "subscriptions") }}</h2> |
| <table class="subscriptions"> |
| {%- for subscription in subscriptions|subscription_sort -%} |
| - {%- if not subscription["supplements"] -%} |
| + {%- if not subscription["supplements"] or current_type != subscription["type"] -%} |
| {%- if current_type != subscription["type"] -%} |
| {%- 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 %} |