{% extends 'layout.html' %} {% block title %}Kijiji Manager{% endblock %} {% block content %}

Welcome back, {{ name }}!Repost all ads

{% if 'ad:ad' in data['ad:ads'] %} {% set ads = data['ad:ads']['ad:ad'] %} {#- If only one ad, make it an array of one member in for loop #} {% if ads|islist == false %} {% set ads = [ads] %} {% endif -%} {% for ad in ads %} {% endfor %} {% endif %}
Image Ad ID Title Category Price Views Page Created Expires Repost Delete
{{ ad['@id'] }} {{ ad['ad:title'] }} {{ ad['cat:category']['cat:id-name'] }} {%- if 'ad:price' in ad -%} {%- if ad['ad:price']['types:price-type']['types:value'] == 'SPECIFIED_AMOUNT' -%} {%- if 'types:currency-iso-code' in ad['ad:price'] -%} {{ ad['ad:price']['types:currency-iso-code']['types:value']['@localized-label'] }}{{ ad['ad:price']['types:amount'] }} {%- else -%} {{ '$%s' % ad['ad:price']['types:amount'] if ad['ad:price']['types:amount'] is not none else '' }} {%- endif -%} {%- else -%} {{ ad['ad:price']['types:price-type']['types:value'] }} {%- endif -%} {%- endif -%} {{ ad['ad:view-ad-count'] }} {{ ad['ad:rank']|adpage }} {{ ad['ad:start-date-time']|datetime }} {{ ad['ad:end-date-time']|datetime }}
{% endblock %}