summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authoretienne <etienne@9215b0d5-fb2c-4bbd-8d3e-bd2e9090e864>2008-10-22 22:39:53 +0000
committeretienne <etienne@9215b0d5-fb2c-4bbd-8d3e-bd2e9090e864>2008-10-22 22:39:53 +0000
commit030ed86130fabc78695355021b5a0586df3e77b9 (patch)
treebd06e4842c67577829cd433d7621bd22dac12776 /templates
downloadChimère-030ed86130fabc78695355021b5a0586df3e77b9.tar.bz2
Chimère-030ed86130fabc78695355021b5a0586df3e77b9.zip
git-svn-id: http://www.peacefrogs.net/svn/chimere/trunk@1 9215b0d5-fb2c-4bbd-8d3e-bd2e9090e864
Diffstat (limited to 'templates')
-rw-r--r--templates/base.html29
-rw-r--r--templates/detail.html7
-rw-r--r--templates/edit.html51
-rw-r--r--templates/main_map.html23
-rw-r--r--templates/submited.html9
5 files changed, 119 insertions, 0 deletions
diff --git a/templates/base.html b/templates/base.html
new file mode 100644
index 0000000..3f4e0ac
--- /dev/null
+++ b/templates/base.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <title>{% block title %}Chimère{% endblock %}</title>
+ <link rel="stylesheet" href="{{ media_path }}styles.css" />
+ <script type="text/javascript"><!--
+ var media_path = '{{ media_path }}';
+ // --></script>
+ {% block extra_head %}{{extra_head|safe}}{% endblock %}
+</head>
+
+<body>
+ <div id="topbar">
+ <ul id='action'>
+{% for action in actions %}
+ <li{% ifequal action.id action_selected %} id='selected'{% endifequal %}><a href='/{{ action.path }}'>{{ action.label }}</a></li>
+{% endfor %}
+ </ul>
+ </div>
+ <div id="sidebar">
+ {% block sidebar %}{% endblock %}
+ </div>
+ <div id="content">
+ {% block content %}{% endblock %}
+ </div>
+</body>
+</html>
+
diff --git a/templates/detail.html b/templates/detail.html
new file mode 100644
index 0000000..465d775
--- /dev/null
+++ b/templates/detail.html
@@ -0,0 +1,7 @@
+{% load i18n %}
+<h3>{{marker.name}}</h3>
+<div>{%trans marker.subcategory.name%}</div>
+{% if marker.picture %}<img src='{{media_path}}{{marker.picture}}' alt='{{marker.name}}'/>{%endif%}
+<div>{% for property in marker.getProperties %}
+<p id='{{property.propertymodel.getNamedId}}'>{{ property.value }}</p>
+{% endfor %}</div> \ No newline at end of file
diff --git a/templates/edit.html b/templates/edit.html
new file mode 100644
index 0000000..9d3ee8c
--- /dev/null
+++ b/templates/edit.html
@@ -0,0 +1,51 @@
+{% extends "base.html" %}
+{% load i18n %}
+{% block sidebar %}
+{% endblock %}
+
+{% block content %}
+{% if error_message %}<p><strong>{{ error_message }}</strong></p>{% endif %}
+<fieldset class='edit'>
+<legend>{% trans "Add a new site" %}</legend>
+<p>* {% trans "indicates a mandatory field" %}</p>
+<form enctype="multipart/form-data" method='post' action='/chimere/edit/'>
+<div class="fieldWrapper">
+ <label for="id_name">{% trans "Site name"%} *</label>
+ {{ form.name.errors }}
+ {{ form.name }}
+</div>
+<div class="fieldWrapper">
+ <label for="id_subcategory">{% trans "Category" %} *</label>
+ {{ form.subcategory.errors }}
+ <select name='subcategory' id='subcategory'>
+ <option value="">---------</option>
+ {% for cat_subcat in sub_categories %}
+ <optgroup label="{{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 %}
+ </optgroup>{% endfor %}
+ </select>
+</div>
+<div class="fieldWrapper">
+ <label for="id_point">{% trans "Point"%} *</label>
+ {%if form.point.errors %}<ul class="errorlist"><li>{% trans "Select a location for this new site" %}</li></ul>{%endif%}
+ {{form.point}}
+</div>
+<div class="fieldWrapper">
+ <label for="id_picture">{% trans "Image" %}</label>
+ {{ form.picture.errors }}
+ {{ form.picture }}
+</div>
+{%for field in form%}{%for property in properties%}{%ifequal field.name property%}
+<div class="fieldWrapper">
+ <label for="id_{{field.name}}">{% trans field.label %}</label>
+ {{ field.errors }}
+ {{ field }}
+</div>
+{%endifequal%}{%endfor%}{%endfor%}
+<p><input type='submit' value="{% trans 'Propose'%}"/></p>
+</form>
+</fieldset>
+{% endblock %}
diff --git a/templates/main_map.html b/templates/main_map.html
new file mode 100644
index 0000000..3f43131
--- /dev/null
+++ b/templates/main_map.html
@@ -0,0 +1,23 @@
+{% extends "base.html" %}
+{% load i18n %}
+{% block sidebar %}
+<div id='panel'>
+<form method='post' name='frm_categories' id='frm_categories'>
+<ul id='categories'>{% for category, lst_sub_categories in sub_categories %}
+ <li>{% trans category.name %}
+ <ul class='subcategories'>{% for sub_category in lst_sub_categories %}
+ <li><input type='checkbox' onclick='loadMarkers()' name='category_{{sub_category.id}}' id='{{sub_category.id}}'{% if sub_category.selected %} checked='checked'{% endif %}/> <label for='{{sub_category.id}}'><img alt='{{sub_category.name}}' src='{{media_path}}{{sub_category.icon.image}}'/> {% trans sub_category.name %}</label></li>{% endfor %}
+ </ul>
+ </li>{% endfor %}
+</ul>
+</form>
+</div>
+<div id='detail'>
+<h2>{% trans "Detail" %}</h2>
+<div id='detail_content'>
+</div>
+</div>{% endblock %}
+{% block content %}<div id='map'></div>
+<script type='text/javascript'><!--
+init();
+// --> </script>{% endblock %}
diff --git a/templates/submited.html b/templates/submited.html
new file mode 100644
index 0000000..824bd7f
--- /dev/null
+++ b/templates/submited.html
@@ -0,0 +1,9 @@
+{% extends "base.html" %}
+{% load i18n %}
+{% block content %}
+<fieldset class='edit'>
+<legend>{% trans "Add a new site" %}</legend>
+<p>{% trans "Your proposition has been submited. A moderator will treat your submission shortly. Thanks!" %}</p>
+</fieldset>
+{% endblock %}
+