Commit 468e7dcd authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

The wizard "check" can be ran by user and "check validate" by admin.

parent ca6d1246
......@@ -63,7 +63,7 @@
"can be applied on any field of the table using the where syntax. don't work with the foreign table (see smart_query in the web2py)": "can be applied on any field of the table using the where syntax. don't work with the foreign table (see smart_query in the web2py)",
"Can't access the MySQL database !!!": "La base de données MySQL n'est pas accesible !!!",
"Can't delete a publication marked OK.": 'Impossible de détruire une publication marquée OK.',
"Can't delete this record since several publications refer to it.": "Impossible de détruire cet enregistrement car des publications lui font référence.",
"Can't delete this record since several publications refer to it.": 'Impossible de détruire cet enregistrement car des publications lui font référence.',
"Can't insert the article.": 'Impossible de créer cet article.',
"Can't insert the report.": 'Impossible de créer ce rapport.',
"Can't insert the talk/proceeding.": 'Impossible de créer cet acte ou présentation.',
......@@ -78,6 +78,7 @@
'Change password': 'Change password',
'change status': 'modifie le status',
'Chapter(s)': 'Chaptitre(s)',
'check': 'vérifier',
'Check and validate': 'Vérifier et valider',
'check and validate': 'vérifier et valider',
'Check latex syntax in the title': 'Vérifier la syntaxe latex dans le titre',
......
......@@ -2,6 +2,13 @@
""" widgets fields
"""
#
# check selector (hidden)
#
if session.role != ADMIN:
fieldsModifier = dbui.FieldsModifier('check_selector')
fieldsModifier.configure_field('mode', hidden=True)
#
# free harvest selector (merge)
#
......
......@@ -135,7 +135,9 @@ if session.role in (ADMIN, USER):
if session.role == ADMIN:
wizardNode.add_child(T('check and validate'), checkLeaf)
else:
wizardNode.add_child(T('check'), checkLeaf)
wizardNode.sort_children()
#
......
......@@ -5,8 +5,9 @@ HEAD
- Add the module check_tools and callbacks
- More stringent tests in the "chack and validate" procedure
- Duplicate entries are reject on insert and look for during check.
- Can't delete or updata a publication marked OK.
- Can't delete a reference field used by at least one publication.
- Can't delete or update a publication marked OK.
- Can't delete a reference entry used by at least one publication.
- The wizard "check" can be ran by user and "check validate" by admin.
- Add the generic pdf converter to be used in view (view/tex2pdf.html).
- Pdf reports can be generated for "check and validate" and
"run harvester(s)" operations.
......
......@@ -2,32 +2,32 @@
my_style = """
.my-li,
.my-ol,
.my-p,
.my-p,
.my-p-smallcap {
font-family: Liberation Sherif, Sherif;
font-size: 11px;
}
.my-li,
.my-ol {
margin-left: 35px;
margin-bottom: 0px;
}
.my-ol {
list-style-type: decimal;
}
.my-p,
.my-p,
.my-p-smallcap {
margin-left: 20px;
}
.my-p-smallcap {
font-variant: small-caps;
margin-bottom: 1ex;
}
"""
response.write(BR())
response.write(STYLE(XML(my_style)))
......@@ -38,13 +38,13 @@
def myol(*args):
return OL(*args, _class="my-ol")
def myp(txt):
return P(txt, _class="my-p")
def myp_smallcap(txt):
return P(txt, _class="my-p-smallcap")
#
# Header
#
......@@ -54,27 +54,29 @@
# Scanning condition and results
#
ul = UL()
txt = T("Number of records found: %s") % nfound
ul.append(myli(txt))
txt = T("Number of records already validated: %s") % nok
ul.append(myli(txt))
txt = T("Number of records validated: %s") % nvalidated
ul.append(myli(txt))
if session.role == ADMIN:
txt = T("Number of records already validated: %s") % nok
ul.append(myli(txt))
txt = T("Number of records validated: %s") % nvalidated
ul.append(myli(txt))
pass
txt = T("Number of invalid records: %s") % (nfound - nok - nvalidated)
ul.append(myli(txt))
response.write(ul)
#
# Log
#
response.write(BR())
response.write(myp_smallcap(T("Invalid records")))
ol = myol()
for msg in logs:
title = "%s, " % msg.title
......@@ -83,5 +85,5 @@
ol.append(LI(title, txt, id))
pass
response.write(ol)
response.write(ol)
}}
......@@ -66,11 +66,13 @@
txt = T("Number of records found")
write(" %s & %s \\\\" % (txt, nfound), escape=False)
txt = T("Number of records already validated")
write(" %s & %s \\\\" % (txt, nok), escape=False)
txt = T("Number of records validated")
write(" %s & %s \\\\" % (txt, nvalidated), escape=False)
if session.role == ADMIN:
txt = T("Number of records already validated")
write(" %s & %s \\\\" % (txt, nok), escape=False)
txt = T("Number of records validated")
write(" %s & %s \\\\" % (txt, nvalidated), escape=False)
pass
txt = T("Number of invalid records")
write(" %s & %s \\\\" % (txt, nfound-nok-nvalidated), escape=False)
......
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