Example #1
0
 def table_tables(self):
     r = '<!-- no tables -->'
     if len(self.article.tables) > 0:
         r = html_reports.tag('p', 'Tables:', 'label')
         for t in self.article.tables:
             if t.table:
                 table_data = ''
                 table_data += html_reports.display_labeled_value('label', t.label, 'label')
                 table_data += html_reports.tag('div', t.table, 'element-table')
                 r += html_reports.tag('div', table_data, 'block')
     return r
Example #2
0
    def tables(self):
        r = '<!-- no tables -->'
        if len(self.article.tables) > 0:
            r = html_reports.tag('p', 'Tables:', 'label')

            for t in self.article.tables:
                #print(t)
                header = html_reports.tag('h3', t.id)
                table_data = ''
                table_data += html_reports.display_labeled_value('label', t.label, 'label')
                table_data += html_reports.display_labeled_value('caption',  t.caption, 'label')
                table_data += html_reports.tag('p', 'table-wrap/table (xml)', 'label')
                table_data += html_reports.tag('div', html_reports.format_html_data(t.table), 'xml')
                if t.table:
                    table_data += html_reports.tag('p', 'table-wrap/table', 'label')
                    table_data += html_reports.tag('div', t.table, 'element-table')
                if t.graphic:
                    #table_data += html_reports.display_labeled_value('table-wrap/graphic', t.graphic.display('file:///' + self.xml_path), 'value')
                    table_data += html_reports.display_labeled_value('table-wrap/graphic', html_reports.thumb_image('{IMG_PATH}'), 'value')
                r += header + html_reports.tag('div', table_data, 'block')
        return r
Example #3
0
 def display_titles(self):
     r = ''
     for title in self.article.titles:
         r += html_reports.display_labeled_value(title.language, title.title)
     return r
Example #4
0
 def display_labeled_value(self, label, value, style=''):
     return html_reports.display_labeled_value(label, value, style)