Ignore:
Timestamp:
12 Jan 2015, 09:18:36 (10 years ago)
Author:
Henrik Bettermann
Message:

Remove redundant code and set download_filename only for pdf files.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.ikoba/trunk/src/waeup/ikoba/documents/fileviewlets.py

    r12444 r12446  
    4343    tab_redirect = '#tab2'
    4444
     45    @property
     46    def download_filename(self):
     47        return u"%s.pdf" % self.context.document_id[:9]
     48
    4549
    4650class PDFScanDisplay(FileDisplay):
     
    5559    download_name = u'file.pdf'
    5660
     61    @property
     62    def download_filename(self):
     63        return u"%s.pdf" % self.context.document_id[:9]
     64
    5765
    5866class PDFScanImage(UtilityView, Image):
     
    6472    download_name = u'file.pdf'
    6573
     74    @property
     75    def download_filename(self):
     76        return u"%s" % self.context.document_id[:9]
     77
    6678    def update(self):
    6779        if self.context.state != PUBLISHED:
Note: See TracChangeset for help on using the changeset viewer.