Beispiel #1
0
    def rows(self):
        checkbox_format = '<input type="checkbox" class="xform-checkbox" value="{}" name="xform_ids"/>'

        for form in self.es_query_result.hits:
            display = FormDisplay(form, self)
            yield [
                format_html(checkbox_format, form["_id"]),
                display.form_data_link,
                display.username,
                display.submission_or_completion_time,
                display.readable_form_name,
            ]
Beispiel #2
0
    def rows(self):
        for form in self.es_query_result.hits:
            display = FormDisplay(form, self, lang=get_language())
            row = [
                display.form_data_link,
                display.username,
                display.submission_or_completion_time,
                display.readable_form_name,
            ]

            if self.show_extra_columns:
                row.append(form.get('last_sync_token', ''))
            yield row
Beispiel #3
0
 def rows(self):
     for form in self.es_query_result.hits:
         display = FormDisplay(form, self)
         checkbox = mark_safe(
             """<input type="checkbox" class="xform-checkbox"
             value="{form_id}" name="xform_ids"/>""")
         yield [
             checkbox.format(form_id=form["_id"]),
             display.form_data_link,
             display.username,
             display.submission_or_completion_time,
             display.readable_form_name,
         ]
Beispiel #4
0
    def rows(self):
        submissions = [res['_source'] for res in self.es_results.get('hits', {}).get('hits', [])]

        for form in submissions:
            display = FormDisplay(form, self, lang=get_language())
            row = [
                display.form_data_link,
                display.username,
                display.submission_or_completion_time,
                display.readable_form_name,
            ]

            if self.show_extra_columns:
                row.append(form.get('last_sync_token', ''))
            yield row
Beispiel #5
0
    def rows(self):
        results = self.es_results.get('hits', {}).get('hits', [])

        for result in results:
            form = result['_source']
            display = FormDisplay(form, self)
            checkbox = mark_safe(
                """<input type="checkbox" class="xform-checkbox"
                value="{form_id}" name="xform_ids"/>""")
            yield [
                checkbox.format(form_id=form["_id"]),
                display.form_data_link,
                display.username,
                display.submission_or_completion_time,
                display.readable_form_name,
            ]