Example #1
0
 def _make_table(self):
     form = self._form
     if form is None:
         return lcg.Content()
     table = pytis.output.data_table(form.view_spec(), form.data(),
                                     condition=form.condition(), sorting=form.sorting(),
                                     transaction=self._transaction)
     return table.lcg()
Example #2
0
 def _make_table(self):
     form = self._form
     if form is None:
         return lcg.Content()
     table = pytis.output.data_table(form.view_spec(), form.data(),
                                     condition=form.condition(), sorting=form.sorting(),
                                     transaction=self._transaction)
     return table.lcg()
Example #3
0
 def __init__(self, resolver, form, transaction, parameters):
     name = form.name()
     condition = form.condition()
     sorting = form.sorting()
     if condition is None:
         condition = parameters.get(name + '/' + pytis.output.P_CONDITION)
     if sorting is None:
         sorting = parameters.get(name + '/' + pytis.output.P_SORTING)
     super(_FormDataIterator, self).__init__(resolver, name, condition=condition,
                                             sorting=sorting, transaction=transaction)
Example #4
0
 def __init__(self, resolver, form, transaction, parameters):
     name = form.name()
     condition = form.condition()
     sorting = form.sorting()
     if condition is None:
         condition = parameters.get(name + '/' + pytis.output.P_CONDITION)
     if sorting is None:
         sorting = parameters.get(name + '/' + pytis.output.P_SORTING)
     super(_FormDataIterator, self).__init__(resolver, name, condition=condition,
                                             sorting=sorting, transaction=transaction)
Example #5
0
 def _make_agg_value(self, op, column):
     form = self._form
     if form is None:
         return lcg.Content()
     colid = column.id()
     if not pytis.form.has_access(form.name(), perm=pytis.data.Permission.VIEW,
                                  column=colid):
         return column.type().secret_export()
     data = form.data()
     condition = form.condition()
     return data.select_aggregate((op, colid,), condition=condition,
                                  transaction=self._transaction).value()
Example #6
0
 def _make_agg_value(self, op, column):
     form = self._form
     if form is None:
         return lcg.Content()
     colid = column.id()
     if not pytis.form.has_access(form.name(), perm=pytis.data.Permission.VIEW,
                                  column=colid):
         return column.type().secret_export()
     data = form.data()
     condition = form.condition()
     return data.select_aggregate((op, colid,), condition=condition,
                                  transaction=self._transaction).value()