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

Side by Side Diff: includes/subscriptionList.tmpl

Issue 5636796054503424: Issue 1170 - [adblockplus.org Anwiki to CMS migration] Migrate content (Closed)
Patch Set: Created Sept. 17, 2014, 8:33 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 {%- macro processSubscription(subscription, parent=None) %}
2 <tr{% if subscription["deprecated"] %} class="deprecated"{% endif %}>
3 {%- if subscription["supplements"] %}
4 <td rowspan="2" class="dummy"></td><td rowspan="2">
5 {%- else %}
6 <td rowspan="2" colspan="2">
7 {%- endif %}
8 <strong class="subscriptionTitle">{{subscription["name"]}}</strong><br />
9 {{subscription["specialization"]}}
10 {%- if subscription["supplements"] %}
11 <br />{{ "supplements_prefix" |translate }} {{' / '.join(subscription["sup plements"])}} {{ "supplements_suffix" |translate }}
12 {%- endif %}
13 </td>
14 <td>
15 {%- if subscription["maintainer"] %}
16 {{ "maintainer_prefix" |translate }} {{subscription["maintainer"]}} {{ "ma intainer_suffix" |translate }}<br />
17 {%- endif %}
18 {%- set isFirst = True %}
19 {% for key in ('homepage', 'forum', 'contact', 'faq', 'blog', 'changelog', 'policy') -%}
20 {%- set url = subscription[key] -%}
21 {%- if url -%}
22 {%- if not isFirst %}, {% endif -%}
23 {%- set isFirst = False -%}
24 <a href="{{url}}">{{key |translate}}</a>
25 {%- endif %}
26 {%- endfor %}
27 </td>
28 </tr>
29 <tr{% if subscription["deprecated"] %} class="deprecated"{% endif %}>
30 <td>
31 {%- if subscription["deprecated"] %}
32 <strong>{{ "deprecation_warning" |translate }}</strong><br />
33 {%- endif %}
34 {{ "subscribe" |translate}}{{' '}}
35 {%- for title, url, complete in subscription["variants"] -%}
36 <a href="abp:subscribe?location={{url|urlencode}}&amp;title={{title|urle ncode}}
37 {%- if parent and not complete -%}
38 {%- set mainTitle, mainURL, mainComplete = parent.variants[0] -%}
39 &amp;requiresLocation={{mainURL|urlencode}}&amp;requiresTitle={{main Title|urlencode}}
40 {%- endif -%}
41 ">{{title}}</a>{%- if not loop.last %}, {% endif -%}
42 {%- endfor %}
43 </td>
44 </tr>
45 {%- if not parent -%}
46 {%- for supplement in subscription["supplemented"] |subscription_sort -%}
47 {{ processSubscription(supplement, subscription) }}
48 {%- endfor -%}
49 {%- endif -%}
50 {%- endmacro %}
51
52 {%- set currentType = subscriptions[0]["type"] -%}
53 <h2>{{ ("type_" + currentType) |translate }}</h2>
54
55 <table class="subscriptions">
56 {%- for subscription in subscriptions |subscription_sort -%}
57 {%- if not subscription["supplements"] -%}
58 {%- if currentType != subscription["type"] -%}
59 {%- set currentType = subscription["type"] %}
60 </table>
61
62 <h2>{{ ("type_" + currentType) |translate }}</h2>
63
64 <table class="subscriptions">
65 {%- endif -%}
66 {{ processSubscription(subscription) }}
67 {%- endif -%}
68 {%- endfor %}
69 </table>
OLDNEW
« filters/unescape.py ('K') | « includes/preftable.tmpl ('k') | includes/subscriptions.tmpl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld