From 7d32bc57b0522f78243fc3084193a3622749ea77 Mon Sep 17 00:00:00 2001 From: Mahendra Date: Thu, 18 Feb 2021 14:47:19 +0100 Subject: [PATCH 1/5] Add a dummy dictionary with some project parameters --- src/GUI_draft/templates/create_project.html | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/GUI_draft/templates/create_project.html b/src/GUI_draft/templates/create_project.html index 752ff40a..af0a50f3 100644 --- a/src/GUI_draft/templates/create_project.html +++ b/src/GUI_draft/templates/create_project.html @@ -5,6 +5,13 @@ {% block content %} +{% set project_parameters={ + 'Project Name': {'value': '', 'default_value': 'Berlin Energy Cell', 'type': str, 'description': 'Name of the project, defined by user', 'unit': None, 'restrictions': None }, + 'Project Id': {'value': '', 'default_value': 'proj_3_2', 'type': str, 'description': 'ID for project, assigned by user', 'unit': None, 'restrictions': None }, + 'Country': {'value': '', 'default_value': 'Germany', 'type': str, 'description': 'Country where the project is located', 'unit': None, 'restrictions': None }, + 'Project Duration': {'value': '', 'default_value': '1', 'type': float, 'description': 'Number of years for which the energy system is simulated', 'unit': 'Years', 'restrictions': 'A whole or decimal point number' }, +} %} +
From 7627ce0720f9dd5b9e3b922778d2019dad6a31eb Mon Sep 17 00:00:00 2001 From: Mahendra Date: Thu, 18 Feb 2021 19:18:56 +0100 Subject: [PATCH 2/5] Update dummy dictionary with additional parameter information --- src/GUI_draft/templates/create_project.html | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/GUI_draft/templates/create_project.html b/src/GUI_draft/templates/create_project.html index af0a50f3..5d7df7fc 100644 --- a/src/GUI_draft/templates/create_project.html +++ b/src/GUI_draft/templates/create_project.html @@ -6,12 +6,14 @@ {% block content %} {% set project_parameters={ - 'Project Name': {'value': '', 'default_value': 'Berlin Energy Cell', 'type': str, 'description': 'Name of the project, defined by user', 'unit': None, 'restrictions': None }, - 'Project Id': {'value': '', 'default_value': 'proj_3_2', 'type': str, 'description': 'ID for project, assigned by user', 'unit': None, 'restrictions': None }, - 'Country': {'value': '', 'default_value': 'Germany', 'type': str, 'description': 'Country where the project is located', 'unit': None, 'restrictions': None }, - 'Project Duration': {'value': '', 'default_value': '1', 'type': float, 'description': 'Number of years for which the energy system is simulated', 'unit': 'Years', 'restrictions': 'A whole or decimal point number' }, + 'Project Name': {'value': '', 'default_value': 'Berlin Energy Cell', 'type': 'str', 'description': 'Name of the project, defined by user', 'unit': None, 'restrictions': None, 'docs_link': '#' }, + 'Project Id': {'value': '', 'default_value': 'proj_3_2', 'type': 'str', 'description': 'ID for project, assigned by user', 'unit': None, 'restrictions': None, 'docs_link': '#' }, + 'Country': {'value': '', 'default_value': 'Germany', 'type': 'str', 'description': 'Country where the project is located', 'unit': None, 'restrictions': None, 'docs_link': '#' }, + 'Project Duration': {'value': '', 'default_value': '1', 'type': 'float', 'description': 'Number of years for which the energy system is simulated', 'unit': 'Years', 'restrictions': 'A whole or decimal point number', 'docs_link': '#' }, } %} +{% set by_default = 0 %} +
From 58608d2fdac1401201dac42d986dba523f5bdb5a Mon Sep 17 00:00:00 2001 From: Mahendra Date: Thu, 18 Feb 2021 19:19:11 +0100 Subject: [PATCH 3/5] Add input parameter fields --- src/GUI_draft/templates/create_project.html | 23 +++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/GUI_draft/templates/create_project.html b/src/GUI_draft/templates/create_project.html index 5d7df7fc..29d97be2 100644 --- a/src/GUI_draft/templates/create_project.html +++ b/src/GUI_draft/templates/create_project.html @@ -32,6 +32,29 @@

A list of inputs relevant for the project should be listed here

+
+ {% for (param, param_details) in project_parameters.items() %} + +
+ {% for (param_info, value) in param_details.items() %} + {% if param_info == 'type' and value == 'str' %} + {% set param_type = "text" %} + {% elif param_info == 'type' and value == 'float' %} + {% set param_type = "number" %} + {% endif %} + {% endfor %} + +

{{ project_parameters[param]['unit'] }}

+
+ {% endfor %} +
From 2e070277b55fb4a48ab037522c221ea57eb43991 Mon Sep 17 00:00:00 2001 From: Mahendra Date: Thu, 18 Feb 2021 19:20:09 +0100 Subject: [PATCH 4/5] Add CDN link for fontawesome --- src/GUI_draft/templates/base.html | 1 + 1 file changed, 1 insertion(+) diff --git a/src/GUI_draft/templates/base.html b/src/GUI_draft/templates/base.html index 49ccffea..44456052 100644 --- a/src/GUI_draft/templates/base.html +++ b/src/GUI_draft/templates/base.html @@ -15,6 +15,7 @@ crossorigin="anonymous" /> + From 79832206328ca9380db0c04871039d834e1fa8b0 Mon Sep 17 00:00:00 2001 From: Mahendra Date: Thu, 18 Feb 2021 19:20:32 +0100 Subject: [PATCH 5/5] Update styling of labels of parameters --- src/GUI_draft/static/css/style.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/GUI_draft/static/css/style.css b/src/GUI_draft/static/css/style.css index fc3f8432..f2f59f4c 100644 --- a/src/GUI_draft/static/css/style.css +++ b/src/GUI_draft/static/css/style.css @@ -7,6 +7,10 @@ # */ +.input_field_labels { + font-size: 18px; +} + .progression_bar_buttons { background-color: #eb5e0b; color: white;