summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@peacefrogs.net>2012-08-20 21:25:08 +0200
committerÉtienne Loks <etienne.loks@peacefrogs.net>2012-08-20 21:25:08 +0200
commitce0340030c1b35e81903ab78024c5f7caa067af6 (patch)
tree2db8c7fddba57f8492cd6aeedf0f675aa180adf8
parent7d739ad85f9b83b0a3692e1b184cb7047b5fb66b (diff)
parent98f5da135ccfe9ede29f137f1470024ad296a7bf (diff)
downloadChimère-ce0340030c1b35e81903ab78024c5f7caa067af6.tar.bz2
Chimère-ce0340030c1b35e81903ab78024c5f7caa067af6.zip
Merge branch 'master' into eds
Conflicts: chimere/locale/fr/LC_MESSAGES/django.po chimere/templates/chimere/edit.html
-rw-r--r--chimere/locale/fr/LC_MESSAGES/django.po212
-rw-r--r--chimere/migrations/0026_auto__add_field_marker_submiter_name__add_field_route_submiter_name.py (renamed from chimere/migrations/0027_auto__add_field_propertymodel_mandatory.py)22
-rw-r--r--chimere/migrations/0027_auto__add_field_propertymodel_mandatory__chg_field_marker_submiter_com.py (renamed from chimere/migrations/0026_auto.py)27
-rw-r--r--chimere/models.py4
-rw-r--r--chimere/templates/chimere/edit.html25
-rw-r--r--chimere/views.py6
6 files changed, 194 insertions, 102 deletions
diff --git a/chimere/locale/fr/LC_MESSAGES/django.po b/chimere/locale/fr/LC_MESSAGES/django.po
index aefce64..4462ff1 100644
--- a/chimere/locale/fr/LC_MESSAGES/django.po
+++ b/chimere/locale/fr/LC_MESSAGES/django.po
@@ -7,18 +7,18 @@ msgid ""
msgstr ""
"Project-Id-Version: 0.2\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-08-20 20:12+0200\n"
+"POT-Creation-Date: 2012-08-20 21:17+0200\n"
"PO-Revision-Date: 2010-03-20 20:00+0100\n"
"Last-Translator: Étienne Loks <etienne.loks@peacefrogs.net>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: __init__.py:8 models.py:500
+#: __init__.py:8 models.py:502
msgid "Multimedia files"
msgstr "Fichiers multimedias"
-#: __init__.py:9 models.py:549
+#: __init__.py:9 models.py:551
msgid "Picture files"
msgstr "Fichiers d'image"
@@ -124,22 +124,22 @@ msgid "Bad file format: this must be a GPX or KML file"
msgstr "Mauvais format de fichier : KML et GPX sont supportés"
#: forms.py:396 models.py:49 models.py:102 models.py:123 models.py:136
-#: models.py:150 models.py:233 models.py:447 models.py:490 models.py:534
-#: models.py:565 models.py:802 models.py:814 models.py:899
+#: models.py:150 models.py:233 models.py:449 models.py:492 models.py:536
+#: models.py:567 models.py:804 models.py:816 models.py:901
#: templates/chimere/edit.html:39 templates/chimere/edit_route.html:36
msgid "Name"
msgstr "Nom"
-#: forms.py:405 models.py:851
+#: forms.py:405 models.py:853
msgid "Area"
msgstr "Zone"
-#: models.py:50 models.py:124 models.py:151 models.py:242 models.py:451
-#: models.py:820 models.py:901
+#: models.py:50 models.py:124 models.py:151 models.py:244 models.py:453
+#: models.py:822 models.py:903
msgid "Available"
msgstr "Disponible"
-#: models.py:51 models.py:910
+#: models.py:51 models.py:912
msgid "Date"
msgstr "Date"
@@ -163,8 +163,8 @@ msgstr "Thème de couleur"
msgid "Code"
msgstr "Code"
-#: models.py:112 models.py:125 models.py:155 models.py:492 models.py:541
-#: models.py:819 models.py:888 models.py:900
+#: models.py:112 models.py:125 models.py:155 models.py:494 models.py:543
+#: models.py:821 models.py:890 models.py:902
msgid "Order"
msgstr "Ordre"
@@ -176,15 +176,15 @@ msgstr "Couleur"
msgid "Category"
msgstr "Catégorie"
-#: models.py:137 models.py:443 models.py:535 models.py:630
+#: models.py:137 models.py:445 models.py:537 models.py:632
msgid "Image"
msgstr "Image"
-#: models.py:139 models.py:537 models.py:632
+#: models.py:139 models.py:539 models.py:634
msgid "Height"
msgstr "Hauteur"
-#: models.py:140 models.py:538 models.py:633
+#: models.py:140 models.py:540 models.py:635
msgid "Width"
msgstr "Largeur"
@@ -196,7 +196,7 @@ msgstr "Icône"
msgid "Marker"
msgstr "Point d'intérêt"
-#: models.py:157 models.py:626 models.py:641
+#: models.py:157 models.py:628 models.py:643
#: templates/chimere/edit_route.html:27
msgid "Route"
msgstr "Trajet"
@@ -221,7 +221,7 @@ msgstr "Sous-catégories"
msgid "Importer type"
msgstr "Type d'import"
-#: models.py:214 models.py:253
+#: models.py:214 models.py:255
msgid "Source"
msgstr "Source"
@@ -254,210 +254,214 @@ msgid "Submitter session key"
msgstr "Clé de session du demandeur"
#: models.py:237
+msgid "Submitter name or nickname"
+msgstr "Nom ou pseudo du demandeur"
+
+#: models.py:239
msgid "Submitter email"
msgstr "Courriel du demandeur"
-#: models.py:239
+#: models.py:241
msgid "Submitter comment"
msgstr "Commentaire du demandeur"
-#: models.py:241
+#: models.py:243
msgid "Submited"
msgstr "Soumis"
-#: models.py:243
+#: models.py:245
msgid "Modified"
msgstr "Modifié"
-#: models.py:244
+#: models.py:246
msgid "Disabled"
msgstr "Désactivé"
-#: models.py:245
+#: models.py:247
msgid "Imported"
msgstr "Importé"
-#: models.py:246
+#: models.py:248
msgid "Excluded"
msgstr "Exclu"
-#: models.py:248
+#: models.py:250
msgid "Status"
msgstr "État"
-#: models.py:249
+#: models.py:251
msgid "Import key"
msgstr "Clé d'import"
-#: models.py:251
+#: models.py:253
msgid "Import version"
msgstr "Version de l'import"
-#: models.py:256 templates/chimere/edit.html:56
+#: models.py:258 templates/chimere/edit.html:56
#: templates/chimere/edit_route.html:52
msgid "Start date"
msgstr "Date de début"
-#: models.py:257
+#: models.py:259
msgid "Not mandatory. Set it for dated item such as event. Format YYYY-MM-DD"
msgstr ""
"Optionnel. Précisez ce champ pour les éléments datés comme un événement. "
"Format du champ : AAAA-MM-JJ"
-#: models.py:259 templates/chimere/edit.html:62
+#: models.py:261 templates/chimere/edit.html:62
#: templates/chimere/edit_route.html:58
msgid "End date"
msgstr "Date de fin"
-#: models.py:260
+#: models.py:262
msgid ""
"Not mandatory. Set it only if you have a multi-day event. Format YYYY-MM-DD"
msgstr ""
"Optionnel. Précisez ce champ seulement pour des événements durant plusieurs "
"jours. Format du champ : AAAA-MM-JJ"
-#: models.py:292
+#: models.py:294
msgid "Reference marker"
msgstr "Point d'intérêt de référence"
-#: models.py:293
+#: models.py:295
msgid "Localisation"
msgstr "Localisation"
-#: models.py:295
+#: models.py:297
msgid "Available Date"
msgstr "Date de mise en disponibilité"
-#: models.py:299 templates/chimere/edit.html:49
+#: models.py:301 templates/chimere/edit.html:49
#: templates/chimere/edit_route.html:46
msgid "Description"
msgstr "Description"
-#: models.py:347 models.py:930
+#: models.py:349 models.py:932
msgid "Point of interest"
msgstr "Point d'intérêt"
-#: models.py:441
+#: models.py:443
msgid "Audio"
msgstr "Audio"
-#: models.py:442
+#: models.py:444
msgid "Video"
msgstr "Vidéo"
-#: models.py:444
+#: models.py:446
msgid "Other"
msgstr "Autre"
-#: models.py:445
+#: models.py:447
msgid "Media type"
msgstr "Type de media"
-#: models.py:448
+#: models.py:450
msgid "Mime type"
msgstr "Type mime"
-#: models.py:450
+#: models.py:452
msgid "Inside an iframe"
msgstr "À l'intérieur d'un iframe"
-#: models.py:454
+#: models.py:456
msgid "Multimedia type"
msgstr "Type de multimedia"
-#: models.py:455
+#: models.py:457
msgid "Multimedia types"
msgstr "Types de multimedia"
-#: models.py:491
+#: models.py:493
msgid "Url"
msgstr "Url"
-#: models.py:494 models.py:539
+#: models.py:496 models.py:541
msgid "Display inside the description?"
msgstr "Apparaît dans la description ?"
-#: models.py:499
+#: models.py:501
msgid "Multimedia file"
msgstr "Fichier multimedia"
-#: models.py:548
+#: models.py:550
msgid "Picture file"
msgstr "Fichier d'image"
-#: models.py:566
+#: models.py:568
msgid "Raw file (gpx or kml)"
msgstr "Fichier brut (gpx ou kml)"
-#: models.py:567
+#: models.py:569
msgid "Simplified file"
msgstr "Fichier simplifié"
-#: models.py:569
+#: models.py:571
msgid "KML"
msgstr "KML"
-#: models.py:569
+#: models.py:571
msgid "GPX"
msgstr "GPX"
-#: models.py:574
+#: models.py:576
msgid "Route file"
msgstr "Fichier de trajet"
-#: models.py:575
+#: models.py:577
msgid "Route files"
msgstr "Fichiers de trajet"
-#: models.py:625
+#: models.py:627
msgid "Reference route"
msgstr "Trajet de référence"
-#: models.py:629
+#: models.py:631
msgid "Associated file"
msgstr "Fichier associé"
-#: models.py:803
+#: models.py:805
msgid "Layer code"
msgstr "Code pour la couche"
-#: models.py:809
+#: models.py:811
msgid "Layer"
msgstr "Couche"
-#: models.py:815
+#: models.py:817
msgid "Area urn"
msgstr "Urn de la zone"
-#: models.py:817 templates/chimere/blocks/welcome.html:3
+#: models.py:819 templates/chimere/blocks/welcome.html:3
msgid "Welcome message"
msgstr "Message d'accueil"
-#: models.py:821
+#: models.py:823
msgid "Upper left corner"
msgstr "Coin en haut à gauche"
-#: models.py:823
+#: models.py:825
msgid "Lower right corner"
msgstr "Coin en bas à droite"
-#: models.py:825
+#: models.py:827
msgid "Default area"
msgstr "Zone par défaut"
-#: models.py:826
+#: models.py:828
msgid "Only one area is set by default"
msgstr "Seule une zone est définie par défaut"
-#: models.py:830
+#: models.py:832
msgid "Sub-categories checked by default"
msgstr "Sous-catégories cochées par défaut"
-#: models.py:832
+#: models.py:834
msgid "Sub-categories dynamicaly displayed"
msgstr "Sous-categories affichées dynamiquement"
-#: models.py:833
+#: models.py:835
msgid ""
"If checked, categories are only displayed in the menu if they are available "
"on the current extent."
@@ -465,68 +469,68 @@ msgstr ""
"Si coché, les catégories sont disponibles sur le menu seulement si elles "
"apparaissent sur la zone affichée."
-#: models.py:837 models.py:904
+#: models.py:839 models.py:906
msgid "Restricted to theses sub-categories"
msgstr "Restreindre à ces sous-categories"
-#: models.py:838
+#: models.py:840
msgid "If no sub-category is set all sub-categories are available"
msgstr ""
"Si aucune sous-catégorie n'est définie toutes les sous-catégories sont "
"disponibles"
-#: models.py:840
+#: models.py:842
msgid "Link to an external CSS"
msgstr "Lien vers une feuille de style externe"
-#: models.py:842
+#: models.py:844
msgid "Restrict to the area extent"
msgstr "Restreindre à l'étendue de la zone"
-#: models.py:889
+#: models.py:891
msgid "Default layer"
msgstr "Couche par défaut"
-#: models.py:893 models.py:894
+#: models.py:895 models.py:896
msgid "Layers"
msgstr "Couches"
-#: models.py:902
+#: models.py:904
msgid "Mandatory"
msgstr "Obligatoire"
-#: models.py:905
+#: models.py:907
msgid ""
"If no sub-category is set all the property applies to all sub-categories"
msgstr ""
"Si aucune sous-catégorie n'est précisée, cette propriété est disponible pour "
"toutes les sous-catégories"
-#: models.py:907
+#: models.py:909
msgid "Text"
msgstr "Texte"
-#: models.py:908
+#: models.py:910
msgid "Long text"
msgstr "Texte long"
-#: models.py:909
+#: models.py:911
msgid "Password"
msgstr "Mot de passe"
-#: models.py:915
+#: models.py:917
msgid "Type"
msgstr "Type"
-#: models.py:920 models.py:932
+#: models.py:922 models.py:934
msgid "Property model"
msgstr "Modèle de propriété"
-#: models.py:933
+#: models.py:935
msgid "Value"
msgstr "Valeur"
-#: models.py:937
+#: models.py:939
msgid "Property"
msgstr "Propriété"
@@ -626,19 +630,19 @@ msgstr ""
msgid "Bad param"
msgstr "Mauvais paramètre"
-#: views.py:223
+#: views.py:229
msgid "There are missing field(s) and/or errors in the submited form."
msgstr "Il y a des champs manquants ou des erreurs dans ce formulaire."
-#: views.py:306
+#: views.py:312
msgid "Bad file. Please check it with an external software."
msgstr "Fichier incohérent. Merci de le vérifier avec un logiciel externe."
-#: views.py:428
+#: views.py:434
msgid "Comments/request on the map"
msgstr "Commentaires/requètes sur la carte"
-#: views.py:431
+#: views.py:437
msgid ""
"Thank you for your contribution. It will be taken into account. If you have "
"left your email you may be contacted soon for more details."
@@ -647,15 +651,15 @@ msgstr ""
"laissé votre courriel vous serez peut-être contacté bientôt pour plus de "
"détails."
-#: views.py:435
+#: views.py:441
msgid "Temporary error. Renew your message later."
msgstr "Erreur temporaire. Réenvoyez votre message plus tard."
-#: views.py:566
+#: views.py:572
msgid "No category available in this area."
msgstr "Pas de catégorie disponible sur cette zone."
-#: views.py:673
+#: views.py:679
msgid "Incorrect choice in the list"
msgstr "Choix incorrect dans la liste"
@@ -810,8 +814,8 @@ msgid "Error"
msgstr "Erreur"
#: templates/chimere/edit.html:24
-msgid "Add/modify a site"
-msgstr "Ajouter ou modifier un site"
+msgid "Add/modify a point of interest"
+msgstr "Ajout d'un point d'intérêt"
#: templates/chimere/edit.html:30
msgid "Point"
@@ -829,7 +833,32 @@ msgstr "indique un champ obligatoire"
msgid "Categories"
msgstr "Catégories"
-#: templates/chimere/edit.html:111 templates/chimere/edit_route.html:77
+#: templates/chimere/edit.html:113
+msgid "Personal information"
+msgstr "Informations personnelles"
+
+#: templates/chimere/edit.html:115
+msgid ""
+"This fields are not mandatory. If you provided them they not will be made "
+"public and they will only used to join you for this project."
+msgstr ""
+"Ces champs ne sont pas obligatoires. Si vous les renseignez, ils ne seront "
+"pas publiés et ne seront utilisés seulement pour vous joindre dans le cadre "
+"de ce projet."
+
+#: templates/chimere/edit.html:118
+msgid "Your name or nickname"
+msgstr "Votre nom ou pseudo"
+
+#: templates/chimere/edit.html:123
+msgid "Your email"
+msgstr "Votre courriel"
+
+#: templates/chimere/edit.html:128
+msgid "Comments about your submission"
+msgstr "Commentaires au sujet de votre proposition"
+
+#: templates/chimere/edit.html:133 templates/chimere/edit_route.html:77
msgid "Propose"
msgstr "Proposez"
@@ -961,6 +990,9 @@ msgstr "Ou sélectionner une zone en zoomant et en se déplaçant sur cette cart
#~ msgid "Submit a modification"
#~ msgstr "Proposer une modification"
+#~ msgid "Add/modify a site"
+#~ msgstr "Ajouter ou modifier un site"
+
#~ msgid "Categorys"
#~ msgstr "Catégories"
diff --git a/chimere/migrations/0027_auto__add_field_propertymodel_mandatory.py b/chimere/migrations/0026_auto__add_field_marker_submiter_name__add_field_route_submiter_name.py
index ce0a21b..9965ec1 100644
--- a/chimere/migrations/0027_auto__add_field_propertymodel_mandatory.py
+++ b/chimere/migrations/0026_auto__add_field_marker_submiter_name__add_field_route_submiter_name.py
@@ -8,15 +8,23 @@ from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
- # Adding field 'PropertyModel.mandatory'
- db.add_column('chimere_propertymodel', 'mandatory',
- self.gf('django.db.models.fields.BooleanField')(default=False),
+ # Adding field 'Marker.submiter_name'
+ db.add_column('chimere_marker', 'submiter_name',
+ self.gf('django.db.models.fields.CharField')(max_length=40, null=True, blank=True),
+ keep_default=False)
+
+ # Adding field 'Route.submiter_name'
+ db.add_column('chimere_route', 'submiter_name',
+ self.gf('django.db.models.fields.CharField')(max_length=40, null=True, blank=True),
keep_default=False)
def backwards(self, orm):
- # Deleting field 'PropertyModel.mandatory'
- db.delete_column('chimere_propertymodel', 'mandatory')
+ # Deleting field 'Marker.submiter_name'
+ db.delete_column('chimere_marker', 'submiter_name')
+
+ # Deleting field 'Route.submiter_name'
+ db.delete_column('chimere_route', 'submiter_name')
models = {
@@ -109,6 +117,7 @@ class Migration(SchemaMigration):
'status': ('django.db.models.fields.CharField', [], {'max_length': '1'}),
'submiter_comment': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}),
'submiter_email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'null': 'True', 'blank': 'True'}),
+ 'submiter_name': ('django.db.models.fields.CharField', [], {'max_length': '40', 'null': 'True', 'blank': 'True'}),
'submiter_session_key': ('django.db.models.fields.CharField', [], {'max_length': '40', 'null': 'True', 'blank': 'True'})
},
'chimere.multimediafile': {
@@ -160,10 +169,8 @@ class Migration(SchemaMigration):
'Meta': {'ordering': "('order',)", 'object_name': 'PropertyModel'},
'available': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'mandatory': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '150'}),
'order': ('django.db.models.fields.IntegerField', [], {}),
- 'subcategories': ('chimere.widgets.SelectMultipleField', [], {'symmetrical': 'False', 'related_name': "'properties'", 'blank': 'True', 'to': "orm['chimere.SubCategory']"}),
'type': ('django.db.models.fields.CharField', [], {'max_length': '1'})
},
'chimere.route': {
@@ -184,6 +191,7 @@ class Migration(SchemaMigration):
'status': ('django.db.models.fields.CharField', [], {'max_length': '1'}),
'submiter_comment': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}),
'submiter_email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'null': 'True', 'blank': 'True'}),
+ 'submiter_name': ('django.db.models.fields.CharField', [], {'max_length': '40', 'null': 'True', 'blank': 'True'}),
'submiter_session_key': ('django.db.models.fields.CharField', [], {'max_length': '40', 'null': 'True', 'blank': 'True'}),
'width': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'})
},
diff --git a/chimere/migrations/0026_auto.py b/chimere/migrations/0027_auto__add_field_propertymodel_mandatory__chg_field_marker_submiter_com.py
index 3282105..53ee3d4 100644
--- a/chimere/migrations/0026_auto.py
+++ b/chimere/migrations/0027_auto__add_field_propertymodel_mandatory__chg_field_marker_submiter_com.py
@@ -8,6 +8,11 @@ from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
+ # Adding field 'PropertyModel.mandatory'
+ db.add_column('chimere_propertymodel', 'mandatory',
+ self.gf('django.db.models.fields.BooleanField')(default=False),
+ keep_default=False)
+
# Adding M2M table for field subcategories on 'PropertyModel'
db.create_table('chimere_propertymodel_subcategories', (
('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
@@ -17,11 +22,26 @@ class Migration(SchemaMigration):
db.create_unique('chimere_propertymodel_subcategories', ['propertymodel_id', 'subcategory_id'])
+ # Changing field 'Marker.submiter_comment'
+ db.alter_column('chimere_marker', 'submiter_comment', self.gf('django.db.models.fields.TextField')(max_length=200, null=True))
+
+ # Changing field 'Route.submiter_comment'
+ db.alter_column('chimere_route', 'submiter_comment', self.gf('django.db.models.fields.TextField')(max_length=200, null=True))
+
def backwards(self, orm):
+ # Deleting field 'PropertyModel.mandatory'
+ db.delete_column('chimere_propertymodel', 'mandatory')
+
# Removing M2M table for field subcategories on 'PropertyModel'
db.delete_table('chimere_propertymodel_subcategories')
+ # Changing field 'Marker.submiter_comment'
+ db.alter_column('chimere_marker', 'submiter_comment', self.gf('django.db.models.fields.CharField')(max_length=200, null=True))
+
+ # Changing field 'Route.submiter_comment'
+ db.alter_column('chimere_route', 'submiter_comment', self.gf('django.db.models.fields.CharField')(max_length=200, null=True))
+
models = {
'chimere.area': {
'Meta': {'ordering': "('order', 'name')", 'object_name': 'Area'},
@@ -110,8 +130,9 @@ class Migration(SchemaMigration):
'route': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'associated_marker'", 'null': 'True', 'to': "orm['chimere.Route']"}),
'start_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}),
'status': ('django.db.models.fields.CharField', [], {'max_length': '1'}),
- 'submiter_comment': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}),
+ 'submiter_comment': ('django.db.models.fields.TextField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}),
'submiter_email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'null': 'True', 'blank': 'True'}),
+ 'submiter_name': ('django.db.models.fields.CharField', [], {'max_length': '40', 'null': 'True', 'blank': 'True'}),
'submiter_session_key': ('django.db.models.fields.CharField', [], {'max_length': '40', 'null': 'True', 'blank': 'True'})
},
'chimere.multimediafile': {
@@ -163,6 +184,7 @@ class Migration(SchemaMigration):
'Meta': {'ordering': "('order',)", 'object_name': 'PropertyModel'},
'available': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'mandatory': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '150'}),
'order': ('django.db.models.fields.IntegerField', [], {}),
'subcategories': ('chimere.widgets.SelectMultipleField', [], {'symmetrical': 'False', 'related_name': "'properties'", 'blank': 'True', 'to': "orm['chimere.SubCategory']"}),
@@ -184,8 +206,9 @@ class Migration(SchemaMigration):
'route': ('chimere.widgets.RouteField', [], {}),
'start_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}),
'status': ('django.db.models.fields.CharField', [], {'max_length': '1'}),
- 'submiter_comment': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}),
+ 'submiter_comment': ('django.db.models.fields.TextField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}),
'submiter_email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'null': 'True', 'blank': 'True'}),
+ 'submiter_name': ('django.db.models.fields.CharField', [], {'max_length': '40', 'null': 'True', 'blank': 'True'}),
'submiter_session_key': ('django.db.models.fields.CharField', [], {'max_length': '40', 'null': 'True', 'blank': 'True'}),
'width': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'})
},
diff --git a/chimere/models.py b/chimere/models.py
index f4c7311..ca608e8 100644
--- a/chimere/models.py
+++ b/chimere/models.py
@@ -234,9 +234,11 @@ class GeographicItem(models.Model):
categories = SelectMultipleField(SubCategory)
submiter_session_key = models.CharField(_(u"Submitter session key"),
blank=True, null=True, max_length=40)
+ submiter_name = models.CharField(_(u"Submitter name or nickname"),
+ blank=True, null=True, max_length=40)
submiter_email = models.EmailField(_(u"Submitter email"), blank=True,
null=True)
- submiter_comment = models.CharField(_(u"Submitter comment"), max_length=200,
+ submiter_comment = models.TextField(_(u"Submitter comment"), max_length=200,
blank=True, null=True)
STATUS = (('S', _(u'Submited')),
('A', _(u'Available')),
diff --git a/chimere/templates/chimere/edit.html b/chimere/templates/chimere/edit.html
index e8cf323..447de71 100644
--- a/chimere/templates/chimere/edit.html
+++ b/chimere/templates/chimere/edit.html
@@ -21,7 +21,7 @@
<p>{{ error_message }}</p>
{% endif %}</fieldset>
<fieldset class='edit'>
- <legend>{% trans "Add/modify a site" %}</legend>
+ <legend>{% trans "Add/modify a point of interest" %}</legend>
<form enctype="multipart/form-data" method='post' action='.'>
{% csrf_token %}
<div class='rightWrapper'>
@@ -108,8 +108,29 @@
$('#id_categories').change();
</script>
{% endif %}
- <p><input type='submit' onclick='saveExtent();' value="{% trans 'Propose'%}"/></p>
</div>
+ <div class='personalform'>
+ <h3>{% trans "Personal information"%}</h3>
+ <div class='warning'>
+ {% trans "This fields are not mandatory. If you provided them they not will be made public and they will only used to join you for this project."%}
+ </div>
+ <div class="fieldWrapper">
+ <label for="id_submiter_name">{% trans "Your name or nickname"%}</label>
+ {% if form.submiter_name.errors %}<div class='errors'>{{ form.submiter_name.errors }}</div>{% endif %}
+ {{ form.submiter_name }}
+ </div>
+ <div class="fieldWrapper">
+ <label for="id_submiter_email">{% trans "Your email"%}</label>
+ {% if form.submiter_email.errors %}<div class='errors'>{{ form.submiter_email.errors }}</div>{% endif %}
+ {{ form.submiter_email }}
+ </div>
+ <div class="fieldWrapper">
+ <label for="id_submiter_comment">{% trans "Comments about your submission"%}</label>
+ {% if form.submiter_comment.errors %}<div class='errors'>{{ form.submiter_comment.errors }}</div>{% endif %}
+ {{ form.submiter_comment }}
+ </div>
+ </div>
+ <p><input type='submit' onclick='saveExtent();' value="{% trans 'Propose'%}"/></p>
</form>
</fieldset>
</div>
diff --git a/chimere/views.py b/chimere/views.py
index cad10dc..3150258 100644
--- a/chimere/views.py
+++ b/chimere/views.py
@@ -166,6 +166,12 @@ def get_edit_page(redirect_url, item_cls, item_form):
init_multi = init_item.get_init_multi() if init_item else None
init_picture = init_item.get_init_picture() if init_item else None
+ if init_item and not request.user.is_superuser and \
+ not init_item.submiter_session_key == \
+ request.session.session_key:
+ # hide personal information
+ for k in ('submiter_name', 'submiter_email', 'submiter_comment'):
+ setattr(init_item, k, '')
# If the form has been submited
if request.method == 'POST':
inst = None