diff options
| -rw-r--r-- | chimere/forms.py | 9 | ||||
| -rw-r--r-- | chimere/locale/fr/LC_MESSAGES/django.po | 320 | ||||
| -rw-r--r-- | chimere/static/chimere/css/styles.css | 8 | ||||
| -rw-r--r-- | chimere/static/chimere/img/feed.png | bin | 0 -> 1453 bytes | |||
| -rw-r--r-- | chimere/static/chimere/js/jquery.chimere.js | 3 | ||||
| -rw-r--r-- | chimere/templates/chimere/detail.html | 3 | ||||
| -rw-r--r-- | chimere/views.py | 7 | ||||
| -rw-r--r-- | example_project/settings.py | 2 |
8 files changed, 197 insertions, 155 deletions
diff --git a/chimere/forms.py b/chimere/forms.py index 20171df..0b74b32 100644 --- a/chimere/forms.py +++ b/chimere/forms.py @@ -53,13 +53,18 @@ class UTC(tzinfo): def dst(self, dt): return ZERO +def getStaffEmails(): + return [u.email for u in + User.objects.filter(is_staff=True).exclude(email="").order_by('id')] + def notifyStaff(subject, body, sender=None): if not settings.EMAIL_HOST: return + user_list = getStaffEmails() + if not user_list: + return if settings.PROJECT_NAME: subject = u'[%s] %s' % (settings.PROJECT_NAME, subject) - user_list = [u.email for u in - User.objects.filter(is_staff=True).exclude(email="").order_by('id')] headers = {} if sender: headers['Reply-To'] = sender diff --git a/chimere/locale/fr/LC_MESSAGES/django.po b/chimere/locale/fr/LC_MESSAGES/django.po index b986cf5..787005b 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-22 14:54+0200\n" +"POT-Creation-Date: 2012-08-26 17:07+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:502 +#: __init__.py:8 models.py:526 msgid "Multimedia files" msgstr "Fichiers multimedias" -#: __init__.py:9 models.py:551 +#: __init__.py:9 models.py:583 msgid "Picture files" msgstr "Fichiers d'image" @@ -86,394 +86,406 @@ msgstr "Nouveaux points d'intérêt de " msgid "Last points of interest by area" msgstr "Nouveaux points d'intérêt par zone" -#: forms.py:76 +#: forms.py:81 msgid "New submission for" msgstr "Nouvelle proposition pour" -#: forms.py:77 +#: forms.py:82 #, python-format msgid "The new item \"%s\" has been submited in the category: " msgstr "Le nouvel élément « %s » a été proposé dans la catégorie : " -#: forms.py:79 +#: forms.py:84 msgid "To valid, precise or unvalid this item: " msgstr "Pour valider, préciser ou rejeter cet élément : " -#: forms.py:89 +#: forms.py:94 msgid "Email (optional)" msgstr "Courriel (optionnel) " -#: forms.py:90 +#: forms.py:95 msgid "Object" msgstr "Objet" -#: forms.py:158 +#: forms.py:163 msgid "End date has been set with no start date" msgstr "Une date de fin a été donnée sans date de début" -#: forms.py:171 +#: forms.py:174 msgid "This field is mandatory for the selected categories" msgstr "Ce champ est obligatoire pour les catégories sélectionnées" -#: forms.py:385 +#: forms.py:388 msgid "File" msgstr "Fichier" -#: forms.py:391 +#: forms.py:394 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:449 models.py:492 models.py:536 -#: models.py:567 models.py:804 models.py:816 models.py:901 +#: forms.py:399 models.py:50 models.py:103 models.py:124 models.py:137 +#: models.py:151 models.py:234 models.py:473 models.py:516 models.py:560 +#: models.py:643 models.py:881 models.py:893 models.py:978 #: templates/chimere/edit.html:39 templates/chimere/edit_route.html:36 msgid "Name" msgstr "Nom" -#: forms.py:405 models.py:853 +#: forms.py:408 models.py:930 msgid "Area" msgstr "Zone" -#: forms.py:461 +#: forms.py:464 msgid "Start" msgstr "Départ" -#: forms.py:462 +#: forms.py:465 msgid "Finish" msgstr "Arrivée :" -#: forms.py:463 +#: forms.py:466 msgid "Speed" msgstr "Vitesse" -#: models.py:50 models.py:124 models.py:151 models.py:244 models.py:453 -#: models.py:822 models.py:903 +#: models.py:51 models.py:125 models.py:152 models.py:245 models.py:477 +#: models.py:899 models.py:980 msgid "Available" msgstr "Disponible" -#: models.py:51 models.py:912 +#: models.py:52 models.py:989 msgid "Date" msgstr "Date" -#: models.py:57 models.py:58 +#: models.py:58 models.py:59 msgid "News" msgstr "Nouvelle" -#: models.py:63 +#: models.py:64 msgid "Parameters" msgstr "Paramètres" -#: models.py:67 +#: models.py:68 msgid "TinyUrl" msgstr "Mini-url" -#: models.py:106 models.py:113 models.py:153 +#: models.py:107 models.py:114 models.py:154 msgid "Color theme" msgstr "Thème de couleur" -#: models.py:111 +#: models.py:112 msgid "Code" msgstr "Code" -#: models.py:112 models.py:125 models.py:155 models.py:494 models.py:543 -#: models.py:821 models.py:890 models.py:902 +#: models.py:113 models.py:126 models.py:156 models.py:518 models.py:575 +#: models.py:898 models.py:967 models.py:979 msgid "Order" msgstr "Ordre" -#: models.py:118 +#: models.py:119 msgid "Color" msgstr "Couleur" -#: models.py:131 models.py:149 templates/chimere/main_map.html:13 +#: models.py:132 models.py:150 templates/chimere/main_map.html:13 msgid "Category" msgstr "Catégorie" -#: models.py:137 models.py:445 models.py:537 models.py:632 +#: models.py:138 models.py:469 models.py:561 models.py:708 msgid "Image" msgstr "Image" -#: models.py:139 models.py:539 models.py:634 +#: models.py:140 models.py:563 models.py:710 msgid "Height" msgstr "Hauteur" -#: models.py:140 models.py:540 models.py:635 +#: models.py:141 models.py:564 models.py:711 msgid "Width" msgstr "Largeur" -#: models.py:144 models.py:152 +#: models.py:145 models.py:153 msgid "Icon" msgstr "Icône" -#: models.py:156 +#: models.py:157 msgid "Marker" msgstr "Point d'intérêt" -#: models.py:157 models.py:628 models.py:643 +#: models.py:158 models.py:704 models.py:719 #: templates/chimere/edit_route.html:27 msgid "Route" msgstr "Trajet" -#: models.py:158 +#: models.py:159 msgid "Both" msgstr "Mixte" -#: models.py:159 +#: models.py:160 msgid "Item type" msgstr "Type d'élément" -#: models.py:164 +#: models.py:165 msgid "Sub-category" msgstr "Sous-catégorie" -#: models.py:165 +#: models.py:166 msgid "Sub-categories" msgstr "Sous-catégories" -#: models.py:211 +#: models.py:212 msgid "Importer type" msgstr "Type d'import" -#: models.py:214 models.py:255 +#: models.py:215 models.py:256 msgid "Source" msgstr "Source" -#: models.py:216 +#: models.py:217 msgid "Filter" msgstr "Filtre" -#: models.py:219 +#: models.py:220 msgid "Associated subcategories" msgstr "Sous-catégories associées" -#: models.py:220 +#: models.py:221 msgid "State" msgstr "État" -#: models.py:222 +#: models.py:223 msgid "SRID" msgstr "SRID" -#: models.py:223 +#: models.py:224 msgid "Zipped file" msgstr "Fichier zippé" -#: models.py:226 +#: models.py:227 msgid "Importer" msgstr "Import" -#: models.py:235 +#: models.py:236 msgid "Submitter session key" msgstr "Clé de session du demandeur" -#: models.py:237 +#: models.py:238 msgid "Submitter name or nickname" msgstr "Nom ou pseudo du demandeur" -#: models.py:239 +#: models.py:240 msgid "Submitter email" msgstr "Courriel du demandeur" -#: models.py:241 +#: models.py:242 msgid "Submitter comment" msgstr "Commentaire du demandeur" -#: models.py:243 +#: models.py:244 msgid "Submited" msgstr "Soumis" -#: models.py:245 +#: models.py:246 msgid "Modified" msgstr "Modifié" -#: models.py:246 +#: models.py:247 msgid "Disabled" msgstr "Désactivé" -#: models.py:247 +#: models.py:248 msgid "Imported" msgstr "Importé" -#: models.py:248 +#: models.py:249 msgid "Excluded" msgstr "Exclu" -#: models.py:250 +#: models.py:251 msgid "Status" msgstr "État" -#: models.py:251 +#: models.py:252 msgid "Import key" msgstr "Clé d'import" -#: models.py:253 +#: models.py:254 msgid "Import version" msgstr "Version de l'import" -#: models.py:258 templates/chimere/edit.html:56 +#: models.py:259 templates/chimere/edit.html:56 #: templates/chimere/edit_route.html:52 msgid "Start date" msgstr "Date de début" -#: models.py:259 +#: models.py:260 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:261 templates/chimere/edit.html:62 +#: models.py:262 templates/chimere/edit.html:62 #: templates/chimere/edit_route.html:58 msgid "End date" msgstr "Date de fin" -#: models.py:262 +#: models.py:263 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:294 +#: models.py:295 msgid "Reference marker" msgstr "Point d'intérêt de référence" -#: models.py:295 +#: models.py:296 msgid "Localisation" msgstr "Localisation" -#: models.py:297 +#: models.py:298 msgid "Available Date" msgstr "Date de mise en disponibilité" -#: models.py:301 templates/chimere/edit.html:49 +#: models.py:302 templates/chimere/edit.html:49 #: templates/chimere/edit_route.html:46 msgid "Description" msgstr "Description" -#: models.py:349 models.py:932 +#: models.py:373 models.py:1009 msgid "Point of interest" msgstr "Point d'intérêt" -#: models.py:443 +#: models.py:467 msgid "Audio" msgstr "Audio" -#: models.py:444 +#: models.py:468 msgid "Video" msgstr "Vidéo" -#: models.py:446 +#: models.py:470 msgid "Other" msgstr "Autre" -#: models.py:447 +#: models.py:471 msgid "Media type" msgstr "Type de media" -#: models.py:450 +#: models.py:474 msgid "Mime type" msgstr "Type mime" -#: models.py:452 +#: models.py:476 msgid "Inside an iframe" msgstr "À l'intérieur d'un iframe" -#: models.py:456 +#: models.py:480 msgid "Multimedia type" msgstr "Type de multimedia" -#: models.py:457 +#: models.py:481 msgid "Multimedia types" msgstr "Types de multimedia" -#: models.py:493 +#: models.py:517 msgid "Url" msgstr "Url" -#: models.py:496 models.py:541 +#: models.py:520 models.py:565 msgid "Display inside the description?" msgstr "Apparaît dans la description ?" -#: models.py:501 +#: models.py:525 msgid "Multimedia file" msgstr "Fichier multimedia" -#: models.py:550 +#: models.py:567 +msgid "Thumbnail" +msgstr "Miniature" + +#: models.py:571 +msgid "Thumbnail height" +msgstr "Hauteur de la miniature" + +#: models.py:573 +msgid "Thumbnail width" +msgstr "Largeur de la miniature" + +#: models.py:582 msgid "Picture file" msgstr "Fichier d'image" -#: models.py:568 +#: models.py:644 msgid "Raw file (gpx or kml)" msgstr "Fichier brut (gpx ou kml)" -#: models.py:569 +#: models.py:645 msgid "Simplified file" msgstr "Fichier simplifié" -#: models.py:571 +#: models.py:647 msgid "KML" msgstr "KML" -#: models.py:571 +#: models.py:647 msgid "GPX" msgstr "GPX" -#: models.py:576 +#: models.py:652 msgid "Route file" msgstr "Fichier de trajet" -#: models.py:577 +#: models.py:653 msgid "Route files" msgstr "Fichiers de trajet" -#: models.py:627 +#: models.py:703 msgid "Reference route" msgstr "Trajet de référence" -#: models.py:631 +#: models.py:707 msgid "Associated file" msgstr "Fichier associé" -#: models.py:805 +#: models.py:882 msgid "Layer code" msgstr "Code pour la couche" -#: models.py:811 +#: models.py:888 msgid "Layer" msgstr "Couche" -#: models.py:817 +#: models.py:894 msgid "Area urn" msgstr "Urn de la zone" -#: models.py:819 templates/chimere/blocks/welcome.html:3 +#: models.py:896 templates/chimere/blocks/welcome.html:3 msgid "Welcome message" msgstr "Message d'accueil" -#: models.py:823 +#: models.py:900 msgid "Upper left corner" msgstr "Coin en haut à gauche" -#: models.py:825 +#: models.py:902 msgid "Lower right corner" msgstr "Coin en bas à droite" -#: models.py:827 +#: models.py:904 msgid "Default area" msgstr "Zone par défaut" -#: models.py:828 +#: models.py:905 msgid "Only one area is set by default" msgstr "Seule une zone est définie par défaut" -#: models.py:832 +#: models.py:909 msgid "Sub-categories checked by default" msgstr "Sous-catégories cochées par défaut" -#: models.py:834 +#: models.py:911 msgid "Sub-categories dynamicaly displayed" msgstr "Sous-categories affichées dynamiquement" -#: models.py:835 +#: models.py:912 msgid "" "If checked, categories are only displayed in the menu if they are available " "on the current extent." @@ -481,68 +493,68 @@ msgstr "" "Si coché, les catégories sont disponibles sur le menu seulement si elles " "apparaissent sur la zone affichée." -#: models.py:839 models.py:906 +#: models.py:916 models.py:983 msgid "Restricted to theses sub-categories" msgstr "Restreindre à ces sous-categories" -#: models.py:840 +#: models.py:917 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:842 +#: models.py:919 msgid "Link to an external CSS" msgstr "Lien vers une feuille de style externe" -#: models.py:844 +#: models.py:921 msgid "Restrict to the area extent" msgstr "Restreindre à l'étendue de la zone" -#: models.py:891 +#: models.py:968 msgid "Default layer" msgstr "Couche par défaut" -#: models.py:895 models.py:896 +#: models.py:972 models.py:973 msgid "Layers" msgstr "Couches" -#: models.py:904 +#: models.py:981 msgid "Mandatory" msgstr "Obligatoire" -#: models.py:907 +#: models.py:984 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:909 +#: models.py:986 msgid "Text" msgstr "Texte" -#: models.py:910 +#: models.py:987 msgid "Long text" msgstr "Texte long" -#: models.py:911 +#: models.py:988 msgid "Password" msgstr "Mot de passe" -#: models.py:917 +#: models.py:994 msgid "Type" msgstr "Type" -#: models.py:922 models.py:934 +#: models.py:999 models.py:1011 msgid "Property model" msgstr "Modèle de propriété" -#: models.py:935 +#: models.py:1012 msgid "Value" msgstr "Valeur" -#: models.py:939 +#: models.py:1016 msgid "Property" msgstr "Propriété" @@ -642,7 +654,7 @@ msgstr "" msgid "Bad param" msgstr "Mauvais paramètre" -#: views.py:236 +#: views.py:237 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." @@ -667,44 +679,48 @@ msgstr "" msgid "Temporary error. Renew your message later." msgstr "Erreur temporaire. Réenvoyez votre message plus tard." -#: views.py:579 +#: views.py:584 msgid "No category available in this area." msgstr "Pas de catégorie disponible sur cette zone." -#: views.py:708 +#: views.py:716 msgid "Incorrect choice in the list" msgstr "Choix incorrect dans la liste" -#: widgets.py:240 +#: widgets.py:180 +msgid "Street, City, Country" +msgstr "Rue, Commune, Pays" + +#: widgets.py:246 msgid "Latitude" msgstr "Latitude" -#: widgets.py:240 +#: widgets.py:246 msgid "Longitude" msgstr "Longitude" -#: widgets.py:265 +#: widgets.py:271 msgid "Invalid point" msgstr "Point invalide" -#: widgets.py:315 +#: widgets.py:321 msgid "Creation mode" msgstr "Mode création" -#: widgets.py:316 +#: widgets.py:322 msgid "To start drawing the route click on the toggle button: \"Draw\"." msgstr "" "Pour commencer le dessin cliquez sur le bouton : « Tracer »." -#: widgets.py:318 +#: widgets.py:324 msgid "Then click on the map to begin the drawing." msgstr "Puis cliquez sur la carte pour commencer le dessin." -#: widgets.py:319 +#: widgets.py:325 msgid "You can add points by clicking again." msgstr "Vous pouvez ajouter des points en cliquant de nouveau." -#: widgets.py:320 +#: widgets.py:326 msgid "" "To finish the drawing double click. When the drawing is finished you can " "edit it." @@ -712,7 +728,7 @@ msgstr "" "Pour finir le tracé double-cliquez. Quand le tracé est fini vous pouvez " "toujours l'éditer." -#: widgets.py:322 +#: widgets.py:328 msgid "" "While creating to undo a drawing click again on the toggle button \"Stop " "drawing\"." @@ -720,17 +736,17 @@ msgstr "" "En mode création vous pouvez annuler un tracé en appuyant sur le bouton " "« Arrêter le tracé »." -#: widgets.py:327 +#: widgets.py:333 msgid "Modification mode" msgstr "Mode modification" -#: widgets.py:328 +#: widgets.py:334 msgid "To move a point click on it and drag it to the desired position." msgstr "" "Pour bouger un point, cliquez dessus, maintenez le click pour le déposer à " "la position désirée." -#: widgets.py:329 +#: widgets.py:335 msgid "" "To delete a point move the mouse cursor over it and press the \"d\" or \"Del" "\" key." @@ -738,7 +754,7 @@ msgstr "" "Pour supprimer un point, mettez le curseur de la souris sur celui-ci et " "appuyez sur le touche « d » ou « Suppr »." -#: widgets.py:331 +#: widgets.py:337 msgid "" "To add a point click in the middle of a segment and drag the new point to " "the desired position" @@ -747,33 +763,33 @@ msgstr "" "maintenez le bouton appuyé et déplacez le nouveau point à la position " "désirée." -#: widgets.py:338 +#: widgets.py:344 msgid "Give a name and set category before uploading a file." msgstr "" "Renseignez le nom et choisissez au moins une catégorie avant de déposer un " "fichier." -#: widgets.py:341 +#: widgets.py:347 msgid "Upload a route file (GPX or KML)" msgstr "Déposer un trajet (fichier GPX ou KML)" -#: widgets.py:342 +#: widgets.py:348 msgid "or" msgstr "ou" -#: widgets.py:347 +#: widgets.py:353 msgid "Start \"hand\" drawing" msgstr "Commencer le tracé manuellement" -#: widgets.py:370 +#: widgets.py:376 msgid "Move on the map" msgstr "Se déplacer" -#: widgets.py:370 +#: widgets.py:376 msgid "Draw" msgstr "Tracer" -#: widgets.py:495 +#: widgets.py:501 msgid "Select..." msgstr "Sélectionner..." @@ -821,6 +837,10 @@ msgstr "Partager sur" msgid "Share" msgstr "Partager" +#: templates/chimere/detail.html:36 +msgid "Propose a modification" +msgstr "Proposer une modification" + #: templates/chimere/edit.html:20 msgid "Error" msgstr "Erreur" @@ -870,7 +890,11 @@ msgstr "Votre courriel" msgid "Comments about your submission" msgstr "Commentaires au sujet de votre proposition" -#: templates/chimere/edit.html:133 templates/chimere/edit_route.html:77 +#: templates/chimere/edit.html:134 +msgid "Upload in progress. Please wait..." +msgstr "Traitement en cours. Veuillez patienter..." + +#: templates/chimere/edit.html:151 templates/chimere/edit_route.html:77 msgid "Propose" msgstr "Proposez" @@ -957,7 +981,7 @@ msgstr "Zoomer en arrière" msgid "Center the map here" msgstr "Centrer la carte ici" -#: templates/chimere/blocks/map_params.html:6 +#: templates/chimere/blocks/map_params.html:8 msgid "Permalink" msgstr "Lien permanent" @@ -968,23 +992,27 @@ msgstr "" "libre Flash." #: templates/chimere/blocks/routing.html:4 -#: templates/chimere/blocks/routing.html:40 +#: templates/chimere/blocks/routing.html:44 msgid "Itinerary" msgstr "Itinéraire" -#: templates/chimere/blocks/routing.html:19 +#: templates/chimere/blocks/routing.html:14 +msgid "Search" +msgstr "Rechercher" + +#: templates/chimere/blocks/routing.html:20 msgid "Modify" msgstr "Modifier" -#: templates/chimere/blocks/routing.html:22 +#: templates/chimere/blocks/routing.html:23 msgid "New search" msgstr "Nouvelle recherche" -#: templates/chimere/blocks/routing.html:27 +#: templates/chimere/blocks/routing.html:31 msgid "Start:" msgstr "Départ :" -#: templates/chimere/blocks/routing.html:31 +#: templates/chimere/blocks/routing.html:35 msgid "Finish:" msgstr "Arrivée :" diff --git a/chimere/static/chimere/css/styles.css b/chimere/static/chimere/css/styles.css index 640fc29..023c037 100644 --- a/chimere/static/chimere/css/styles.css +++ b/chimere/static/chimere/css/styles.css @@ -321,23 +321,23 @@ ul#action-2 { max-width:280px; } -ul#share{ +ul.share{ list-style-type:none; margin:0; padding:0; } -ul#share li{ +ul.share li{ display:inline; line-height:22px; vertical-align: bottom; } -#share a{ +.share a{ text-decoration:None; } -#share img{ +.share img{ border:None; width:22px; height:22px; diff --git a/chimere/static/chimere/img/feed.png b/chimere/static/chimere/img/feed.png Binary files differnew file mode 100644 index 0000000..19d2246 --- /dev/null +++ b/chimere/static/chimere/img/feed.png diff --git a/chimere/static/chimere/js/jquery.chimere.js b/chimere/static/chimere/js/jquery.chimere.js index 4bc487e..ca664de 100644 --- a/chimere/static/chimere/js/jquery.chimere.js +++ b/chimere/static/chimere/js/jquery.chimere.js @@ -467,7 +467,7 @@ OpenLayers.Layer.MapQuestOSM = OpenLayers.Class(OpenLayers.Layer.XYZ, { } /* show the popup */ if (settings.current_popup != null) { - settings.current_popup.hide(); + settings.current_popup.hide(); } if (feature.popup == null) { feature.popup = feature.createPopup(); @@ -484,6 +484,7 @@ OpenLayers.Layer.MapQuestOSM = OpenLayers.Class(OpenLayers.Layer.XYZ, { } var markerClick = function (evt) { settings.current_feature = feature; + settings.current_position = feature.lonlat; if ( settings.on_marker_click ) { settings.on_marker_click(evt, mark, settings); } diff --git a/chimere/templates/chimere/detail.html b/chimere/templates/chimere/detail.html index 95e6a70..2bd55aa 100644 --- a/chimere/templates/chimere/detail.html +++ b/chimere/templates/chimere/detail.html @@ -29,10 +29,11 @@ {% if simple %}{% trans "Share on"%}{% for share_network in share_networks %} <a href='{{share_network.1}}'>{{share_network.0}}</a> {% endfor %}{%else%} - <ul id='share'> + <ul class='share'> <li>{% trans "Share"%}</li>{% for share_network in share_networks %} <li><a href='{{share_network.1}}'><img src="{{share_network.2}}" alt="{{share_network.0}}"/></a></li> {% endfor %}</ul>{% endif %} + <a href="{{modif_by_email}}">{% trans "Propose a modification" %}</a> {% comment %} <a href='{% if marker.route %}{% url chimere:editroute-item area_name_slash|default_if_none:"" marker.route.pk "" %}{%else%}{% url chimere:edit-item area_name_slash|default_if_none:"" marker.pk "" %}{%endif%}'> {% trans "Submit a modification" %} diff --git a/chimere/views.py b/chimere/views.py index c8097a1..157a52e 100644 --- a/chimere/views.py +++ b/chimere/views.py @@ -48,7 +48,7 @@ from chimere.widgets import getMapJS, PointChooserWidget, \ RouteChooserWidget, AreaWidget from chimere.forms import MarkerForm, RouteForm, ContactForm, FileForm, \ FullFileForm, MultimediaFileFormSet, PictureFileFormSet, notifySubmission,\ - notifyStaff, AreaForm, RoutingForm + notifyStaff, AreaForm, RoutingForm, getStaffEmails from chimere.route import router @@ -480,6 +480,11 @@ def getDetail(request, area_name, marker_id): for network in settings.CHIMERE_SHARE_NETWORKS: share_networks.append((network[0], network[1] % net_dct, network[2])) response_dct['share_networks'] = share_networks + net_dct['to'] = ";".join(getStaffEmails()) + if net_dct['to']: + net_dct["body"] = _(settings.CHIMERE_MODIF_EMAIL) + response_dct['modif_by_email'] = 'mailto:?to=%(to)s&subject='\ + '%(text)s&body=%(body)s%(url)s' % net_dct response_dct['dated'] = settings.CHIMERE_DAYS_BEFORE_EVENT \ and marker.start_date return render_to_response('chimere/detail.html', response_dct, diff --git a/example_project/settings.py b/example_project/settings.py index 2aef8be..c878c88 100644 --- a/example_project/settings.py +++ b/example_project/settings.py @@ -103,6 +103,8 @@ CHIMERE_THUMBS_SCALE_WIDTH=None # length of short description CHIMERE_SHORT_DESC_LENGTH = 400 +CHIMERE_MODIF_EMAIL = _(u"""Hello, I would like to propose you a modification about this item: """) + ADMINS = ( # ('Your Name', 'your_email@domain.com'), ) |
