From 942b494b9ce77b771e7625ba41c09d72486a897d Mon Sep 17 00:00:00 2001 From: bobvandevelde Date: Thu, 9 Dec 2021 21:00:11 +0100 Subject: [PATCH 1/8] added "contact us" text customization --- osd2f/definitions/content_settings.py | 1 + osd2f/settings/default_content_settings.yaml | 141 +++++++++---------- osd2f/templates/blocks/footer.html.jinja | 2 +- 3 files changed, 72 insertions(+), 72 deletions(-) diff --git a/osd2f/definitions/content_settings.py b/osd2f/definitions/content_settings.py index 8419264..5eed0d2 100644 --- a/osd2f/definitions/content_settings.py +++ b/osd2f/definitions/content_settings.py @@ -101,6 +101,7 @@ class UploadPage(BaseModel): class ContentSettings(BaseModel): project_title: str + contact_us_text: str contact_us: EmailStr static_pages: Dict[PageTypeEnum, ContentPage] upload_page: UploadPage diff --git a/osd2f/settings/default_content_settings.yaml b/osd2f/settings/default_content_settings.yaml index 98733b2..b83c407 100644 --- a/osd2f/settings/default_content_settings.yaml +++ b/osd2f/settings/default_content_settings.yaml @@ -1,110 +1,109 @@ -project_title : OSD2F -contact_us : email@domain.tld -static_pages: - home: - active : True - name : The OSD2F project +project_title: OSD2F +contact_us_text: "Email to" +contact_us: email@domain.tld +static_pages: + home: + active: True + name: The OSD2F project blocks: - - type : jumbotron - title : Data donation made easy - id : top - image : "/static/skull_phone_cc.jpg" - lines : - - A general way of donating data - - For JSON based GDPR exports - - To use with external survey and analysis tools - buttons : - - name : About the project - label : "btn-primary" - link : "#project" - - name: How it works - label : "btn-success" - link : "/donate" + - type: jumbotron + title: Data donation made easy + id: top + image: "/static/skull_phone_cc.jpg" + lines: + - A general way of donating data + - For JSON based GDPR exports + - To use with external survey and analysis tools + buttons: + - name: About the project + label: "btn-primary" + link: "#project" + - name: How it works + label: "btn-success" + link: "/donate" - - type : two_block_row - id : project + - type: two_block_row + id: project image: "/static/study_cc.jpg" image_pos: left - title : OSD2F provides a whitelist based collection website - lines : + title: OSD2F provides a whitelist based collection website + lines: - Under GDPR, everyone should be able to export
their data in machine-readable format - Many platform provide standardized ways to get this data by
exporting it as a set of JSON files - This app allows researchers to easily and safely collect exported data donated by participants in their studies - buttons : + buttons: - name: About the developers - label : "btn-primary" - link : "#team" + label: "btn-primary" + link: "#team" - name: Donate now label: "btn-success" link: "/donate" - - type : two_block_row - id : team - title : Open Source Data Donation Framework - lines : - - The digital traces that people leave through their use of various online platforms provide tremendous opportunities for studying human behavior. - - However, the collection of these data is hampered by legal, ethical and technical challenges. + - type: two_block_row + id: team + title: Open Source Data Donation Framework + lines: + - The digital traces that people leave through their use of various online platforms provide tremendous opportunities for studying human behavior. + - However, the collection of these data is hampered by legal, ethical and technical challenges. - We present a framework and tool for collecting these data through a data donation platform where consenting participants can securely submit their digital traces. - circles_row: - - title : Prof. Dr. Hypothetical collaborator - subtitle: this person does not exist - image : "https://thispersondoesnotexist.com/image" - - title : Sponsored by - subtitle: A random image - image : "https://picsum.photos/200/300.jpg" - buttons : + circles_row: + - title: Prof. Dr. Hypothetical collaborator + subtitle: this person does not exist + image: "https://thispersondoesnotexist.com/image" + - title: Sponsored by + subtitle: A random image + image: "https://picsum.photos/200/300.jpg" + buttons: - name: About the project - label : "btn-primary" - link : "#team" + label: "btn-primary" + link: "#team" - name: Donate now label: "btn-success" link: "/donate" - privacy: - active : True - name : Privacy protection - blocks : - - type : jumbotron - title : Data donation made easy - id : top - lines : - - A simple application for donation collection + active: True + name: Privacy protection + blocks: + - type: jumbotron + title: Data donation made easy + id: top + lines: + - A simple application for donation collection buttons: [] - donate: - active : False - name : Donation Page - blocks : [] + active: False + name: Donation Page + blocks: [] upload_page: - blocks : [] - upload_box : - header : "Select file(s):" - explanation : + blocks: [] + upload_box: + header: "Select file(s):" + explanation: - "You can use the file selector to select the zipfile from your platform" - "You can also drag the folder into this box" thanks_text: "Thanks for trying osd2f" - processing_text : "processing your donation for preview" + processing_text: "processing your donation for preview" file_indicator_text: "Entries in your donation: " - donate_button : "Donate" - inspect_button : "Inspect & edit" + donate_button: "Donate" + inspect_button: "Inspect & edit" preview_component: entries_in_file_text: "Entries in this file: " - title : "Inspect & Edit your donation" - explanation : + title: "Inspect & Edit your donation" + explanation: - The top shows the files in your donation - In each file, you can search for content - You can remove content by clicking on the rows and pressing "remove selection" - remove_rows_button : "remove selected rows" + remove_rows_button: "remove selected rows" search_prompt: "Search in file" search_box_placeholder: "type to search this file" - previous_file_button : Previous file + previous_file_button: Previous file next_file_button: Next file - consent_popup : - title : "I want to donate my data..." - lead : "This box explains the conditions of your donation" + consent_popup: + title: "I want to donate my data..." + lead: "This box explains the conditions of your donation" points: - how data is secured - what the data will be used for diff --git a/osd2f/templates/blocks/footer.html.jinja b/osd2f/templates/blocks/footer.html.jinja index bf1df63..c78646c 100644 --- a/osd2f/templates/blocks/footer.html.jinja +++ b/osd2f/templates/blocks/footer.html.jinja @@ -1,5 +1,5 @@ \ No newline at end of file From 02ac1bcaed2ec5da07d29b255daa4dd1cdb1bc60 Mon Sep 17 00:00:00 2001 From: bobvandevelde Date: Thu, 9 Dec 2021 21:01:41 +0100 Subject: [PATCH 2/8] make the email address a mailto link --- osd2f/templates/blocks/footer.html.jinja | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osd2f/templates/blocks/footer.html.jinja b/osd2f/templates/blocks/footer.html.jinja index c78646c..9cd468d 100644 --- a/osd2f/templates/blocks/footer.html.jinja +++ b/osd2f/templates/blocks/footer.html.jinja @@ -1,5 +1,5 @@ \ No newline at end of file From 9b9c83961bfb0c5490419a73296e9c6e22d64d0b Mon Sep 17 00:00:00 2001 From: bobvandevelde Date: Thu, 9 Dec 2021 21:05:13 +0100 Subject: [PATCH 3/8] removed OSD2F mentions from default content settigns --- osd2f/settings/default_content_settings.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/osd2f/settings/default_content_settings.yaml b/osd2f/settings/default_content_settings.yaml index b83c407..f2e893f 100644 --- a/osd2f/settings/default_content_settings.yaml +++ b/osd2f/settings/default_content_settings.yaml @@ -1,10 +1,10 @@ -project_title: OSD2F +project_title: Data Donation Framework contact_us_text: "Email to" contact_us: email@domain.tld static_pages: home: active: True - name: The OSD2F project + name: The Data Donation Framework project blocks: - type: jumbotron title: Data donation made easy @@ -26,7 +26,7 @@ static_pages: id: project image: "/static/study_cc.jpg" image_pos: left - title: OSD2F provides a whitelist based collection website + title: Data Donation Framework provides a whitelist based collection website lines: - Under GDPR, everyone should be able to export
their data in machine-readable format - Many platform provide standardized ways to get this data by
exporting it as a set of JSON files @@ -84,7 +84,7 @@ upload_page: explanation: - "You can use the file selector to select the zipfile from your platform" - "You can also drag the folder into this box" - thanks_text: "Thanks for trying osd2f" + thanks_text: "Thanks for trying Data Donation Framework" processing_text: "processing your donation for preview" file_indicator_text: "Entries in your donation: " donate_button: "Donate" From 147c1bb5bfc5e3b0b648f87f62e25183d1a72f5d Mon Sep 17 00:00:00 2001 From: bobvandevelde Date: Thu, 9 Dec 2021 21:09:05 +0100 Subject: [PATCH 4/8] reduce donate box & messages distance --- .../formats/upload_template.html.jinja | 25 ++++++++++--------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/osd2f/templates/formats/upload_template.html.jinja b/osd2f/templates/formats/upload_template.html.jinja index 27c4632..ebecf7b 100644 --- a/osd2f/templates/formats/upload_template.html.jinja +++ b/osd2f/templates/formats/upload_template.html.jinja @@ -49,17 +49,6 @@ - - -
+
+ + +
From 4e492b20431d0c4204cc91a4859f44936496ee9f Mon Sep 17 00:00:00 2001 From: bobvandevelde Date: Thu, 9 Dec 2021 21:10:41 +0100 Subject: [PATCH 5/8] use project title as HTML title tag --- osd2f/templates/blocks/head.html.jinja | 1 + 1 file changed, 1 insertion(+) diff --git a/osd2f/templates/blocks/head.html.jinja b/osd2f/templates/blocks/head.html.jinja index dd2bbec..c22dbc6 100644 --- a/osd2f/templates/blocks/head.html.jinja +++ b/osd2f/templates/blocks/head.html.jinja @@ -1,4 +1,5 @@ + {{ content_settings.project_title }} From 1ec9152ab11333d1cf79cf36f972b71ea592af78 Mon Sep 17 00:00:00 2001 From: bobvandevelde Date: Thu, 9 Dec 2021 21:15:12 +0100 Subject: [PATCH 6/8] added pagename to HTML title tag --- osd2f/templates/blocks/head.html.jinja | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osd2f/templates/blocks/head.html.jinja b/osd2f/templates/blocks/head.html.jinja index c22dbc6..ec4d3e9 100644 --- a/osd2f/templates/blocks/head.html.jinja +++ b/osd2f/templates/blocks/head.html.jinja @@ -1,5 +1,5 @@ - {{ content_settings.project_title }} + {{ content_settings.project_title }} - {{ current_page }} From e2108e3d1aafe109503a53fbab0c9ff74b82efe2 Mon Sep 17 00:00:00 2001 From: bobvandevelde Date: Thu, 9 Dec 2021 21:23:22 +0100 Subject: [PATCH 7/8] added current-page to upload & researcher page --- osd2f/server.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/osd2f/server.py b/osd2f/server.py index dd8c688..c23bb0e 100644 --- a/osd2f/server.py +++ b/osd2f/server.py @@ -100,6 +100,7 @@ async def upload(): content_settings=content_settings, upload_settings=upload_settings, sid=request.args.get("sid", "test"), + current_page="upload", ) # for data submissions posted by the interface elif request.method == "POST": @@ -141,6 +142,7 @@ async def researcher(): "formats/researcher_template.html.jinja", content_settings=content_settings, password_protected=bool(app.config["DATA_PASSWORD"]), + current_page="researcher", ) From 380a694961ba4e93404b4a9a8ee93e4df3d18aa4 Mon Sep 17 00:00:00 2001 From: bobvandevelde Date: Fri, 10 Dec 2021 01:42:02 +0100 Subject: [PATCH 8/8] forgot to fix test --- tests/content_configuration_test.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/content_configuration_test.py b/tests/content_configuration_test.py index f26e590..526b9d3 100644 --- a/tests/content_configuration_test.py +++ b/tests/content_configuration_test.py @@ -23,6 +23,7 @@ fake_settings = ContentSettings( project_title="test project_title", + contact_us_text="mail to", contact_us="test@case.nl", static_pages={ "home": ContentPage(