+ kwargs['stylesheet'] = 'legacy'
+
+ output = document_html_resource.handler.read(request, **kwargs)
+
+ if isinstance(output, HttpResponse):
+ # errors = json.loads(output.content)
+ output.mimetype = "text/plain"
+ return output
+
+ return direct_to_template(request, 'html4print.html',
+ extra_context={'output': output, 'docid': kwargs['docid']},
+ mimetype="text/html" )
+
+
+def _add_references(message, issues):
+ return message + " - " + ", ".join(map(lambda issue: "Refs #%d" % issue['id'], issues))
+
+def _get_issues_for_file(fileid):
+ uf = None