Commit 26c57e4c authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Update classes defining the UI to replace the tune method by a constructor.

parent 328cd14f
......@@ -14,9 +14,26 @@ storeModifier = dbui.StoreModifier
class EvtUiCore(object):
"""The User interface for the core tables.
"""Tune the user interface for the history table and its foreign tables,
Args:
db (pyDAL.DAL): database connection
T (): language translator
"""
def __init__(self, db, T):
EvtUiCore.domains(db, T)
EvtUiCore.events(db, T)
EvtUiCore.fundings(db, T)
EvtUiCore.history(db, T)
EvtUiCore.object_categories(db, T)
EvtUiCore.objects(db, T)
EvtUiCore.people_categories(db, T)
EvtUiCore.people(db, T)
EvtUiCore.projects(db, T)
EvtUiCore.teams(db, T)
@staticmethod
def domains(db, T):
"""UI for the domains table
......@@ -371,23 +388,3 @@ class EvtUiCore(object):
# Store
#
storeModifier("teams").orderby(db.teams.team)
@staticmethod
def tune(db, T):
"""Tune the configuration of the UI to all core tables.
Args:
db (pyDAL.DAL): database connection
T (gluon.languages.translator): language translator
"""
EvtUiCore.domains(db, T)
EvtUiCore.events(db, T)
EvtUiCore.fundings(db, T)
EvtUiCore.history(db, T)
EvtUiCore.object_categories(db, T)
EvtUiCore.objects(db, T)
EvtUiCore.people_categories(db, T)
EvtUiCore.people(db, T)
EvtUiCore.projects(db, T)
EvtUiCore.teams(db, T)
......@@ -12,9 +12,21 @@ storeModifier = dbui.StoreModifier
class EvtUiReport(object):
"""The User interface for the report tables.
"""Tune the user interface for the report tables: lists, metrics1d,
metrics2d and graphs.
Args:
db (pyDAL.DAL): database connection
T (): language translator
"""
def __init__(self, db, T):
EvtUiReport.graphs(db, T)
EvtUiReport.lists(db, T)
EvtUiReport.metrics1d(db, T)
EvtUiReport.metrics2d(db, T)
@staticmethod
def graphs(db, T):
"""UI for the graphs table
......@@ -292,18 +304,3 @@ class EvtUiReport(object):
# Store
#
storeModifier("metrics2d").orderby(db.metrics2d.name)
@staticmethod
def tune(db, T):
"""Tune the configuration of the UI to all report tables.
Args:
db (pyDAL.DAL): database connection
T (gluon.languages.translator): language translator
"""
EvtUiReport.graphs(db, T)
EvtUiReport.lists(db, T)
EvtUiReport.metrics1d(db, T)
EvtUiReport.metrics2d(db, T)
......@@ -14,9 +14,18 @@ storeModifier = dbui.StoreModifier
class EvtUiSelector(object):
"""The User interface for the report tables.
"""Tune the user interface for the selector.
Args:
virtdb (pyDAL.DAL): connection to the virtual database
db (pyDAL.DAL): database connection
T (): language translator
"""
def __init__(self, virtdb, db, T):
EvtUiSelector.selector(virtdb, db, T)
@staticmethod
def selector(virtdb, db, T):
"""UI for the selector table
......@@ -140,15 +149,3 @@ class EvtUiSelector(object):
selectorItems=fieldset)
return selector_panel
@staticmethod
def tune(virtdb, db, T):
"""Tune the configuration of the UI for selectors.
Args:
virtdb (pyDAL.DAL): connection to the virtual database
db (pyDAL.DAL): database connection
T (gluon.languages.translator): language translator
"""
EvtUiSelector.selector(virtdb, db, T)
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