Esempio n. 1
0
    def fields(self):
        print_id = None
        if self.detail.print_template:
            print_id = self.column.field

        if self.app.enable_multi_sort:
            yield sx.Field(
                header=self.header,
                template=self.template,
                sort_node=self.sort_node,
                print_id=print_id,
            )
        elif self.sort_xpath_function and self.detail.display == 'short':
            yield sx.Field(
                header=self.header,
                template=self.hidden_template,
                print_id=print_id,
            )
            yield sx.Field(
                header=self.hidden_header,
                template=self.template,
                print_id=print_id,
            )
        else:
            yield sx.Field(
                header=self.header,
                template=self.template,
                print_id=print_id,
            )
Esempio n. 2
0
 def fields(self):
     if self.app.enable_multi_sort:
         yield sx.Field(
             header=self.header,
             template=self.template,
             sort_node=self.sort_node,
         )
     elif self.sort_xpath_function and self.detail.display == 'short':
         yield sx.Field(
             header=self.header,
             template=self.hidden_template,
         )
         yield sx.Field(
             header=self.hidden_header,
             template=self.template,
         )
     else:
         yield sx.Field(
             header=self.header,
             template=self.template,
         )