Commit 5746eb74 authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Update selector to add citation_selector.

parent c44e3094
......@@ -39,6 +39,7 @@ class Selector(object):
"""
Selector.authors_selector(virtdb, db, T)
Selector.check_selector(virtdb, db, T)
Selector.citation_selector(virtdb, db, T)
Selector.edit_insert_selector(virtdb, db, T)
Selector.free_harvester_selector(virtdb, db, T)
Selector.graph_selector(virtdb, db, T)
......@@ -120,6 +121,32 @@ class Selector(object):
return table
@staticmethod
def citation_selector(virtdb, db, T):
"""citations selector.
Note:
selector table are store in a virtual database.
Args:
virtdb (pyDAL.DAL): connection to the virtual database
db (pyDAL.DAL): connection to the database of the application
T (gluon.languages.translator): language translator
Returns:
pyDAL.Table
"""
table = virtdb.define_table(
"citation_selector",
Field("id_teams", "reference teams", label="Team"),
Field("id_projects", "reference projects", label="Project"))
table.id_projects.requires = IS_IN_DB(db, "projects.project")
table.id_teams.requires = IS_IN_DB(db, "teams.team")
return table
@staticmethod
def edit_insert_selector(virtdb, db, T):
"""edit and insert selector.
......
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