add the name of the currently attached file, if the file already exists (i.e in the edition form)
--- a/i18n/en.po Wed Apr 01 17:53:44 2009 -0700
+++ b/i18n/en.po Thu Apr 02 11:42:58 2009 +0200
@@ -1434,6 +1434,10 @@
msgid "csv export"
msgstr ""
+#, python-format
+msgid "currently attached file: %s"
+msgstr ""
+
msgid "data directory url"
msgstr ""
@@ -1546,7 +1550,8 @@
msgid "destination_state_object"
msgstr "destination of"
-msgid "detach attached file"
+#, python-format
+msgid "detach attached file %s"
msgstr ""
msgid "detailed schema view"
--- a/i18n/es.po Wed Apr 01 17:53:44 2009 -0700
+++ b/i18n/es.po Thu Apr 02 11:42:58 2009 +0200
@@ -104,6 +104,10 @@
msgstr "%d semanas"
#, python-format
+msgid "%d years"
+msgstr ""
+
+#, python-format
msgid "%s error report"
msgstr "%s reporte de errores"
@@ -1487,6 +1491,10 @@
msgid "csv export"
msgstr "exportar CSV"
+#, python-format
+msgid "currently attached file: %s"
+msgstr ""
+
msgid "data directory url"
msgstr "url del repertorio de datos"
@@ -1612,8 +1620,9 @@
msgid "destination_state_object"
msgstr "destino de"
-msgid "detach attached file"
-msgstr "soltar el archivo existente"
+#, python-format
+msgid "detach attached file %s"
+msgstr ""
msgid "detailed schema view"
msgstr "vista detallada del esquema"
@@ -2997,6 +3006,9 @@
#~ "langue par dÈfaut (regarder le rÈpertoire i18n de l'application pour voir "
#~ "les langues disponibles)"
+#~ msgid "detach attached file"
+#~ msgstr "soltar el archivo existente"
+
#~ msgid "filter"
#~ msgstr "filtrer"
--- a/i18n/fr.po Wed Apr 01 17:53:44 2009 -0700
+++ b/i18n/fr.po Thu Apr 02 11:42:58 2009 +0200
@@ -1492,6 +1492,10 @@
msgid "csv export"
msgstr "export CSV"
+#, python-format
+msgid "currently attached file: %s"
+msgstr "fichie actuellement attaché %s"
+
msgid "data directory url"
msgstr "url du répertoire de données"
@@ -1616,8 +1620,9 @@
msgid "destination_state_object"
msgstr "destination de"
-msgid "detach attached file"
-msgstr "détacher le fichier existant"
+#, python-format
+msgid "detach attached file %s"
+msgstr "détacher le fichier existant %s"
msgid "detailed schema view"
msgstr "vue détaillée du schéma"
@@ -3002,6 +3007,9 @@
#~ "langue par défaut (regarder le répertoire i18n de l'application pour voir "
#~ "les langues disponibles)"
+#~ msgid "detach attached file"
+#~ msgstr "détacher le fichier existant"
+
#~ msgid "filter"
#~ msgstr "filtrer"
--- a/web/widgets.py Wed Apr 01 17:53:44 2009 -0700
+++ b/web/widgets.py Thu Apr 02 11:42:58 2009 +0200
@@ -486,11 +486,15 @@
wdgs.append(ewdg.edit_render(entity, includehelp=True))
wdgs.append(u'<br/>')
wdgs.append(u'</div>')
- if entity.has_eid() and not self.required(entity):
- # trick to be able to delete an uploaded file
- wdgs.append(u'<br/>')
- wdgs.append(checkbox(eid_param('__%s_detach' % self.rname, entity.eid), False))
- wdgs.append(req._('detach attached file'))
+ if entity.has_eid():
+ if not self.required(entity):
+ # trick to be able to delete an uploaded file
+ wdgs.append(u'<br/>')
+ wdgs.append(checkbox(eid_param('__%s_detach' % self.rname, entity.eid), False))
+ wdgs.append(req._('detach attached file %s' % entity.dc_title()))
+ else:
+ wdgs.append(u'<br/>')
+ wdgs.append(req._('currently attached file: %s' % entity.dc_title()))
return '\n'.join(wdgs)
def _edit_render(self, entity):