Ignore:
Timestamp:
29 May 2012, 14:16:23 (12 years ago)
Author:
Henrik Bettermann
Message:

Disable Applicants tab for containers with more than 5000 records.

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

Legend:

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

    r8524 r8547  
    323323    pnav = 3
    324324
     325    @property
     326    def showApplicants(self):
     327        if len(self.context) < 5000:
     328            return True
     329        return False
     330
    325331    def update(self):
    326332        datepicker.need() # Enable jQuery datepicker in date fields.
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser_templates/applicantscontainermanagepage.pt

    r8314 r8547  
    3434    </div>
    3535    <div id="tab-2" tal:attributes="class view/tab2">
    36 
     36    <tal:showApplicants  condition="view/showApplicants">
    3737    <input type="checkbox" onClick="toggle(this, 'val_id')" />
    3838    <span  i18n:translate="">Select all</span>
     
    8484        </span>
    8585      </div>
     86    </tal:showApplicants>
     87    <tal:showNoApplicants condition="not: view/showApplicants">
     88      <p i18n:translate="note_armp">
     89          There are more than 5000 application records in this container.
     90          In order to prevent from downloading big amounts of data, the
     91          Applicants tab has been disabled. Please use the
     92          <a tal:attributes="href python: view.url(layout.site, 'applicants/search')">
     93          search form</a>
     94          for accessing application records.
     95      </p>
     96    </tal:showNoApplicants>
    8697    </div>
    8798    <div id="tab-3" tal:attributes="class view/tab3"> <br />
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser_templates/applicantsrootmanagepage.pt

    r8406 r8547  
    5454            <th i18n:translate="">Title
    5555            </th>
     56            <th i18n:translate="">Records
     57            </th>
    5658          </tr>
    5759        </thead>
     
    6567                tal:content="entry/__name__">CODE</a> </td>
    6668            <td tal:content="entry/title">TITLE</td>
     69            <td tal:content="python:len(entry)">YEAR</td>
    6770          </tr>
    6871        </tbody>
Note: See TracChangeset for help on using the changeset viewer.