From 93c005765e79e7d8039d325f3fb75a27596a53f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Wed, 28 Sep 2011 10:37:57 +0200 Subject: [PATCH] Let attribute name, width, and height be controlled by schema --- themis/fields/interfaces.py | 19 ++++++++++++++++++ themis/fields/previewdoc_display.pt | 4 +++- themis/fields/widgets.py | 30 ++++++++++++++++++++++------- 3 files changed, 45 insertions(+), 8 deletions(-) diff --git a/themis/fields/interfaces.py b/themis/fields/interfaces.py index 8f862c6..85840e8 100644 --- a/themis/fields/interfaces.py +++ b/themis/fields/interfaces.py @@ -163,5 +163,24 @@ class IPreviewDoc(IField): description=IField['missing_value'].description, required=False) + required = schema.Bool( + title=IField['required'].title, + description=IField['required'].description, + default=False) + + attribute_name = schema.TextLine( + title=u'Attribute Name', + description=u'Attribute Name', + required=True, + default=u'fichier') + + width = schema.TextLine( + title=u'Width', + required=False) + + height = schema.TextLine( + title=u'Height', + required=False) + class IPreviewDocWidget(IWidget): pass diff --git a/themis/fields/previewdoc_display.pt b/themis/fields/previewdoc_display.pt index 3abd0c9..e3cbe48 100644 --- a/themis/fields/previewdoc_display.pt +++ b/themis/fields/previewdoc_display.pt @@ -2,7 +2,9 @@ xmlns:tal="http://xml.zope.org/namespaces/tal" tal:omit-tag="">

Pas de lecteur PDF intégré, vous pouvez ouvrir le fichier en suivant ce lien :