Logo Search packages:      
Sourcecode: zope-formulator version File versions  Download package

def Formulator::Form::ZMIForm::get_group_rows (   self  ) 

Get the groups in rows (for the order screen).

Definition at line 873 of file Form.py.

00873                             :
        """Get the groups in rows (for the order screen).
        """
        row_length = self.row_length
        groups = self.get_groups(include_empty=1)
        # get the amount of rows
        rows = len(groups) / row_length
        # if we would have extra groups not in a row, add a row
        if len(groups) % self.row_length != 0:
            rows = rows + 1
        # now create a list of group lists and return it
        result = []
        for i in range(rows):
            start = i * row_length
            result.append(groups[start: start + row_length])
        return result

    security.declareProtected('View', 'get_largest_group_length')
    def get_largest_group_length(self):


Generated by  Doxygen 1.6.0   Back to index