Ignore:
Timestamp:
7 Jul 2015, 05:21:14 (9 years ago)
Author:
Henrik Bettermann
Message:

More docs and adjustments in Python code.

Location:
main/waeup.kofa/trunk/src/waeup/kofa/documents
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/documents/batching.py

    r13138 r13144  
    4343
    4444class DocumentProcessorBase(BatchProcessor):
    45     """A base for batch processors for IDocument objects.
     45    """This is the base class for all kinds of document processors.
     46    The `checkConversion` method checks whether `class_name` in a row
     47    corresponds with the processor chosen. This is to avoid accidentally
     48    wrong imports.
    4649    """
    4750    grok.implements(IBatchProcessor)
  • main/waeup.kofa/trunk/src/waeup/kofa/documents/browser.py

    r13138 r13144  
    3636from waeup.kofa.interfaces import MessageFactory as _
    3737from waeup.kofa.interfaces import (
    38     IContactForm, IKofaObject, IKofaUtils)
     38    IContactForm, IKofaObject, IKofaUtils, DOCLINK)
    3939from waeup.kofa.browser.layout import (
    4040    KofaPage, KofaEditFormPage, KofaAddFormPage, KofaDisplayFormPage,
     
    8282    pnav = 2
    8383    label = _('Documents')
     84    doclink = DOCLINK + '/documents.html'
    8485
    8586
     
    164165    grok.template('documentpage')
    165166    pnav = 2
     167    doclink = DOCLINK + '/documents.html'
    166168
    167169    @property
  • main/waeup.kofa/trunk/src/waeup/kofa/documents/browser_templates/htmldocumentpage.pt

    r12437 r13144  
    3535      </td>
    3636      <td>
    37         &lt;a href=&quot;
    38         <span tal:replace="python: view.url(context, 'display')"></span>
    39         &quot;&gt;<span tal:replace="context/title">FILENAME</span>&lt;/a&gt;
     37        &lt;a href=&quot;<span tal:replace="python: view.url(context, 'display')"></span>&quot;&gt;<span tal:replace="context/title">
     38        FILENAME
     39        </span>&lt;/a&gt;
    4040      </td>
    4141    </tr>
  • main/waeup.kofa/trunk/src/waeup/kofa/documents/export.py

    r13134 r13144  
    2929
    3030class DocumentExporterBase(grok.GlobalUtility, ExporterBase):
    31     """Exporter for documents.
     31    """This is the exporter base class for all kinds of document exporters.
     32    Derived classes export all documents of type `class_name` inside the
     33    documents container.
     34
     35    All schema fields and the property attributes
     36    `history`, `state`, `class_name` and `users_with_local_roles`
     37    are being exported.
    3238    """
    3339    grok.implements(ICSVExporter)
     
    5157
    5258    def mangle_value(self, value, name, context=None):
    53         """Hook for mangling values in derived classes
     59        """The mangler prepares the history messages and computes the
     60        `users_with_local_roles` value which is a Python expression like:
     61
     62        ``[{'user_name': u'bob', 'local_role': u'bobsrole'},
     63        {'user_name': u'anna', 'local_role': u'annasrole'}]``
    5464        """
    5565        if name == 'users_with_local_roles':
  • main/waeup.kofa/trunk/src/waeup/kofa/documents/interfaces.py

    r13134 r13144  
    3838    history = Attribute('Object history, a list of messages')
    3939    state = Attribute('Workflow state of a document')
     40    class_name = Attribute('Name of the document class')
     41
     42    local_roles = Attribute('List of local role names')
     43    translated_class_name = Attribute('Translatable class name of a document')
    4044    translated_state = Attribute('Translatable workflow state of a document')
    41     class_name = Attribute('Name of the document class')
    42     translated_class_name = Attribute('Translatable class name of a document')
    4345    formatted_transition_date = Attribute(
    4446        'Last transition formatted date string')
    4547    form_fields_interface = Attribute(
    4648        'Interface which is used in forms for grok.AutoFields')
    47     local_roles = Attribute('List of local role names')
    4849
    4950    document_id = schema.TextLine(
Note: See TracChangeset for help on using the changeset viewer.