Exemple #1
0
 def affiliations(self):
     r = html_reports.tag('p', 'Affiliations:', 'label')
     for item in self.article.affiliations:
         r += html_reports.tag('p', html_reports.format_html_data(item.xml))
     th, w, data = self.affiliations_sheet_data()
     r += html_reports.sheet(th, data)
     return r
 def rejected_order_changes(self):
     error_messages = []
     if len(self.pkg_validations.rejected_order_change) > 0:
         error_messages.append(html_reports.tag('h3', _('rejected orders')))
         error_messages.append('<div class="issue-problem">')
         error_messages.append(html_reports.p_message(validation_status.STATUS_FATAL_ERROR + ': ' + _('It is not allowed to use same order for different articles.')))
         for order, items in self.pkg_validations.rejected_order_change.items():
             error_messages.append(html_reports.tag('p', html_reports.format_html_data({order:items})))
         error_messages.append('</div>')
     return ''.join(error_messages)
Exemple #3
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