[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Maposmatic-dev] [PATCH maposmatic] Allow custom naming of maps by admin
From: |
Maxime Petazzoni |
Subject: |
[Maposmatic-dev] [PATCH maposmatic] Allow custom naming of maps by administrative boundary |
Date: |
Mon, 21 Jun 2010 14:00:40 +0200 |
Signed-off-by: Maxime Petazzoni <address@hidden>
---
www/maposmatic/forms.py | 5 +++--
www/media/style.css | 7 +++++++
www/templates/maposmatic/new.html | 7 +++++--
3 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/www/maposmatic/forms.py b/www/maposmatic/forms.py
index ecbdea6..dad1f1c 100644
--- a/www/maposmatic/forms.py
+++ b/www/maposmatic/forms.py
@@ -85,8 +85,9 @@ class MapRenderingJobForm(forms.ModelForm):
self._errors["administrative_city"] =
forms.util.ErrorList([msg])
del cleaned_data["administrative_city"]
- # No choice, the map title is always the name of the city
- cleaned_data["maptitle"] = city
+ # Unless a specific map title is given, use the administrative city
+ # name as the map title.
+ cleaned_data["maptitle"] = title or city
# Make sure that bbox and admin modes are exclusive
cleaned_data["lat_upper_left"] = None
diff --git a/www/media/style.css b/www/media/style.css
index 77a80c3..7981e38 100644
--- a/www/media/style.css
+++ b/www/media/style.css
@@ -439,6 +439,13 @@ a.selectedletter {
color: #444;
}
+p.byadmin_maptitle_help {
+ font-style: italic;
+ font-size: smaller;
+ width: 600px;
+ margin: 0; padding: 0;
+}
+
p.bbox_select_help {
font-style: italic;
font-size: smaller;
diff --git a/www/templates/maposmatic/new.html
b/www/templates/maposmatic/new.html
index a179c84..ee99b8f 100644
--- a/www/templates/maposmatic/new.html
+++ b/www/templates/maposmatic/new.html
@@ -80,11 +80,14 @@ map.{% endblocktrans %}
{{ form.administrative_city.errors }}
</td></tr>
- <tr class="bybbox label"><td>{% trans "Title of the map:" %}</td></tr>
- <tr class="bybbox field"><td>
+ <tr class="label"><td>{% trans "Title of the map:" %}</td></tr>
+ <tr class="field"><td>
{{ form.maptitle }}
{{ form.maptitle.errors }}
</td></tr>
+ <tr class="byadmin field"><td>
+ <p class="byadmin_maptitle_help">{% blocktrans %}If you leave the map
title empty, the city name will be used as the map title.{% endblocktrans %}</p>
+ </td></tr>
<tr class="bybbox label" id="map_language"><td>
{% trans "Map Index Language:" %} {{ form.map_language }}
--
1.6.3.3.341.g9b22d
- [Maposmatic-dev] [PATCH maposmatic] Allow custom naming of maps by administrative boundary,
Maxime Petazzoni <=