summaryrefslogtreecommitdiff
path: root/chimere/templates/chimere/feeds/rss.html
blob: 53b0a49b25276f6376dbd535406cf7af6c0940fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
{% extends "chimere/base.html" %}
{% load i18n chimere_tags %}

{% block extra_head %}
    {{ block.super }}
    {% head_jquery %}
    {% head_chimere %}
    {{form.media}}
{% endblock %}

{% block content %}
<fieldset class='edit'>
<legend>{% trans "Subscribe to RSS feed" %}</legend>

<p class='warning'>{{ error_message }}</p>

<form method='post' id='rss_form' name='rss_form' action=''>
{%if not category_rss_feed %}
<div class="fieldWrapper">
    <label for="rss_category">{% trans "Type of RSS feed" %}</label>
    <select name='rss_category' id='rss_category' onchange='document.forms["rss_form"].submit();'>
        <option value=""> -- </option>
        <option value="global">{% trans "All new points of interest" %}</option>
        <option value="poi">{% trans "New points of interest by category" %}</option>
        <option value="area">{% trans "New points of interest by area" %}</option>
    </select>
</div>
{% endif %}

{%ifequal category_rss_feed "category" %}
<h3>{% trans "New points of interest by category" %}</h3>
<div class="fieldWrapper">
    <label for="id_subcategory">{% trans "Choose a category" %}</label>
    <select name='subcategory' id='subcategory' onchange='document.forms["rss_form"].submit();'>
        <option value=""> -- </option>
        {% for cat_subcat in sub_categories %}
        <option value ="cat_{{cat_subcat.0.id}}"> ---- {{cat_subcat.0.name}}  ----
            {% for sub_category in cat_subcat.1 %}
            <option value='{{sub_category.id}}'{% ifequal sub_category.id current_category %} selected='selected'{% endifequal %}>
            {% trans sub_category.name %}
            </option>{% endfor %}
        </option>{% endfor %}
    </select>
</div>
{% endifequal %}

{%ifequal category_rss_feed "area" %}
<h3>{% trans "New points of interest by area" %}</h3>
{% if area_id %}
<div class="fieldWrapper">
    <h4>{% trans "Choose a pre-defined areas" %}</h4>
    <select name='id_area' id='id_area' onchange='document.forms["rss_form"].submit();'>
        <option value="" selected="selected"> ---- </option>
        {% for areaID in area_id %}
        <option value="{{areaID.id}}">{{areaID.name}}</option>
        {% endfor %}
    </select>
</div>

</form>

<form method='post' action=''>
{% endif %}
<div class='fieldWrapper'>
<H4>{% trans "Or select the area by zooming and panning this map" %}</h4>
<div class="map">
   {{form.area}}
</div>
</div>
<p><input type="submit" value="{% trans "Validate" %}" /></p>
{% endifequal %}

</form>

</fieldset>
{% endblock %}