Changeset 12456


Ignore:
Timestamp:
13 Jan 2015, 06:23:01 (10 years ago)
Author:
Henrik Bettermann
Message:

Omit document_id on manage pages. Rename sample.pdf.

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

Legend:

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

    r12438 r12456  
    262262    @property
    263263    def form_fields(self):
    264         return grok.AutoFields(self.context.form_fields_interface)
     264        return grok.AutoFields(
     265            self.context.form_fields_interface).omit('document_id')
    265266
    266267    def label(self):
  • main/waeup.kofa/trunk/src/waeup/kofa/documents/document.py

    r12441 r12456  
    145145    grok.provides(IPDFDocument)
    146146
    147     filenames = ('sample.pdf',)
     147    filenames = ('file.pdf',)
    148148
    149149    form_fields_interface = IPDFDocument
  • main/waeup.kofa/trunk/src/waeup/kofa/documents/fileviewlets.py

    r12448 r12456  
    4141    title = _(u'PDF File')
    4242    mus = 1024 * 200
    43     download_name = u'sample.pdf'
     43    download_name = u'file.pdf'
    4444    tab_redirect = '#tab2'
    4545
     
    5858    label = _(u'PDF Scan')
    5959    title = _(u'PDF Scan')
    60     download_name = u'sample.pdf'
     60    download_name = u'file.pdf'
    6161
    6262    @property
     
    6969    """
    7070    ##: Needs to be protected if not published
    71     grok.name('sample.pdf')
     71    grok.name('file.pdf')
    7272    grok.context(PDFDocument)
    7373    grok.require('waeup.Public')
    74     download_name = u'sample.pdf'
     74    download_name = u'file.pdf'
    7575
    7676    @property
  • main/waeup.kofa/trunk/src/waeup/kofa/documents/tests/test_browser.py

    r12447 r12456  
    148148            name='upload_pdfscanmanageupload').click()
    149149        self.assertTrue(
    150             'href="http://localhost/app/documents/DOC1/sample.pdf">DOC1.pdf</a>'
     150            'href="http://localhost/app/documents/DOC1/file.pdf">DOC1.pdf</a>'
    151151            in self.browser.contents)
    152152        # The file can be found in the file system
    153153        file = getUtility(IExtFileStore).getFileByContext(
    154             document, attr='sample.pdf')
     154            document, attr='file.pdf')
    155155        file_content = file.read()
    156156        pdf.seek(0)
     
    164164            in self.browser.contents)
    165165        IWorkflowState(document).setState(PUBLISHED)
    166         self.browser.open(self.container_path + '/DOC1/sample.pdf')
     166        self.browser.open(self.container_path + '/DOC1/file.pdf')
    167167        self.assertEqual(
    168168            self.browser.headers['content-type'], 'application/pdf')
     
    190190        # File has been removed too
    191191        file = getUtility(IExtFileStore).getFileByContext(
    192             document, attr='sample.pdf')
     192            document, attr='file.pdf')
    193193        self.assertTrue(file is None)
    194194
     
    208208            % document.document_id in logcontent)
    209209        self.assertTrue(
    210             'INFO - zope.mgr - documents.browser.DocumentManageFormPage - %s - uploaded: sample.pdf (my_sample_scan.pdf)'
     210            'INFO - zope.mgr - documents.browser.DocumentManageFormPage - %s - uploaded: file.pdf (my_sample_scan.pdf)'
    211211            % document.document_id in logcontent)
    212212        self.assertTrue(
Note: See TracChangeset for help on using the changeset viewer.