Changeset 13134 for main/waeup.kofa/trunk/src/waeup
- Timestamp:
- 3 Jul 2015, 10:19:55 (9 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/documents
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/documents/catalog.py
r12438 r13134 30 30 31 31 document_id = grok.index.Field(attribute='document_id') 32 user_id = grok.index.Field(attribute='user_id')33 32 state = grok.index.Field(attribute='state') -
main/waeup.kofa/trunk/src/waeup/kofa/documents/document.py
r12456 r13134 68 68 ] 69 69 70 user_id = None71 70 state = None 72 71 translated_state = None … … 89 88 return 90 89 91 @property92 def connected_files(self):93 return94 95 @property96 def is_verifiable(self):97 return True, None98 99 def setMD5(self):100 """Determine md5 checksum of all files and store checksums as101 document attributes.102 """103 return104 105 90 class PublicDocumentBase(Document): 106 """This is a customerdocument baseclass.91 """This is a public document baseclass. 107 92 """ 108 93 grok.implements(IPublicDocument) … … 234 219 """A file id chooser for :class:`Document` objects. 235 220 236 `context` is a n:class:`Document` instance.221 `context` is a :class:`Document` instance. 237 222 238 223 The delivered file_id contains the file id marker for … … 268 253 *Example:* 269 254 270 For document with id 'd123'271 with attr `` 'nice_image.jpeg'`` this chooser would create:272 273 `` '__file-document__nice_image_d123.jpeg'``255 For document with id ``d123`` and 256 with attr ``nice_image.jpeg`` this chooser would create: 257 258 ``__file-document__nice_image_d123.jpeg`` 274 259 275 260 meaning that the nice image of this document would be -
main/waeup.kofa/trunk/src/waeup/kofa/documents/export.py
r12438 r13134 40 40 def fields(self): 41 41 return tuple(sorted(iface_names(self.iface, exclude_attribs=False, 42 omit=['is_verifiable', 43 'translated_state', 44 'user_id', 42 omit=['translated_state', 45 43 'formatted_transition_date', 46 44 'translated_class_name', 47 'connected_files', # Could be used to export file URLs 45 'form_fields_interface', 46 'filenames', 47 'local_roles', 48 48 ] 49 49 ))) + ( -
main/waeup.kofa/trunk/src/waeup/kofa/documents/fileviewlets.py
r12456 r13134 68 68 """Scan document. 69 69 """ 70 ##: Needs to be protected if not published71 70 grok.name('file.pdf') 72 71 grok.context(PDFDocument) -
main/waeup.kofa/trunk/src/waeup/kofa/documents/interfaces.py
r12438 r13134 26 26 class IDocumentsContainer(IKofaObject): 27 27 """A container for all kind of document objects. 28 29 28 """ 30 29 … … 36 35 class IDocument(IKofaObject): 37 36 """A base representation of documents. 38 39 37 """ 40 38 history = Attribute('Object history, a list of messages') 41 state = Attribute('Returns the verification state of a document') 42 translated_state = Attribute( 43 'Returns a translated, more verbose verification state of a document') 39 state = Attribute('Workflow state of a document') 40 translated_state = Attribute('Translatable workflow state of a document') 44 41 class_name = Attribute('Name of the document class') 45 translated_class_name = Attribute('Translatable class name') 46 formatted_transition_date = Attribute('Last transition formatted date string') 47 user_id = Attribute('Id of a user') 48 connected_files = Attribute('Names of files connected to a document') 49 is_verifiable = Attribute('Contract verifiable by officer') 42 translated_class_name = Attribute('Translatable class name of a document') 43 formatted_transition_date = Attribute( 44 'Last transition formatted date string') 45 form_fields_interface = Attribute( 46 'Interface which is used in forms for grok.AutoFields') 47 local_roles = Attribute('List of local role names') 50 48 51 49 document_id = schema.TextLine( … … 60 58 ) 61 59 62 def setMD5():63 """Determine md5 checksum of selected files and store checksums as64 document attributes.65 """66 67 60 class IPublicDocument(IDocument): 68 61 """A base representation of public documents. 69 70 62 """ 71 63 72 64 def writeLogMessage(view, message): 73 65 """Write a view specific log message into main.log. 74 75 66 """ 76 67 77 68 class IPDFDocument(IPublicDocument): 78 69 """A base representation of PDF documents. 79 80 70 """ 81 71 72 filenames = Attribute('Tuple of filenames; only one filename recommended') 82 73 83 74 class IHTMLDocument(IPublicDocument): 84 75 """A base representation of HTML documents. 85 86 76 """ 87 77 88 html_dict = Attribute('Content as language dictionary with values in HTML format') 78 html_dict = Attribute( 79 'Content as language dictionary with values in HTML format') 89 80 90 81 html_multilingual = schema.Text( … … 95 86 class IRESTDocument(IPublicDocument): 96 87 """A base representation of REST documents. 97 98 88 """ 99 89 … … 109 99 class IDocumentsUtils(Interface): 110 100 """A collection of methods which are subject to customization. 111 112 101 """ 113 102
Note: See TracChangeset for help on using the changeset viewer.