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

Delta Between Two Patch Sets: includes/subscriptionList.tmpl

Issue 5636796054503424: Issue 1170 - [adblockplus.org Anwiki to CMS migration] Migrate content (Closed)
Left Patch Set: Addressed feedback. Created Feb. 20, 2015, 2:54 p.m.
Right Patch Set: Remove includes/common.tmpl which is no longer required. Created March 7, 2015, 7:01 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « includes/preftable.tmpl ('k') | locales/de/known-issues.json » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 {# 1 {#
2 # This file is part of the Adblock Plus website, 2 # This file is part of the Adblock Plus website,
3 # Copyright (C) 2006-2015 Eyeo GmbH 3 # Copyright (C) 2006-2015 Eyeo GmbH
4 # 4 #
5 # Adblock Plus is free software: you can redistribute it and/or modify 5 # Adblock Plus is free software: you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License version 3 as 6 # it under the terms of the GNU General Public License version 3 as
7 # published by the Free Software Foundation. 7 # published by the Free Software Foundation.
8 # 8 #
9 # Adblock Plus is distributed in the hope that it will be useful, 9 # Adblock Plus is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of 10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details. 12 # GNU General Public License for more details.
13 # 13 #
14 # You should have received a copy of the GNU General Public License 14 # You should have received a copy of the GNU General Public License
15 # along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. 15 # along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
16 #} 16 #}
17 17
18 {%- macro process_subscription(subscription, parent=None) %} 18 {%- macro process_subscription(subscription, parent=None) %}
19 <tr{% if subscription["deprecated"] %} class="deprecated"{% endif %}> 19 <tr{% if subscription["deprecated"] %} class="deprecated"{% endif %}>
20 {%- if subscription["supplements"] %} 20 {%- if subscription["supplements"] %}
21 <td rowspan="2" class="dummy"></td> 21 <td rowspan="2" class="dummy"></td>
22 <td rowspan="2"> 22 <td rowspan="2">
23 {%- else %} 23 {%- else %}
24 <td rowspan="2" colspan="2"> 24 <td rowspan="2" colspan="2">
25 {%- endif %} 25 {%- endif %}
26 <strong class="subscriptionTitle">{{subscription["name"]}}</strong><br> 26 <strong class="subscriptionTitle">{{ subscription["name"] }}</strong><br>
27 {{subscription["specialization"]}} 27 {{ subscription["specialization"] }}
28 {%- if subscription["supplements"] %} 28 {%- if subscription["supplements"] %}
29 <br>{{ "supplements_prefix"|translate }} {{' / '.join(subscription["supple ments"])}} {{ "supplements_suffix"|translate }} 29 <br>{{ "supplements_prefix"|translate }} {{ ' / '.join(subscription["suppl ements"]) }} {{ "supplements_suffix"|translate }}
30 {%- endif %} 30 {%- endif %}
31 </td> 31 </td>
32 <td> 32 <td>
33 {%- if subscription["maintainer"] %} 33 {%- if subscription["maintainer"] %}
34 {{ "maintainer_prefix"|translate }} {{subscription["maintainer"]}} {{ "mai ntainer_suffix"|translate }}<br> 34 {{ "maintainer_prefix"|translate }} {{ subscription["maintainer"] }} {{ "m aintainer_suffix"|translate }}<br>
35 {%- endif %} 35 {%- endif %}
36 {%- set is_first = True %} 36 {%- set is_first = True %}
37 {% for key in ('homepage', 'forum', 'contact', 'faq', 'blog', 'changelog', 'policy') -%} 37 {% for key in ('homepage', 'forum', 'contact', 'faq', 'blog', 'changelog', 'policy') -%}
38 {%- set url = subscription[key] -%} 38 {%- set url = subscription[key] -%}
39 {%- if url -%} 39 {%- if url -%}
40 {%- if not is_first %}, {% endif -%} 40 {%- if not is_first %}, {% endif -%}
41 {%- set is_first = False -%} 41 {%- set is_first = False -%}
42 <a href="{{url}}">{{key|translate}}</a> 42 <a href="{{ url }}">{{ key|translate }}</a>
43 {%- endif %} 43 {%- endif %}
44 {%- endfor %} 44 {%- endfor %}
45 </td> 45 </td>
46 </tr> 46 </tr>
47 <tr{% if subscription["deprecated"] %} class="deprecated"{% endif %}> 47 <tr{% if subscription["deprecated"] %} class="deprecated"{% endif %}>
48 <td> 48 <td>
49 {%- if subscription["deprecated"] %} 49 {%- if subscription["deprecated"] %}
50 <strong>{{ "deprecation_warning"|translate }}</strong><br> 50 <strong>{{ "deprecation_warning"|translate }}</strong><br>
51 {%- endif %} 51 {%- endif %}
52 {{ "subscribe"|translate}}{{' '}} 52 {{ "subscribe"|translate }}{{ ' ' }}
53 {%- for title, url, complete in subscription["variants"] -%} 53 {%- for title, url, complete in subscription["variants"] -%}
54 <a href="abp:subscribe?location={{url|urlencode}}&amp;title={{title|urle ncode}} 54 <a href="abp:subscribe?location={{ url|urlencode }}&amp;title={{ title|u rlencode }}
55 {%- if parent and not complete -%} 55 {%- if parent and not complete -%}
56 {%- set main_title, main_url, main_complete = parent.variants[0] -%} 56 {%- set main_title, main_url, main_complete = parent.variants[0] -%}
57 &amp;requiresLocation={{main_url|urlencode}}&amp;requiresTitle={{mai n_title|urlencode}} 57 &amp;requiresLocation={{ main_url|urlencode }}&amp;requiresTitle={{ main_title|urlencode }}
58 {%- endif -%} 58 {%- endif -%}
59 ">{{title}}</a>{%- if not loop.last %}, {% endif -%} 59 ">{{ title }}</a>{%- if not loop.last %}, {% endif -%}
60 {%- endfor %} 60 {%- endfor %}
61 </td> 61 </td>
62 </tr> 62 </tr>
63 {%- if not parent -%} 63 {%- if not parent -%}
64 {%- for supplement in subscription["supplemented"]|subscription_sort -%} 64 {%- for supplement in subscription["supplemented"]|subscription_sort -%}
65 {{ process_subscription(supplement, subscription) }} 65 {{ process_subscription(supplement, subscription) }}
66 {%- endfor -%} 66 {%- endfor -%}
67 {%- endif -%} 67 {%- endif -%}
68 {%- endmacro %} 68 {%- endmacro %}
69 69
70 {%- set current_type = subscriptions[0]["type"] -%} 70 {% macro display_subscriptions(subscriptions) %}
71 {%- set current_type = subscriptions[0]["type"] -%}
71 <h2>{{ ("type_" + current_type)|translate }}</h2> 72 <h2>{{ ("type_" + current_type)|translate }}</h2>
72 73
73 <table class="subscriptions"> 74 <table class="subscriptions">
74 {%- for subscription in subscriptions|subscription_sort -%} 75 {%- for subscription in subscriptions|subscription_sort -%}
75 {%- if not subscription["supplements"] -%} 76 {%- if not subscription["supplements"] -%}
76 {%- if current_type != subscription["type"] -%} 77 {%- if current_type != subscription["type"] -%}
77 {%- set current_type = subscription["type"] %} 78 {%- set current_type = subscription["type"] %}
78 </table> 79 </table>
79 80
80 <h2>{{ ("type_" + current_type)|translate }}</h2> 81 <h2>{{ ("type_" + current_type)|translate }}</h2>
81 82
82 <table class="subscriptions"> 83 <table class="subscriptions">
84 {%- endif -%}
85 {{ process_subscription(subscription) }}
83 {%- endif -%} 86 {%- endif -%}
84 {{ process_subscription(subscription) }} 87 {%- endfor %}
85 {%- endif -%} 88 </table>
86 {%- endfor %} 89 {% endmacro %}
87 </table>
LEFTRIGHT

Powered by Google App Engine
This is Rietveld