Commit 20fa12c9 authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Redesign the viewport (configure, meta, events, listes, metrics, graphs).

parent 575ba0ed
......@@ -50,11 +50,8 @@
'Columns': 'Colonnes',
'Conditions': 'Conditions',
'Configuration': 'Configuration',
'Configure lists': 'Configurer les listes',
'Configure people': 'Configurer les personnels',
'Configure responsibilities': 'Configurer les responsabilités',
'Configure teams': 'Configurer les équipes',
'Configure views': 'Configurer les « views »',
'Configure': 'Configurer',
'Configure lists': 'Configure lists',
'contains': 'contiens',
'Contract': 'Contrat',
'Controller': 'Controller',
......@@ -102,6 +99,7 @@
'enter date as %(format)s': 'enter date as %(format)s',
'Event': 'Evènement',
'Event category': 'Event category',
'Events': 'Evènements',
'events': 'évènements',
'Evènement': 'Evènement',
'Executed': 'Executé',
......@@ -205,6 +203,7 @@
'Lost password?': 'Lost password?',
'Max Records': 'Max Records',
'Meta': 'Méta',
'Meta data': 'Méta données',
'Metric': 'Métrique',
'Metric / year / category': 'Métrique / année / catégorie',
'Metric / year / quality': 'Métrique / année / qualité',
......@@ -295,6 +294,9 @@
'Team': 'Équipe',
'teams': 'équipes',
'Tests': 'Tests',
'The graphs': 'Les graphs',
'The lists': 'les listes',
'The metrics': 'Les métriques',
"The report id '%s' is unknown.": "The report id '%s' is unknown.",
'Time': 'Temps',
'Timestamp': 'Timestamp',
......
......@@ -24,52 +24,6 @@ if "auth" in globals():
casNode.add_child(T('groups'), to_grid('auth_group'))
casNode.add_child(T('relation user / groups'), to_grid('auth_membership'))
#-------------------------------------------------------------------------------
#
# CONFIGURE LIST
#
#-------------------------------------------------------------------------------
cfgListNode = Node(T('Configure lists'))
cfgListNode.add_child(T('events'), to_grid('events'))
cfgListNode.add_child(T('Configure views'), to_grid('views'))
#-------------------------------------------------------------------------------
#
# CONFIGURE PEOPLE
#
#-------------------------------------------------------------------------------
cfgPeopleNode = Node(T('Configure people'))
cfgPeopleNode.add_child(T('fundings'), to_grid('fundings'))
cfgPeopleNode.add_child(T('people_categories'), to_grid('people_categories'))
#-------------------------------------------------------------------------------
#
# CONFIGURE RESPONSIBILITIES
#
#-------------------------------------------------------------------------------
cfgRespNode = Node(T('Configure responsibilities'))
cfgRespNode.add_child(T('organizations'), to_grid('organizations'))
cfgRespNode.add_child(T('organization_level'), to_grid('organization_levels'))
#-------------------------------------------------------------------------------
#
# CONFIGURE TEAM
#
#-------------------------------------------------------------------------------
cfgTeamNode = Node(T('Configure teams'))
cfgTeamNode.add_child(T('teams'), to_grid('teams'))
cfgTeamNode.add_child(T('projects'), to_grid('projects'))
#-------------------------------------------------------------------------------
#
# DATA PEOPLE
#
#-------------------------------------------------------------------------------
dataPeopleNode = Node(T('Data people'))
dataPeopleNode.add_child(T('people'), to_grid('people'))
dataPeopleNode.add_child(T('history'), to_grid('history'))
#-------------------------------------------------------------------------------
#
# HELP NODE
......@@ -103,21 +57,56 @@ helpNode.sort_children()
#-------------------------------------------------------------------------------
#
# REPORT NODE (NEW APPROACH BASE ON IONLINE SCRIPT -- 2014)
# CONFIGURE
#
#-------------------------------------------------------------------------------
cfgNode = Node(T('Configure'))
cfgNode.add_child(T('Configure lists'), to_grid('views'))
#-------------------------------------------------------------------------------
#
# META DATA
#
#-------------------------------------------------------------------------------
reportNode2 = Node(T('Reports (new)'))
metaNode = Node(T('Meta data'))
metaNode.add_child(T('fundings'), to_grid('fundings'))
metaNode.add_child(T('teams'), to_grid('teams'))
metaNode.add_child(T('people'), to_grid('people'))
metaNode.add_child(T('people_categories'), to_grid('people_categories'))
metaNode.add_child(T('projects'), to_grid('projects'))
metaNode.sort_children()
#-------------------------------------------------------------------------------
#
# EVENT
#
#-------------------------------------------------------------------------------
eventNode = Node(T('Events'))
eventNode.add_child(T('events'), to_grid('events'))
eventNode.add_child(T('history'), to_grid('history'))
#-------------------------------------------------------------------------------
#
# LIST
#
#-------------------------------------------------------------------------------
listNode = Node(T('The lists'))
# add the lists defined in the database
for row in db(db.views.id > 0).select():
leaf = PanelWithUrlSelector(virtdb.list_selector,
baseUrl=URL('list2', 'list'),
baseParams={'id_views': row.id})
reportNode2.add_child(row.view, leaf)
listNode.add_child(row.view, leaf)
#-------------------------------------------------------------------------------
#
# METRIC
#
#-------------------------------------------------------------------------------
metricNode = Node(T('The metrics'))
# add the metric
leaf1 = PanelWithUrlSelector(virtdb.metric_selector,
baseParams={'group': 'people_categories.category'},
baseUrl=URL('list2', 'metric'))
......@@ -134,75 +123,18 @@ leaf4 = PanelWithUrlSelector(virtdb.metric_selector,
baseParams={'group': 'people_categories.code'},
baseUrl=URL('list2', 'metric_per_year'))
reportNode2.add_child(T('Metrics / category'), leaf1)
reportNode2.add_child(T('Metrics / quality'), leaf2)
reportNode2.add_child(T('Metric / year / category'), leaf3)
reportNode2.add_child(T('Metric / year / quality'), leaf4)
reportNode2.sort_children()
metricNode.add_child(T('Metrics / category'), leaf1)
metricNode.add_child(T('Metrics / quality'), leaf2)
metricNode.add_child(T('Metric / year / category'), leaf3)
metricNode.add_child(T('Metric / year / quality'), leaf4)
metricNode.sort_children()
#-------------------------------------------------------------------------------
#
# REPORT NODE (OBSOLETE)
# GRAPH
#
#-------------------------------------------------------------------------------
hardwareLeaf = PanelWithUrlSelector(virtdb.hardware_selector,
baseUrl=URL('list', 'hardware'),
extField='format')
listLeaf = PanelWithUrlSelector(virtdb.list_selector,
baseUrl=URL('list', 'list'),
extField='format')
listPeopleLeaf = PanelWithUrlSelector(virtdb.people_selector,
baseUrl=URL('list', 'people'),
extField='format')
respLeaf = PanelWithUrlSelector(virtdb.responsibilities_selector,
baseUrl=URL('list', 'responsibilities'),
extField='format')
traineeLeaf = PanelWithUrlSelector(virtdb.trainee_selector,
baseUrl=URL('list', 'trainee'),
extField='format')
peopleCategoryLeaf = PanelWithUrlSelector(virtdb.people_selector,
baseUrl=URL('metric', 'people_per_category'),
extField='format')
peopleQualityLeaf = PanelWithUrlSelector(virtdb.people_selector,
baseUrl=URL('metric', 'people_per_quality'),
extField='format')
peopleTeamLeaf = PanelWithUrlSelector(virtdb.people_selector,
baseUrl=URL('metric', 'people_per_team'),
extField='format')
reportNode = dbui.Node(T('Reports (old)'))
reportNode.add_child(T('List'), listLeaf)
reportNode.add_child(T('List of hardware'), hardwareLeaf)
reportNode.add_child(T('List of people'), listPeopleLeaf)
reportNode.add_child(T('List of responsibilities'), respLeaf)
reportNode.add_child(T('List of trainee'), traineeLeaf)
reportNode.add_child(T('Metric people per category'), peopleCategoryLeaf)
reportNode.add_child(T('Metric people per quality'), peopleQualityLeaf)
reportNode.add_child(T('Metric people per team'), peopleTeamLeaf)
reportNode.sort_children()
#-------------------------------------------------------------------------------
#
# WIZARD NODE
#
#-------------------------------------------------------------------------------
personLeaf = PanelWithUrlSelector(virtdb.person_wizard,
baseUrl=URL('wizard', 'person'))
traineeLeaf = PanelWithUrlSelector(virtdb.trainee_wizard,
baseUrl=URL('wizard', 'trainee'))
wizardNode = dbui.Node(T('Wizards'))
wizardNode.add_child(T('Add person'), personLeaf)
wizardNode.add_child(T('Add trainee'), traineeLeaf)
graphNode = Node(T('The graphs'))
#-------------------------------------------------------------------------------
#
......@@ -211,14 +143,12 @@ wizardNode.add_child(T('Add trainee'), traineeLeaf)
#-------------------------------------------------------------------------------
nodes = [helpNode,
casNode,
cfgListNode,
cfgPeopleNode,
cfgRespNode,
cfgTeamNode,
wizardNode,
dataPeopleNode,
reportNode2,
reportNode]
cfgNode,
metaNode,
eventNode,
listNode,
metricNode,
graphNode]
viewportModifier = dbui.ViewportModifier()
viewportModifier.add_node(*nodes)
......@@ -228,4 +158,4 @@ viewportModifier.configure(tabTitleTpl="{1}")
if session.auth:
viewportModifier.configure(logged=True, plugins=['pViewportLogin'])
viewportModifier.default_node(T('Data people'), T('history'))
viewportModifier.default_node(T('Events'), T('history'))
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