Skip to content

Commit

Permalink
updated blueprints, added new items, Voting, Ideation, Regional 3D Ma…
Browse files Browse the repository at this point in the history
…p, Curriculum Radial Map #5
  • Loading branch information
christopherreay committed Sep 23, 2018
1 parent 2d16d23 commit 5602843
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 2 deletions.
20 changes: 19 additions & 1 deletion models.py
Original file line number Diff line number Diff line change
Expand Up @@ -3495,11 +3495,29 @@ def appmaker(zodb_root, savedModelInstances_root):
{ "icon": "earth.svg",
"src" : "/static/threeJS/box/box.html",
}
iframeModelClasses["Voting"] = \
{ "icon": "earth.svg",
"src" : "https://visual.tools/votingModel/scotland/national",
}
iframeModelClasses["Ideation"] = \
{ "icon": "earth.svg",
"src" : "https://ideationboard.visual.tools/",
}
iframeModelClasses["RegionalData"] = \
{ "icon": "gas-mask.svg",
"src" : "/static/threeJS/map/map.html",
"displayName" : "Regional Data",
}
iframeModelClasses['CurriculumRadialMap'] = \
{ "icon": "gas-mask.svg",
"src" : "/static/legacy/curriculumRadialMap/d3TableHack-2.html",
"displayName" : "Curriculum Radial Map",
}

#appRoot['coalPowerStation'] = ModelClass()
#coal = Coal("coal", appRoot)
#appRoot['coal'] = coal

# import copy

# print "savedModelInstances"
Expand Down
23 changes: 22 additions & 1 deletion views.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,33 @@ def debug(request):
"""toReturn = svgFieldValue / 2.5"""
request.root['modelClasses']['Wood']['svgDisplayDefs']['svgDefinitions'][('volume',)]['svgDisplayDefByValue']['toReturn = True']['height'] = \
'\nif svgQuantiseValue < 1.0:\n toReturn = 8 * svgQuantiseValue\nelse:\n toReturn = 8\n'

toInsert="#fieldInfo_<a href=\"https://www.forestry.gov.uk/pdf/TimberVolumeCalculator.pdf/$FILE/TimberVolumeCalculator.pdf\">source for 2.5m3 per tree</a>"
if toInsert not in request.root['modelClasses']['Wood']['inputFieldHUD']['FieldOrder.preClone']['orderList']:
request.root['modelClasses']['Wood']['inputFieldHUD']['FieldOrder.preClone']['orderList']\
.insert(4, toInsert)

# if "Voting" not in request.root['iframeModelClasses']:
request.root['iframeModelClasses']['Voting'] = \
{ "icon": "earth.svg",
"src" : "votingModel/scotland/national",
}
request.root['iframeModelClasses']['Ideation'] = \
{ "icon": "earth.svg",
"src" : "https://ideationboard.visual.tools/",
}
request.root['iframeModelClasses']['RegionalData'] = \
{ "icon": "gas-mask.svg",
"src" : "/static/threeJS/map/map.html",
"displayName" : "Regional Data",
}
request.root['iframeModelClasses']['CurriculumRadialMap'] = \
{ "icon": "gas-mask.svg",
"src" : "/static/legacy/curriculumRadialMap/d3TableHack-2.html",
"displayName" : "Curriculum Radial Map",
}


transaction.commit()

return {}
Expand Down

0 comments on commit 5602843

Please sign in to comment.