Changeset 9592


Ignore:
Timestamp:
9 Nov 2012, 09:48:28 (12 years ago)
Author:
Henrik Bettermann
Message:

Show warning message on datacenter page if number of pending files exceeds the max_files limit.

Location:
main/waeup.kofa/trunk/src/waeup/kofa/browser
Files:
3 edited

Legend:

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

    r9590 r9592  
    832832    label = _(u'Data Center')
    833833    pnav = 0
     834    max_files = 10
    834835
    835836    def update(self):
    836837        datatable.need()
    837838        warning.need()
     839        self.max_exceeded = False
     840        number_of_pendings = len(self.context.getPendingFiles())
     841        if number_of_pendings > self.max_files:
     842            self.max_exceeded = True
    838843        return super(DatacenterPage, self).update()
    839844
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/datacenterfinishedpage.pt

    r9589 r9592  
     1<p i18n:translate="">
     2  Find below the last
     3  <span tal:content="view/context/max_files" i18n:name="count">50</span>
     4  imports. The files contain the imported datasets.
     5</p>
    16<table i18n:domain="waeup.kofa" class="display dataTableFiles">
    2   <p i18n:translate="">
    3     Find below the last
    4     <span tal:content="view/context/max_files" i18n:name="count">50</span>
    5     imports. The files contain the imported datasets.
    6   </p>
    77  <thead>
    88    <tr>
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/datacenterpage.pt

    r9195 r9592  
     1<p class="alert-message warning" i18n:translate=""
     2  tal:condition="view/max_exceeded">
     3  <strong>NOTICE:</strong>
     4  There are more than
     5  <span tal:content="view/max_files" i18n:name="count">50</span>
     6  pending files in the data center. Please repair them first before uploading
     7  new files. Download and edit their records according to the error
     8  messages in the last column.
     9  Do not change file names when re-uploading files.
     10  If a file contains no more data for import just remove it.
     11</p>
     12
    113<p  i18n:domain="waeup.kofa" i18n:translate="">
    214The data center helps you to manage portal data. You can upload CSV
Note: See TracChangeset for help on using the changeset viewer.