Commit 65de991c authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Update views/wizards/check_valdate.tex to fix bugs

parent a4f8367a
......@@ -17,7 +17,7 @@
{{
#--------------------------------------------------------------------------
#
# prepare the data
# prepare the data
# - build the title
# - count errors per project
# - insert URL to compare duplicate entries
......@@ -27,8 +27,7 @@
from datetime import datetime
# projects
projects = counters.keys()
projects.sort()
projects = sorted(counters.keys())
# title depends on the selector parameters
period = ""
......@@ -59,22 +58,22 @@
cnt = counters[project]
cnt.error = cnt.found - cnt.ok - cnt.validated
pass
# insert URL to compare duplicate entries
for msg in logs:
for i in range(len(msg.ids)):
id2 = msg.ids[i]
url = URL('wizards',
url = URL('wizards',
'compare_publications',
extension=False,
extension=False,
host=True,
scheme=True,
vars=dict(id1=msg.id, id2=id2))
msg.ids[i] = '\href{%s}{%s}' % (url, id2)
pass
pass
# sort the logs per error (txt)
data = {}
for msg in logs:
......@@ -86,8 +85,7 @@
pass
pass
errors = data.keys()
errors.sort()
errors = sorted(data.keys())
# sort title per alphabetic order
for error in data:
......@@ -100,7 +98,7 @@
#
#--------------------------------------------------------------------------
write("\\section*{%s}" % title)
#--------------------------------------------------------------------------
#
# render statistics table
......@@ -109,19 +107,19 @@
write("\\footnotesize")
write("\\begin{tabular}{lllll}")
write("\\hline")
# table header
tu = (T("Project"), T("Records"), T("Status OK"), T("Validated"), T("Invalid"))
write( " %s & %s & %s & %s & %s \\\\" % tu)
write("\\hline")
# table body
for project in projects:
cnt = counters[project]
tu = (project, cnt.found, cnt.ok, cnt.validated, cnt.error)
write( " %s & %s & %s & %s & %s \\\\" % tu)
pass
write("\\hline")
write("\\end{tabular}")
......@@ -132,22 +130,22 @@
#--------------------------------------------------------------------------
for error in errors:
write("\\subsection*{%s}" % error)
write("\\footnotesize")
write("\\begin{longtable}{p{0.5cm}p{9cm}p{0.5cm}p{1cm}p{1cm}p{1.5cm}r}")
write("\\hline")
# table header
tu = (T("Title"),
T("Id"),
T("Duplicate"),
T("Category"),
tu = (T("Title"),
T("Id"),
T("Duplicate"),
T("Category"),
T("Project"),
T("Year"))
write( " & %s & %s & %s & %s & %s & %s\\\\" % tu)
write("\\hline")
i = 0
for msg in data[error]:
i += 1
......@@ -158,16 +156,16 @@
msg.category,
msg.project,
msg.year)
write( " % 3i & %s & %s & %s & %s & %s & %s\\\\" % tu)
write("\\hline")
pass
write("\\hline")
write("\\end{longtable}")
pass
}}
\end{document}
{{include}}
\ No newline at end of file
{{include}}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment