Changeset 13134


Ignore:
Timestamp:
3 Jul 2015, 10:19:55 (9 years ago)
Author:
Henrik Bettermann
Message:

Remove properties which are not used in Kofa.

Adjust to user handbook.

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  
    3030
    3131    document_id = grok.index.Field(attribute='document_id')
    32     user_id = grok.index.Field(attribute='user_id')
    3332    state = grok.index.Field(attribute='state')
  • main/waeup.kofa/trunk/src/waeup/kofa/documents/document.py

    r12456 r13134  
    6868        ]
    6969
    70     user_id = None
    7170    state = None
    7271    translated_state = None
     
    8988            return
    9089
    91     @property
    92     def connected_files(self):
    93         return
    94 
    95     @property
    96     def is_verifiable(self):
    97         return True, None
    98 
    99     def setMD5(self):
    100         """Determine md5 checksum of all files and store checksums as
    101         document attributes.
    102         """
    103         return
    104        
    10590class PublicDocumentBase(Document):
    106     """This is a customer document baseclass.
     91    """This is a public document baseclass.
    10792    """
    10893    grok.implements(IPublicDocument)
     
    234219    """A file id chooser for :class:`Document` objects.
    235220
    236     `context` is an :class:`Document` instance.
     221    `context` is a :class:`Document` instance.
    237222
    238223    The delivered file_id contains the file id marker for
     
    268253        *Example:*
    269254
    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``
    274259
    275260        meaning that the nice image of this document would be
  • main/waeup.kofa/trunk/src/waeup/kofa/documents/export.py

    r12438 r13134  
    4040    def fields(self):
    4141        return tuple(sorted(iface_names(self.iface, exclude_attribs=False,
    42             omit=['is_verifiable',
    43                   'translated_state',
    44                   'user_id',
     42            omit=['translated_state',
    4543                  'formatted_transition_date',
    4644                  'translated_class_name',
    47                   'connected_files',   # Could be used to export file URLs
     45                  'form_fields_interface',
     46                  'filenames',
     47                  'local_roles',
    4848                  ]
    4949            ))) + (
  • main/waeup.kofa/trunk/src/waeup/kofa/documents/fileviewlets.py

    r12456 r13134  
    6868    """Scan document.
    6969    """
    70     ##: Needs to be protected if not published
    7170    grok.name('file.pdf')
    7271    grok.context(PDFDocument)
  • main/waeup.kofa/trunk/src/waeup/kofa/documents/interfaces.py

    r12438 r13134  
    2626class IDocumentsContainer(IKofaObject):
    2727    """A container for all kind of document objects.
    28 
    2928    """
    3029
     
    3635class IDocument(IKofaObject):
    3736    """A base representation of documents.
    38 
    3937    """
    4038    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')
    4441    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')
    5048
    5149    document_id = schema.TextLine(
     
    6058        )
    6159
    62     def setMD5():
    63         """Determine md5 checksum of selected files and store checksums as
    64         document attributes.
    65         """
    66 
    6760class IPublicDocument(IDocument):
    6861    """A base representation of public documents.
    69 
    7062    """
    7163
    7264    def writeLogMessage(view, message):
    7365        """Write a view specific log message into main.log.
    74 
    7566        """
    7667
    7768class IPDFDocument(IPublicDocument):
    7869    """A base representation of PDF documents.
    79 
    8070    """
    8171
     72    filenames = Attribute('Tuple of filenames; only one filename recommended')
    8273
    8374class IHTMLDocument(IPublicDocument):
    8475    """A base representation of HTML documents.
    85 
    8676    """
    8777
    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')
    8980
    9081    html_multilingual = schema.Text(
     
    9586class IRESTDocument(IPublicDocument):
    9687    """A base representation of REST documents.
    97 
    9888    """
    9989
     
    10999class IDocumentsUtils(Interface):
    110100    """A collection of methods which are subject to customization.
    111 
    112101    """
    113102
Note: See TracChangeset for help on using the changeset viewer.