% endif
</%block>
-<%block name="error_report">
+<%doc> Error reporting </%doc>
+
+<%def name="error_file_summary(e_cnt, lines, filepath, relation)">
% if e_cnt:
<p><em class="error">${e_cnt} errors</em>
% if lines == UNDEFINED or lines == 0:
found.
% else:
- found in a file of ${lines} lines. (Including column headings.)
+ found
+ % if relation is None:
+ in
+ % else:
+ while inserting data into ${relation} from
+ % endif
+ % if filepath is None:
+ a file of
+ % else:
+ file ${filepath}, containing
+ % endif
+ ${lines} lines. (Including column headings.)
% endif
</p>
% endif
+</%def>
+<%def name="error_items(errors)">
% for error in errors:
## Get error attributes
% endif
% endfor
+</%def>
+
+<%block name="error_report">
+ <% self.error_file_summary(e_cnt, lines, None, None) %>
+ <% self.error_items(errors) %>
</%block>
<%def name="upload_form(extra_rows=[], upload_nulls=True)">