[Mpuls-commits] r368 - in wasko/trunk: . waskaweb/model waskaweb/templates/documents
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Thu Mar 12 14:31:15 CET 2009
Author: torsten
Date: 2009-03-12 14:31:11 +0100 (Thu, 12 Mar 2009)
New Revision: 368
Modified:
wasko/trunk/ChangeLog.txt
wasko/trunk/waskaweb/model/document.py
wasko/trunk/waskaweb/templates/documents/case_new.mako
wasko/trunk/waskaweb/templates/documents/global_upload.mako
wasko/trunk/waskaweb/templates/documents/upload_body.mako
Log:
Fixed issue25
Modified: wasko/trunk/ChangeLog.txt
===================================================================
--- wasko/trunk/ChangeLog.txt 2009-03-11 17:17:13 UTC (rev 367)
+++ wasko/trunk/ChangeLog.txt 2009-03-12 13:31:11 UTC (rev 368)
@@ -1,3 +1,13 @@
+2009-03-12 Torsten Irlaender <torsten.irlaender at intevation.de>
+
+ Fixed issue25
+
+ * waskaweb/templates/documents/upload_body.mako,
+ waskaweb/templates/documents/case_new.mako,
+ waskaweb/templates/documents/global_upload.mako,
+ waskaweb/model/document.py: Files will be overwritten if the user
+ uploads a file with the same name.
+
2009-03-11 Sascha L. Teichmann <teichmann at intevation.de>
* waskaweb/model/casedocument.py: generate HTML for links on phase page.
Modified: wasko/trunk/waskaweb/model/document.py
===================================================================
--- wasko/trunk/waskaweb/model/document.py 2009-03-11 17:17:13 UTC (rev 367)
+++ wasko/trunk/waskaweb/model/document.py 2009-03-12 13:31:11 UTC (rev 368)
@@ -38,8 +38,8 @@
MAX_SIZE = 10*1024*1024
BLOCK_SIZE = 4*1024
-CREATE_GLOBAL = 'SELECT * FROM create_global_dokument_ds()'
-CREATE_CASE = 'SELECT * FROM create_fall_dokument_ds(%(id)s, %(uuid)s)'
+CREATE_GLOBAL = 'SELECT * FROM create_global_dokument_ds(%(name)s)'
+CREATE_CASE = 'SELECT * FROM create_fall_dokument_ds(%(id)s, %(uuid)s, %(name)s)'
UPDATE_GLOBAL = '''
UPDATE ka_global_dokumente_tbl_view
@@ -194,8 +194,8 @@
con = db.getConnection()
cur = con.cursor()
- if case is None: cur.execute(CREATE_GLOBAL)
- else: cur.execute(CREATE_CASE, { 'id': case, 'uuid': uuid})
+ if case is None: cur.execute(CREATE_GLOBAL, {'name': name})
+ else: cur.execute(CREATE_CASE, { 'id': case, 'uuid': uuid, 'name': name})
row = cur.fetchone()
if row is None:
Modified: wasko/trunk/waskaweb/templates/documents/case_new.mako
===================================================================
--- wasko/trunk/waskaweb/templates/documents/case_new.mako 2009-03-11 17:17:13 UTC (rev 367)
+++ wasko/trunk/waskaweb/templates/documents/case_new.mako 2009-03-12 13:31:11 UTC (rev 368)
@@ -22,7 +22,7 @@
% endif
<div id="document">
<div id="waska_form" class="import_box">
- <p class="import_p">Die Größe einer Anlage darf nicht 10MB überschreiten.</p>
+ <p class="import_p">Die Größe einer Anlage darf nicht 10MB überschreiten. Bereits bestehende Dateien mit gleichem Namen werden überschrieben!</p>
<div class="import_box_dialog">
${h.form(h.url(controller="document", action='caseUploadAction'), multipart=True)}
<label class="import_label" for="file"><strong class="import_number">1. </strong>${_('att_form_upload_label_add')}</label>
Modified: wasko/trunk/waskaweb/templates/documents/global_upload.mako
===================================================================
--- wasko/trunk/waskaweb/templates/documents/global_upload.mako 2009-03-11 17:17:13 UTC (rev 367)
+++ wasko/trunk/waskaweb/templates/documents/global_upload.mako 2009-03-12 13:31:11 UTC (rev 368)
@@ -19,7 +19,7 @@
</div>
<div id="document">
<div id="waska_form" class="import_box">
- <p class="import_p">Die Größe eines Dokuments darf nicht 10MB überschreiten.</p>
+ <p class="import_p">Die Größe eines Dokuments darf nicht 10MB überschreiten. Bereits bestehende Dateien mit gleichem Namen werden überschrieben!</p>
<div class="import_box_dialog">
${h.form(h.url(controller="document", action='globalUploadAction'), multipart=True)}
<label class="import_label" for="file"><strong class="import_number">1. </strong>${_('doc_form_upload_label_file')}</label>
Modified: wasko/trunk/waskaweb/templates/documents/upload_body.mako
===================================================================
--- wasko/trunk/waskaweb/templates/documents/upload_body.mako 2009-03-11 17:17:13 UTC (rev 367)
+++ wasko/trunk/waskaweb/templates/documents/upload_body.mako 2009-03-12 13:31:11 UTC (rev 368)
@@ -1,4 +1,5 @@
<div id="document">
+<p>Bereits existente Dateien mit gleichem Namen werden überschrieben!</p>
<div id="waska_form">
${h.form(h.url(controller="document", action='uploadAction'), multipart=True)}
<div class="w100">
@@ -9,4 +10,4 @@
${h.end_form()}
</div>
</div>
-</div>
\ No newline at end of file
+</div>
More information about the Mpuls-commits
mailing list