diff --git a/ddm/auth/templates/auth/login.html b/ddm/auth/templates/ddm_auth/login.html similarity index 91% rename from ddm/auth/templates/auth/login.html rename to ddm/auth/templates/ddm_auth/login.html index cec35b85..f6f15d33 100644 --- a/ddm/auth/templates/auth/login.html +++ b/ddm/auth/templates/ddm_auth/login.html @@ -1,4 +1,4 @@ -{% extends 'core/base.html' %} +{% extends 'ddm_core/base.html' %} {% load static %} @@ -11,7 +11,7 @@
- Data Donation Module + Data Donation Module
diff --git a/ddm/auth/templates/auth/login_oidc.html b/ddm/auth/templates/ddm_auth/login_oidc.html similarity index 90% rename from ddm/auth/templates/auth/login_oidc.html rename to ddm/auth/templates/ddm_auth/login_oidc.html index cbf0a8a4..4fc4cf50 100644 --- a/ddm/auth/templates/auth/login_oidc.html +++ b/ddm/auth/templates/ddm_auth/login_oidc.html @@ -1,4 +1,4 @@ -{% extends 'core/base.html' %} +{% extends 'ddm_core/base.html' %} {% load static %} @@ -11,7 +11,7 @@
- Data Donation Module + Data Donation Module
diff --git a/ddm/auth/templates/auth/no_permission.html b/ddm/auth/templates/ddm_auth/no_permission.html similarity index 89% rename from ddm/auth/templates/auth/no_permission.html rename to ddm/auth/templates/ddm_auth/no_permission.html index 38c2df7e..2228ef99 100644 --- a/ddm/auth/templates/auth/no_permission.html +++ b/ddm/auth/templates/ddm_auth/no_permission.html @@ -1,4 +1,4 @@ -{% extends 'core/base.html' %} +{% extends 'ddm_core/base.html' %} {% block page_title %}Permission Denied{% endblock %} diff --git a/ddm/auth/templates/auth/token.html b/ddm/auth/templates/ddm_auth/token.html similarity index 98% rename from ddm/auth/templates/auth/token.html rename to ddm/auth/templates/ddm_auth/token.html index b8926ba8..3f1e661e 100644 --- a/ddm/auth/templates/auth/token.html +++ b/ddm/auth/templates/ddm_auth/token.html @@ -1,4 +1,4 @@ -{% extends 'core/page_with_form.html' %} +{% extends 'ddm_core/page_with_form.html' %} {% block page_title %}Project Access Token{% endblock %} diff --git a/ddm/auth/tests/test_views.py b/ddm/auth/tests/test_views.py index 6e306ca0..5001afd7 100644 --- a/ddm/auth/tests/test_views.py +++ b/ddm/auth/tests/test_views.py @@ -87,7 +87,7 @@ def test_redirect_if_anonymous(self): class TestView(DDMAuthMixin, TemplateView): - template_name = 'auth/no_permission.html' + template_name = 'ddm_auth/no_permission.html' @override_settings(DDM_SETTINGS={'EMAIL_PERMISSION_CHECK': r'.*(\.|@)mail\.com$', }) diff --git a/ddm/auth/views.py b/ddm/auth/views.py index c1dc235b..a2b46105 100644 --- a/ddm/auth/views.py +++ b/ddm/auth/views.py @@ -59,7 +59,7 @@ class DdmNoPermissionView(TemplateView): * Unauthenticated users are redirected to the login page. * Logged-in users with permission and a research profile are redirected to the project list. """ - template_name = 'auth/no_permission.html' + template_name = 'ddm_auth/no_permission.html' def dispatch(self, request, *args, **kwargs): if request.method == 'GET': @@ -73,7 +73,7 @@ def dispatch(self, request, *args, **kwargs): class ProjectTokenView(SuccessMessageMixin, DDMAuthMixin, FormView): """ View to see existing access token or generate a new one. """ - template_name = 'auth/token.html' + template_name = 'ddm_auth/token.html' form_class = TokenCreationForm def get_project(self): diff --git a/ddm/core/static/core/css/bootstrap/bootstrap-icons.css b/ddm/core/static/ddm_core/css/bootstrap/bootstrap-icons.css similarity index 100% rename from ddm/core/static/core/css/bootstrap/bootstrap-icons.css rename to ddm/core/static/ddm_core/css/bootstrap/bootstrap-icons.css diff --git a/ddm/core/static/core/css/bootstrap/bootstrap-table-filter-control.min.css b/ddm/core/static/ddm_core/css/bootstrap/bootstrap-table-filter-control.min.css similarity index 100% rename from ddm/core/static/core/css/bootstrap/bootstrap-table-filter-control.min.css rename to ddm/core/static/ddm_core/css/bootstrap/bootstrap-table-filter-control.min.css diff --git a/ddm/core/static/core/css/bootstrap/bootstrap-table.min.css b/ddm/core/static/ddm_core/css/bootstrap/bootstrap-table.min.css similarity index 100% rename from ddm/core/static/core/css/bootstrap/bootstrap-table.min.css rename to ddm/core/static/ddm_core/css/bootstrap/bootstrap-table.min.css diff --git a/ddm/core/static/core/css/bootstrap/bootstrap.min.css b/ddm/core/static/ddm_core/css/bootstrap/bootstrap.min.css similarity index 100% rename from ddm/core/static/core/css/bootstrap/bootstrap.min.css rename to ddm/core/static/ddm_core/css/bootstrap/bootstrap.min.css diff --git a/ddm/core/static/core/css/bootstrap/bootstrap.min.css.map b/ddm/core/static/ddm_core/css/bootstrap/bootstrap.min.css.map similarity index 100% rename from ddm/core/static/core/css/bootstrap/bootstrap.min.css.map rename to ddm/core/static/ddm_core/css/bootstrap/bootstrap.min.css.map diff --git a/ddm/core/static/core/css/ddm-base.css b/ddm/core/static/ddm_core/css/ddm-base.css similarity index 100% rename from ddm/core/static/core/css/ddm-base.css rename to ddm/core/static/ddm_core/css/ddm-base.css diff --git a/ddm/core/static/core/css/ddm-ckeditor-styles.css b/ddm/core/static/ddm_core/css/ddm-ckeditor-styles.css similarity index 100% rename from ddm/core/static/core/css/ddm-ckeditor-styles.css rename to ddm/core/static/ddm_core/css/ddm-ckeditor-styles.css diff --git a/ddm/core/static/core/css/fonts.css b/ddm/core/static/ddm_core/css/fonts.css similarity index 100% rename from ddm/core/static/core/css/fonts.css rename to ddm/core/static/ddm_core/css/fonts.css diff --git a/ddm/core/static/core/fonts/NunitoSans/NunitoSans-Black.ttf b/ddm/core/static/ddm_core/fonts/NunitoSans/NunitoSans-Black.ttf similarity index 100% rename from ddm/core/static/core/fonts/NunitoSans/NunitoSans-Black.ttf rename to ddm/core/static/ddm_core/fonts/NunitoSans/NunitoSans-Black.ttf diff --git a/ddm/core/static/core/fonts/NunitoSans/NunitoSans-BlackItalic.ttf b/ddm/core/static/ddm_core/fonts/NunitoSans/NunitoSans-BlackItalic.ttf similarity index 100% rename from ddm/core/static/core/fonts/NunitoSans/NunitoSans-BlackItalic.ttf rename to ddm/core/static/ddm_core/fonts/NunitoSans/NunitoSans-BlackItalic.ttf diff --git a/ddm/core/static/core/fonts/NunitoSans/NunitoSans-Bold.ttf b/ddm/core/static/ddm_core/fonts/NunitoSans/NunitoSans-Bold.ttf similarity index 100% rename from ddm/core/static/core/fonts/NunitoSans/NunitoSans-Bold.ttf rename to ddm/core/static/ddm_core/fonts/NunitoSans/NunitoSans-Bold.ttf diff --git a/ddm/core/static/core/fonts/NunitoSans/NunitoSans-BoldItalic.ttf b/ddm/core/static/ddm_core/fonts/NunitoSans/NunitoSans-BoldItalic.ttf similarity index 100% rename from ddm/core/static/core/fonts/NunitoSans/NunitoSans-BoldItalic.ttf rename to ddm/core/static/ddm_core/fonts/NunitoSans/NunitoSans-BoldItalic.ttf diff --git a/ddm/core/static/core/fonts/NunitoSans/NunitoSans-ExtraBold.ttf b/ddm/core/static/ddm_core/fonts/NunitoSans/NunitoSans-ExtraBold.ttf similarity index 100% rename from ddm/core/static/core/fonts/NunitoSans/NunitoSans-ExtraBold.ttf rename to ddm/core/static/ddm_core/fonts/NunitoSans/NunitoSans-ExtraBold.ttf diff --git a/ddm/core/static/core/fonts/NunitoSans/NunitoSans-ExtraBoldItalic.ttf b/ddm/core/static/ddm_core/fonts/NunitoSans/NunitoSans-ExtraBoldItalic.ttf similarity index 100% rename from ddm/core/static/core/fonts/NunitoSans/NunitoSans-ExtraBoldItalic.ttf rename to ddm/core/static/ddm_core/fonts/NunitoSans/NunitoSans-ExtraBoldItalic.ttf diff --git a/ddm/core/static/core/fonts/NunitoSans/NunitoSans-ExtraLight.ttf b/ddm/core/static/ddm_core/fonts/NunitoSans/NunitoSans-ExtraLight.ttf similarity index 100% rename from ddm/core/static/core/fonts/NunitoSans/NunitoSans-ExtraLight.ttf rename to ddm/core/static/ddm_core/fonts/NunitoSans/NunitoSans-ExtraLight.ttf diff --git a/ddm/core/static/core/fonts/NunitoSans/NunitoSans-ExtraLightItalic.ttf b/ddm/core/static/ddm_core/fonts/NunitoSans/NunitoSans-ExtraLightItalic.ttf similarity index 100% rename from ddm/core/static/core/fonts/NunitoSans/NunitoSans-ExtraLightItalic.ttf rename to ddm/core/static/ddm_core/fonts/NunitoSans/NunitoSans-ExtraLightItalic.ttf diff --git a/ddm/core/static/core/fonts/NunitoSans/NunitoSans-Italic.ttf b/ddm/core/static/ddm_core/fonts/NunitoSans/NunitoSans-Italic.ttf similarity index 100% rename from ddm/core/static/core/fonts/NunitoSans/NunitoSans-Italic.ttf rename to ddm/core/static/ddm_core/fonts/NunitoSans/NunitoSans-Italic.ttf diff --git a/ddm/core/static/core/fonts/NunitoSans/NunitoSans-Light.ttf b/ddm/core/static/ddm_core/fonts/NunitoSans/NunitoSans-Light.ttf similarity index 100% rename from ddm/core/static/core/fonts/NunitoSans/NunitoSans-Light.ttf rename to ddm/core/static/ddm_core/fonts/NunitoSans/NunitoSans-Light.ttf diff --git a/ddm/core/static/core/fonts/NunitoSans/NunitoSans-LightItalic.ttf b/ddm/core/static/ddm_core/fonts/NunitoSans/NunitoSans-LightItalic.ttf similarity index 100% rename from ddm/core/static/core/fonts/NunitoSans/NunitoSans-LightItalic.ttf rename to ddm/core/static/ddm_core/fonts/NunitoSans/NunitoSans-LightItalic.ttf diff --git a/ddm/core/static/core/fonts/NunitoSans/NunitoSans-Regular.ttf b/ddm/core/static/ddm_core/fonts/NunitoSans/NunitoSans-Regular.ttf similarity index 100% rename from ddm/core/static/core/fonts/NunitoSans/NunitoSans-Regular.ttf rename to ddm/core/static/ddm_core/fonts/NunitoSans/NunitoSans-Regular.ttf diff --git a/ddm/core/static/core/fonts/NunitoSans/NunitoSans-SemiBold.ttf b/ddm/core/static/ddm_core/fonts/NunitoSans/NunitoSans-SemiBold.ttf similarity index 100% rename from ddm/core/static/core/fonts/NunitoSans/NunitoSans-SemiBold.ttf rename to ddm/core/static/ddm_core/fonts/NunitoSans/NunitoSans-SemiBold.ttf diff --git a/ddm/core/static/core/fonts/NunitoSans/NunitoSans-SemiBoldItalic.ttf b/ddm/core/static/ddm_core/fonts/NunitoSans/NunitoSans-SemiBoldItalic.ttf similarity index 100% rename from ddm/core/static/core/fonts/NunitoSans/NunitoSans-SemiBoldItalic.ttf rename to ddm/core/static/ddm_core/fonts/NunitoSans/NunitoSans-SemiBoldItalic.ttf diff --git a/ddm/core/static/core/fonts/NunitoSans/OFL.txt b/ddm/core/static/ddm_core/fonts/NunitoSans/OFL.txt similarity index 100% rename from ddm/core/static/core/fonts/NunitoSans/OFL.txt rename to ddm/core/static/ddm_core/fonts/NunitoSans/OFL.txt diff --git a/ddm/core/static/core/fonts/bootstrap-icons/bootstrap-icons.woff2 b/ddm/core/static/ddm_core/fonts/bootstrap-icons/bootstrap-icons.woff2 similarity index 100% rename from ddm/core/static/core/fonts/bootstrap-icons/bootstrap-icons.woff2 rename to ddm/core/static/ddm_core/fonts/bootstrap-icons/bootstrap-icons.woff2 diff --git a/ddm/core/static/core/img/ddl_favicon_black.svg b/ddm/core/static/ddm_core/img/ddl_favicon_black.svg similarity index 100% rename from ddm/core/static/core/img/ddl_favicon_black.svg rename to ddm/core/static/ddm_core/img/ddl_favicon_black.svg diff --git a/ddm/core/static/core/img/logos/DDM_Logo_Schwarz.svg b/ddm/core/static/ddm_core/img/logos/DDM_Logo_Schwarz.svg similarity index 100% rename from ddm/core/static/core/img/logos/DDM_Logo_Schwarz.svg rename to ddm/core/static/ddm_core/img/logos/DDM_Logo_Schwarz.svg diff --git a/ddm/core/static/core/img/logos/Example Logo.png b/ddm/core/static/ddm_core/img/logos/Example Logo.png similarity index 100% rename from ddm/core/static/core/img/logos/Example Logo.png rename to ddm/core/static/ddm_core/img/logos/Example Logo.png diff --git a/ddm/core/static/core/js/bootstrap/bootstrap-table-export.min.js b/ddm/core/static/ddm_core/js/bootstrap/bootstrap-table-export.min.js similarity index 100% rename from ddm/core/static/core/js/bootstrap/bootstrap-table-export.min.js rename to ddm/core/static/ddm_core/js/bootstrap/bootstrap-table-export.min.js diff --git a/ddm/core/static/core/js/bootstrap/bootstrap-table-filter-control.min.js b/ddm/core/static/ddm_core/js/bootstrap/bootstrap-table-filter-control.min.js similarity index 100% rename from ddm/core/static/core/js/bootstrap/bootstrap-table-filter-control.min.js rename to ddm/core/static/ddm_core/js/bootstrap/bootstrap-table-filter-control.min.js diff --git a/ddm/core/static/core/js/bootstrap/bootstrap-table.min.js b/ddm/core/static/ddm_core/js/bootstrap/bootstrap-table.min.js similarity index 100% rename from ddm/core/static/core/js/bootstrap/bootstrap-table.min.js rename to ddm/core/static/ddm_core/js/bootstrap/bootstrap-table.min.js diff --git a/ddm/core/static/core/js/bootstrap/bootstrap.bundle.min.js b/ddm/core/static/ddm_core/js/bootstrap/bootstrap.bundle.min.js similarity index 100% rename from ddm/core/static/core/js/bootstrap/bootstrap.bundle.min.js rename to ddm/core/static/ddm_core/js/bootstrap/bootstrap.bundle.min.js diff --git a/ddm/core/static/core/js/filesaver/FileSaver.min.js b/ddm/core/static/ddm_core/js/filesaver/FileSaver.min.js similarity index 100% rename from ddm/core/static/core/js/filesaver/FileSaver.min.js rename to ddm/core/static/ddm_core/js/filesaver/FileSaver.min.js diff --git a/ddm/core/static/core/js/filesaver/FileSaver.min.js.map b/ddm/core/static/ddm_core/js/filesaver/FileSaver.min.js.map similarity index 100% rename from ddm/core/static/core/js/filesaver/FileSaver.min.js.map rename to ddm/core/static/ddm_core/js/filesaver/FileSaver.min.js.map diff --git a/ddm/core/static/core/js/jquery/jquery-3.6.2.min.js b/ddm/core/static/ddm_core/js/jquery/jquery-3.6.2.min.js similarity index 100% rename from ddm/core/static/core/js/jquery/jquery-3.6.2.min.js rename to ddm/core/static/ddm_core/js/jquery/jquery-3.6.2.min.js diff --git a/ddm/core/static/core/js/jquery/tableExport.min.js b/ddm/core/static/ddm_core/js/jquery/tableExport.min.js similarity index 100% rename from ddm/core/static/core/js/jquery/tableExport.min.js rename to ddm/core/static/ddm_core/js/jquery/tableExport.min.js diff --git a/ddm/core/static/core/vue/css/vue_questionnaire.css b/ddm/core/static/ddm_core/vue/css/vue_questionnaire.css similarity index 100% rename from ddm/core/static/core/vue/css/vue_questionnaire.css rename to ddm/core/static/ddm_core/vue/css/vue_questionnaire.css diff --git a/ddm/core/static/core/vue/css/vue_uploader.css b/ddm/core/static/ddm_core/vue/css/vue_uploader.css similarity index 100% rename from ddm/core/static/core/vue/css/vue_uploader.css rename to ddm/core/static/ddm_core/vue/css/vue_uploader.css diff --git a/ddm/core/static/core/vue/favicon.ico b/ddm/core/static/ddm_core/vue/favicon.ico similarity index 100% rename from ddm/core/static/core/vue/favicon.ico rename to ddm/core/static/ddm_core/vue/favicon.ico diff --git a/ddm/core/static/core/vue/index.html b/ddm/core/static/ddm_core/vue/index.html similarity index 100% rename from ddm/core/static/core/vue/index.html rename to ddm/core/static/ddm_core/vue/index.html diff --git a/ddm/core/static/core/vue/js/chunk-vendors.js b/ddm/core/static/ddm_core/vue/js/chunk-vendors.js similarity index 100% rename from ddm/core/static/core/vue/js/chunk-vendors.js rename to ddm/core/static/ddm_core/vue/js/chunk-vendors.js diff --git a/ddm/core/static/core/vue/js/chunk-vendors.js.map b/ddm/core/static/ddm_core/vue/js/chunk-vendors.js.map similarity index 100% rename from ddm/core/static/core/vue/js/chunk-vendors.js.map rename to ddm/core/static/ddm_core/vue/js/chunk-vendors.js.map diff --git a/ddm/core/static/core/vue/js/vue_questionnaire.js b/ddm/core/static/ddm_core/vue/js/vue_questionnaire.js similarity index 100% rename from ddm/core/static/core/vue/js/vue_questionnaire.js rename to ddm/core/static/ddm_core/vue/js/vue_questionnaire.js diff --git a/ddm/core/static/core/vue/js/vue_questionnaire.js.map b/ddm/core/static/ddm_core/vue/js/vue_questionnaire.js.map similarity index 100% rename from ddm/core/static/core/vue/js/vue_questionnaire.js.map rename to ddm/core/static/ddm_core/vue/js/vue_questionnaire.js.map diff --git a/ddm/core/static/core/vue/js/vue_uploader.js b/ddm/core/static/ddm_core/vue/js/vue_uploader.js similarity index 100% rename from ddm/core/static/core/vue/js/vue_uploader.js rename to ddm/core/static/ddm_core/vue/js/vue_uploader.js diff --git a/ddm/core/static/core/vue/js/vue_uploader.js.map b/ddm/core/static/ddm_core/vue/js/vue_uploader.js.map similarity index 100% rename from ddm/core/static/core/vue/js/vue_uploader.js.map rename to ddm/core/static/ddm_core/vue/js/vue_uploader.js.map diff --git a/ddm/core/static/core/vue/webpack-stats.json b/ddm/core/static/ddm_core/vue/webpack-stats.json similarity index 100% rename from ddm/core/static/core/vue/webpack-stats.json rename to ddm/core/static/ddm_core/vue/webpack-stats.json diff --git a/ddm/core/templates/core/base.html b/ddm/core/templates/ddm_core/base.html similarity index 69% rename from ddm/core/templates/core/base.html rename to ddm/core/templates/ddm_core/base.html index c0a9a14f..f5837e8e 100644 --- a/ddm/core/templates/core/base.html +++ b/ddm/core/templates/ddm_core/base.html @@ -5,10 +5,10 @@ DDM: {% block page_title %}Title{% endblock %} - - - - + + + + {% block extrahead %}{% endblock %} @@ -17,7 +17,7 @@ {% block header %}
- {% include "core/components/header.html" %} + {% include "ddm_core/components/header.html" %}
{% endblock %} @@ -56,9 +56,9 @@

{% block main_heading %}{% endblock %}

{% block scripts %} - - - + + + {% endblock %} diff --git a/ddm/core/templates/core/components/form_field_basic.html b/ddm/core/templates/ddm_core/components/form_field_basic.html similarity index 100% rename from ddm/core/templates/core/components/form_field_basic.html rename to ddm/core/templates/ddm_core/components/form_field_basic.html diff --git a/ddm/core/templates/core/components/header.html b/ddm/core/templates/ddm_core/components/header.html similarity index 87% rename from ddm/core/templates/core/components/header.html rename to ddm/core/templates/ddm_core/components/header.html index 93bffff9..b887a4d3 100644 --- a/ddm/core/templates/core/components/header.html +++ b/ddm/core/templates/ddm_core/components/header.html @@ -3,7 +3,7 @@
diff --git a/ddm/datadonation/templates/datadonation/processing_rule_modal.html b/ddm/datadonation/templates/ddm_datadonation/processing_rule_modal.html similarity index 100% rename from ddm/datadonation/templates/datadonation/processing_rule_modal.html rename to ddm/datadonation/templates/ddm_datadonation/processing_rule_modal.html diff --git a/ddm/datadonation/templates/datadonation/text_uploader_and_blueprints.html b/ddm/datadonation/templates/ddm_datadonation/text_uploader_and_blueprints.html similarity index 100% rename from ddm/datadonation/templates/datadonation/text_uploader_and_blueprints.html rename to ddm/datadonation/templates/ddm_datadonation/text_uploader_and_blueprints.html diff --git a/ddm/datadonation/templates/datadonation/uploader/create.html b/ddm/datadonation/templates/ddm_datadonation/uploader/create.html similarity index 64% rename from ddm/datadonation/templates/datadonation/uploader/create.html rename to ddm/datadonation/templates/ddm_datadonation/uploader/create.html index 67cdc81d..eaf7e284 100644 --- a/ddm/datadonation/templates/datadonation/uploader/create.html +++ b/ddm/datadonation/templates/ddm_datadonation/uploader/create.html @@ -1,4 +1,4 @@ -{% extends 'core/page_with_form.html' %} +{% extends 'ddm_core/page_with_form.html' %} {% block page_title %}Create New Uploader{% endblock %} @@ -6,11 +6,11 @@ {% block submit_label %}Create Uploader{% endblock %} -{% block cancel_target %}{% url 'datadonation:overview' project.pk %}{% endblock %} +{% block cancel_target %}{% url 'ddm_datadonation:overview' project.pk %}{% endblock %} {% block breadcrumbs %} Projects / "{{ project.name|truncatechars:15 }}" Project / -Data Donation / +Data Donation / Create Uploader {% endblock %} diff --git a/ddm/datadonation/templates/datadonation/uploader/delete.html b/ddm/datadonation/templates/ddm_datadonation/uploader/delete.html similarity index 87% rename from ddm/datadonation/templates/datadonation/uploader/delete.html rename to ddm/datadonation/templates/ddm_datadonation/uploader/delete.html index 343bbe61..f4a08f2a 100644 --- a/ddm/datadonation/templates/datadonation/uploader/delete.html +++ b/ddm/datadonation/templates/ddm_datadonation/uploader/delete.html @@ -1,4 +1,4 @@ -{% extends 'core/page_with_form.html' %} +{% extends 'ddm_core/page_with_form.html' %} {% block page_title %}Delete Uploader{% endblock %} @@ -36,7 +36,7 @@

Are you sure you want to delete this Uploader along with all associated instructions? This action cannot be reversed.

- 🠐 Cancel + 🠐 Cancel

{% endblock %} @@ -47,6 +47,6 @@ {% block breadcrumbs %} Projects / "{{ project.name|truncatechars:15 }}" Project / -Data Donation / +Data Donation / Delete Uploader {% endblock %} diff --git a/ddm/datadonation/templates/datadonation/uploader/edit.html b/ddm/datadonation/templates/ddm_datadonation/uploader/edit.html similarity index 80% rename from ddm/datadonation/templates/datadonation/uploader/edit.html rename to ddm/datadonation/templates/ddm_datadonation/uploader/edit.html index 9f160de0..51746c5e 100644 --- a/ddm/datadonation/templates/datadonation/uploader/edit.html +++ b/ddm/datadonation/templates/ddm_datadonation/uploader/edit.html @@ -1,4 +1,4 @@ -{% extends 'core/page_with_form.html' %} +{% extends 'ddm_core/page_with_form.html' %} {% block page_title %}Edit Uploader{% endblock %} @@ -35,14 +35,14 @@ {% empty %} - No unassigned File Blueprints available +  Create new File Blueprint + No unassigned File Blueprints available +  Create new File Blueprint {% endfor %}

- 🠐 Back + 🠐 Back

@@ -51,6 +51,6 @@ {% block breadcrumbs %} Projects / "{{ project.name|truncatechars:15 }}" Project / -Data Donation / +Data Donation / Edit Uploader {% endblock %} diff --git a/ddm/datadonation/tests/test_views.py b/ddm/datadonation/tests/test_views.py index d2212165..67067ff9 100644 --- a/ddm/datadonation/tests/test_views.py +++ b/ddm/datadonation/tests/test_views.py @@ -35,7 +35,7 @@ def setUpTestData(cls): regex_path='/this/file.json' ) - cls.url = reverse('datadonation:blueprints:edit', + cls.url = reverse('ddm_datadonation:blueprints:edit', kwargs={'pk': cls.blueprint.pk, 'project_pk': cls.project.pk}) def test_post_valid_data(self): @@ -61,7 +61,7 @@ def test_post_valid_data(self): bp_name_after = DonationBlueprint.objects.get(pk=self.blueprint.pk).name self.assertEqual(response.status_code, 302) - self.assertEqual(response.url, reverse('datadonation:overview', kwargs={'project_pk': self.project.pk})) + self.assertEqual(response.url, reverse('ddm_datadonation:overview', kwargs={'project_pk': self.project.pk})) self.assertNotEqual(bp_name_before, bp_name_after) def test_post_invalid_data(self): @@ -121,7 +121,7 @@ def setUpTestData(cls): regex_path='/this/file.json' ) - cls.url = reverse('datadonation:uploaders:edit', + cls.url = reverse('ddm_datadonation:uploaders:edit', kwargs={'pk': cls.file_uploader.pk, 'project_pk': cls.project.pk}) def test_post_valid_data(self): @@ -140,7 +140,7 @@ def test_post_valid_data(self): bp_b_uploader_after = DonationBlueprint.objects.get(pk=self.blueprint_b.pk).file_uploader self.assertEqual(response.status_code, 302) - self.assertEqual(response.url, reverse('datadonation:overview', kwargs={'project_pk': self.project.pk})) + self.assertEqual(response.url, reverse('ddm_datadonation:overview', kwargs={'project_pk': self.project.pk})) self.assertEqual(FileUploader.objects.get(pk=self.file_uploader.pk).name, valid_data['name']) self.assertNotEqual(bp_a_uploader_before, bp_a_uploader_after) self.assertNotEqual(bp_b_uploader_before, bp_b_uploader_after) diff --git a/ddm/datadonation/urls.py b/ddm/datadonation/urls.py index e6420514..829ff76e 100644 --- a/ddm/datadonation/urls.py +++ b/ddm/datadonation/urls.py @@ -31,7 +31,7 @@ 'uploaders' ) -app_name = 'datadonation' +app_name = 'ddm_datadonation' urlpatterns = [ path(r'', views.DataDonationOverview.as_view(), name='overview'), path(r'blueprint/', include(blueprint_patterns)), diff --git a/ddm/datadonation/views.py b/ddm/datadonation/views.py index e25cfbbf..4d298979 100644 --- a/ddm/datadonation/views.py +++ b/ddm/datadonation/views.py @@ -24,7 +24,7 @@ def get_context_data(self, **kwargs): return context def get_success_url(self): - return reverse('datadonation:overview', + return reverse('ddm_datadonation:overview', kwargs={'project_pk': self.kwargs['project_pk']}) @@ -32,7 +32,7 @@ class DataDonationOverview(DDMAuthMixin, BlueprintMixin, ListView): """ View to list all file uploaders associated with a project. """ model = FileUploader context_object_name = 'file_uploaders' - template_name = 'datadonation/overview.html' + template_name = 'ddm_datadonation/overview.html' def get_context_data(self, **kwargs): context = super().get_context_data(**kwargs) @@ -47,7 +47,7 @@ def get_queryset(self): class FileUploaderCreate(SuccessMessageMixin, DDMAuthMixin, BlueprintMixin, CreateView): """ View to create a new file uploader. """ model = FileUploader - template_name = 'datadonation/uploader/create.html' + template_name = 'ddm_datadonation/uploader/create.html' fields = ['name', 'upload_type', 'combined_consent'] success_message = 'File Uploader was created successfully.' @@ -60,13 +60,13 @@ def get_success_url(self): 'project_pk': self.kwargs['project_pk'], 'pk': self.object.pk } - return reverse('datadonation:uploaders:edit', kwargs=kwargs) + return reverse('ddm_datadonation:uploaders:edit', kwargs=kwargs) class FileUploaderEdit(SuccessMessageMixin, DDMAuthMixin, BlueprintMixin, UpdateView): """ View to edit the details of an existing file uploader. """ model = FileUploader - template_name = 'datadonation/uploader/edit.html' + template_name = 'ddm_datadonation/uploader/edit.html' fields = ['name', 'upload_type', 'combined_consent', 'index'] success_message = 'Blueprint Uploader "%(name)s" was successfully updated.' @@ -116,7 +116,7 @@ def form_valid(self, form, selected_blueprints): class FileUploaderDelete(SuccessMessageMixin, DDMAuthMixin, BlueprintMixin, DeleteView): """ View to delete an existing blueprint uploader. """ model = FileUploader - template_name = 'datadonation/uploader/delete.html' + template_name = 'ddm_datadonation/uploader/delete.html' success_message = 'File Uploader "%s" was deleted.' def get_success_message(self, cleaned_data): @@ -126,7 +126,7 @@ def get_success_message(self, cleaned_data): class BlueprintCreate(SuccessMessageMixin, DDMAuthMixin, BlueprintMixin, CreateView): """ View to create a new donation blueprint. """ model = DonationBlueprint - template_name = 'datadonation/blueprint/create.html' + template_name = 'ddm_datadonation/blueprint/create.html' form_class = BlueprintEditForm success_message = 'Blueprint was created successfully.' @@ -141,19 +141,19 @@ def form_valid(self, form): return super().form_valid(form) def get_success_url(self): - return reverse('datadonation:blueprints:edit', + return reverse('ddm_datadonation:blueprints:edit', kwargs={'project_pk': self.object.project.pk, 'pk': self.object.pk}) class BlueprintEdit(SuccessMessageMixin, DDMAuthMixin, BlueprintMixin, UpdateView): """ View to edit the details of an existing donation blueprint. """ model = DonationBlueprint - template_name = 'datadonation/blueprint/edit.html' + template_name = 'ddm_datadonation/blueprint/edit.html' form_class = BlueprintEditForm success_message = 'Blueprint "%(name)s" was successfully updated.' def get_success_url(self): - return reverse('datadonation:overview', kwargs={'project_pk': self.object.project.pk}) + return reverse('ddm_datadonation:overview', kwargs={'project_pk': self.object.project.pk}) def get_context_data(self, **kwargs): context = super().get_context_data(**kwargs) @@ -190,7 +190,7 @@ def form_invalid(self, form, formset): class BlueprintDelete(SuccessMessageMixin, DDMAuthMixin, BlueprintMixin, DeleteView): """ View to delete an existing donation blueprint. """ model = DonationBlueprint - template_name = 'datadonation/blueprint/delete.html' + template_name = 'ddm_datadonation/blueprint/delete.html' success_message = 'Blueprint "%s" was deleted.' def get_success_message(self, cleaned_data): @@ -207,14 +207,14 @@ def get_context_data(self, **kwargs): def get_success_url(self): kwargs = {'project_pk': self.kwargs['project_pk'], 'file_uploader_pk': self.kwargs['file_uploader_pk']} - return reverse('datadonation:instructions:overview', kwargs=kwargs) + return reverse('ddm_datadonation:instructions:overview', kwargs=kwargs) class InstructionOverview(DDMAuthMixin, InstructionMixin, ListView): """ View to create a new instruction page. """ model = DonationInstruction context_object_name = 'instructions' - template_name = 'datadonation/instructions/list.html' + template_name = 'ddm_datadonation/instructions/list.html' fields = ['text', 'index'] def get_queryset(self): @@ -225,7 +225,7 @@ def get_queryset(self): class InstructionCreate(SuccessMessageMixin, DDMAuthMixin, InstructionMixin, CreateView): """ View to create an instruction page. """ model = DonationInstruction - template_name = 'datadonation/instructions/create.html' + template_name = 'ddm_datadonation/instructions/create.html' fields = ['text', 'index'] success_message = 'Instruction page was successfully created.' @@ -248,7 +248,7 @@ def get_initial(self): class InstructionEdit(SuccessMessageMixin, DDMAuthMixin, InstructionMixin, UpdateView): """ View to edit an instruction page. """ model = DonationInstruction - template_name = 'datadonation/instructions/edit.html' + template_name = 'ddm_datadonation/instructions/edit.html' fields = ['text', 'index'] success_message = 'Instruction page was successfully updated.' @@ -256,7 +256,7 @@ class InstructionEdit(SuccessMessageMixin, DDMAuthMixin, InstructionMixin, Updat class InstructionDelete(SuccessMessageMixin, DDMAuthMixin, InstructionMixin, DeleteView): """ View to delete an instruction page. """ model = DonationInstruction - template_name = 'datadonation/instructions/delete.html' + template_name = 'ddm_datadonation/instructions/delete.html' success_message = 'Instruction page was deleted.' def get_success_message(self, cleaned_data): diff --git a/ddm/logging/templates/logging/event_log.html b/ddm/logging/templates/ddm_logging/event_log.html similarity index 100% rename from ddm/logging/templates/logging/event_log.html rename to ddm/logging/templates/ddm_logging/event_log.html diff --git a/ddm/logging/templates/logging/exception_log.html b/ddm/logging/templates/ddm_logging/exception_log.html similarity index 100% rename from ddm/logging/templates/logging/exception_log.html rename to ddm/logging/templates/ddm_logging/exception_log.html diff --git a/ddm/logging/templates/ddm_logging/overview.html b/ddm/logging/templates/ddm_logging/overview.html new file mode 100644 index 00000000..0f5de840 --- /dev/null +++ b/ddm/logging/templates/ddm_logging/overview.html @@ -0,0 +1,36 @@ +{% extends 'ddm_core/page_with_form.html' %} +{% load static %} + +{% block extrahead %} + + +{% endblock %} + +{% block scripts %} +{{ block.super }} + + + + + +{% endblock %} + +{% block page_title %}Project Logs{% endblock %} + +{% block main_heading %}Project Logs{% endblock %} + +{% block main_body %} +{% include 'ddm_logging/exception_log.html' %} + +{% include 'ddm_logging/event_log.html' %} + + +{% endblock %} + +{% block breadcrumbs %} +Projects / +"{{ project.name|truncatechars:15 }}" Project / +Logs +{% endblock %} diff --git a/ddm/logging/templates/logging/overview.html b/ddm/logging/templates/logging/overview.html deleted file mode 100644 index bd75944c..00000000 --- a/ddm/logging/templates/logging/overview.html +++ /dev/null @@ -1,36 +0,0 @@ -{% extends 'core/page_with_form.html' %} -{% load static %} - -{% block extrahead %} - - -{% endblock %} - -{% block scripts %} -{{ block.super }} - - - - - -{% endblock %} - -{% block page_title %}Project Logs{% endblock %} - -{% block main_heading %}Project Logs{% endblock %} - -{% block main_body %} -{% include 'logging/exception_log.html' %} - -{% include 'logging/event_log.html' %} - - -{% endblock %} - -{% block breadcrumbs %} -Projects / -"{{ project.name|truncatechars:15 }}" Project / -Logs -{% endblock %} diff --git a/ddm/logging/tests/test_apis.py b/ddm/logging/tests/test_apis.py index 52957910..4247cb65 100644 --- a/ddm/logging/tests/test_apis.py +++ b/ddm/logging/tests/test_apis.py @@ -53,7 +53,7 @@ def test_post_without_participant(self): def test_valid_post(self): client = Client() - client.get(reverse('participation:briefing', args=[self.project.slug])) + client.get(reverse('ddm_participation:briefing', args=[self.project.slug])) exceptions_count_before = ExceptionLogEntry.objects.count() client.post(self.post_url, self.post_data) exceptions_count_after = ExceptionLogEntry.objects.count() diff --git a/ddm/logging/views.py b/ddm/logging/views.py index d473cf6a..15ac3a8c 100644 --- a/ddm/logging/views.py +++ b/ddm/logging/views.py @@ -7,7 +7,7 @@ class ProjectLogsView(SuccessMessageMixin, DDMAuthMixin, TemplateView): """ View that lists all exceptions related to a project. """ - template_name = 'logging/overview.html' + template_name = 'ddm_logging/overview.html' def get_project(self): project_id = self.kwargs.get('project_pk') diff --git a/ddm/participation/static/participation/css/public-base.css b/ddm/participation/static/ddm_participation/css/public-base.css similarity index 100% rename from ddm/participation/static/participation/css/public-base.css rename to ddm/participation/static/ddm_participation/css/public-base.css diff --git a/ddm/participation/templates/participation/base.html b/ddm/participation/templates/ddm_participation/base.html similarity index 85% rename from ddm/participation/templates/participation/base.html rename to ddm/participation/templates/ddm_participation/base.html index e1789c80..2b6e713a 100644 --- a/ddm/participation/templates/participation/base.html +++ b/ddm/participation/templates/ddm_participation/base.html @@ -10,10 +10,10 @@ {% block title %}{{ project.name }}{% endblock title %} - - - - + + + + {% block extrahead %}{% endblock extrahead %} @@ -86,8 +86,8 @@
- - + + {% block extrascripts %}{% endblock extrascripts %} diff --git a/ddm/participation/templates/participation/briefing.html b/ddm/participation/templates/ddm_participation/briefing.html similarity index 96% rename from ddm/participation/templates/participation/briefing.html rename to ddm/participation/templates/ddm_participation/briefing.html index 7ef564bf..cb9d6155 100644 --- a/ddm/participation/templates/participation/briefing.html +++ b/ddm/participation/templates/ddm_participation/briefing.html @@ -1,4 +1,4 @@ -{% extends "participation/base.html" %} +{% extends "ddm_participation/base.html" %} {% load static i18n %} {% block content %} diff --git a/ddm/participation/templates/participation/continuation_not_found.html b/ddm/participation/templates/ddm_participation/continuation_not_found.html similarity index 67% rename from ddm/participation/templates/participation/continuation_not_found.html rename to ddm/participation/templates/ddm_participation/continuation_not_found.html index 0939520c..9f7bf74f 100644 --- a/ddm/participation/templates/participation/continuation_not_found.html +++ b/ddm/participation/templates/ddm_participation/continuation_not_found.html @@ -1,4 +1,4 @@ -{% extends "participation/base.html" %} +{% extends "ddm_participation/base.html" %} {% load static i18n %} {% block content %} @@ -6,7 +6,7 @@

{% translate "Provided ID not found" %}

{% translate "Unfortunately, we could not find a study participation started for the given ID. However, you can access the study by clicking on the following link:" %} - {% translate "Go to Study" %} + {% translate "Go to Study" %}

{% endblock %} diff --git a/ddm/participation/templates/participation/data_donation.html b/ddm/participation/templates/ddm_participation/data_donation.html similarity index 94% rename from ddm/participation/templates/participation/data_donation.html rename to ddm/participation/templates/ddm_participation/data_donation.html index 045df418..3d7578cb 100644 --- a/ddm/participation/templates/participation/data_donation.html +++ b/ddm/participation/templates/ddm_participation/data_donation.html @@ -1,4 +1,4 @@ -{% extends "participation/base.html" %} +{% extends "ddm_participation/base.html" %} {% load i18n %} {% load render_bundle from webpack_loader %} {% get_current_language as LANGUAGE_CODE %} diff --git a/ddm/participation/templates/participation/debriefing.html b/ddm/participation/templates/ddm_participation/debriefing.html similarity index 91% rename from ddm/participation/templates/participation/debriefing.html rename to ddm/participation/templates/ddm_participation/debriefing.html index 5fd761d0..8b82c8f0 100644 --- a/ddm/participation/templates/participation/debriefing.html +++ b/ddm/participation/templates/ddm_participation/debriefing.html @@ -1,4 +1,4 @@ -{% extends "participation/base.html" %} +{% extends "ddm_participation/base.html" %} {% load static i18n %} {% block content %} diff --git a/ddm/participation/templates/participation/questionnaire.html b/ddm/participation/templates/ddm_participation/questionnaire.html similarity index 84% rename from ddm/participation/templates/participation/questionnaire.html rename to ddm/participation/templates/ddm_participation/questionnaire.html index 08cced94..6535e8ee 100644 --- a/ddm/participation/templates/participation/questionnaire.html +++ b/ddm/participation/templates/ddm_participation/questionnaire.html @@ -1,10 +1,10 @@ -{% extends "participation/base.html" %} +{% extends "ddm_participation/base.html" %} {% load i18n static %} {% get_current_language as LANGUAGE_CODE %} {% load render_bundle from webpack_loader %} {% block extrahead %} - + {% endblock extrahead %} {% block content %} diff --git a/ddm/participation/tests/test_urls.py b/ddm/participation/tests/test_urls.py index 5ca42d74..c832ca16 100644 --- a/ddm/participation/tests/test_urls.py +++ b/ddm/participation/tests/test_urls.py @@ -6,28 +6,28 @@ class TestParticipationFlowUrls(SimpleTestCase): def test_project_briefing_url_resolves(self): - url = reverse('participation:briefing', args=['project-slug']) + url = reverse('ddm_participation:briefing', args=['project-slug']) self.assertEqual( resolve(url).func.view_class, participation_views.BriefingView ) def test_project_datadonation_url_resolves(self): - url = reverse('participation:datadonation', args=['project-slug']) + url = reverse('ddm_participation:datadonation', args=['project-slug']) self.assertEqual( resolve(url).func.view_class, participation_views.DataDonationView ) def test_project_questionnaire_url_resolves(self): - url = reverse('participation:questionnaire', args=['project-slug']) + url = reverse('ddm_participation:questionnaire', args=['project-slug']) self.assertEqual( resolve(url).func.view_class, participation_views.QuestionnaireView ) def test_project_debriefing_url_resolves(self): - url = reverse('participation:debriefing', args=['project-slug']) + url = reverse('ddm_participation:debriefing', args=['project-slug']) self.assertEqual( resolve(url).func.view_class, participation_views.DebriefingView diff --git a/ddm/participation/tests/test_views.py b/ddm/participation/tests/test_views.py index 7240be9c..97752192 100644 --- a/ddm/participation/tests/test_views.py +++ b/ddm/participation/tests/test_views.py @@ -60,23 +60,23 @@ def setUpTestData(cls): # URLs for project with questionnaire. slug_base = cls.project_base.slug - cls.briefing_url = reverse('participation:briefing', args=[slug_base]) - cls.dd_url = reverse('participation:datadonation', args=[slug_base]) - cls.quest_url = reverse('participation:questionnaire', args=[slug_base]) - cls.debriefing_url = reverse('participation:debriefing', args=[slug_base]) + cls.briefing_url = reverse('ddm_participation:briefing', args=[slug_base]) + cls.dd_url = reverse('ddm_participation:datadonation', args=[slug_base]) + cls.quest_url = reverse('ddm_participation:questionnaire', args=[slug_base]) + cls.debriefing_url = reverse('ddm_participation:debriefing', args=[slug_base]) # URLs for project without questionnaire. slug_alt = cls.project_alt.slug - cls.briefing_url_no_quest = reverse('participation:briefing', args=[slug_alt]) - cls.dd_url_no_quest = reverse('participation:datadonation', args=[slug_alt]) - cls.quest_url_no_quest = reverse('participation:questionnaire', args=[slug_alt]) - cls.debriefing_url_no_quest = reverse('participation:debriefing', args=[slug_alt]) + cls.briefing_url_no_quest = reverse('ddm_participation:briefing', args=[slug_alt]) + cls.dd_url_no_quest = reverse('ddm_participation:datadonation', args=[slug_alt]) + cls.quest_url_no_quest = reverse('ddm_participation:questionnaire', args=[slug_alt]) + cls.debriefing_url_no_quest = reverse('ddm_participation:debriefing', args=[slug_alt]) # URLs for non-existing project. - cls.briefing_url_invalid = reverse('participation:briefing', args=['nope']) - cls.dd_url_invalid = reverse('participation:datadonation', args=['nope']) - cls.quest_url_invalid = reverse('participation:questionnaire', args=['nope']) - cls.debriefing_url_invalid = reverse('participation:debriefing', args=['nope']) + cls.briefing_url_invalid = reverse('ddm_participation:briefing', args=['nope']) + cls.dd_url_invalid = reverse('ddm_participation:datadonation', args=['nope']) + cls.quest_url_invalid = reverse('ddm_participation:questionnaire', args=['nope']) + cls.debriefing_url_invalid = reverse('ddm_participation:debriefing', args=['nope']) def initialize_project_and_session(self): self.client = Client() @@ -412,7 +412,7 @@ def setUp(self): def test_render_without_participant(self): new_client = Client() - url = reverse('participation:continuation', args=[self.project_base.slug]) + url = reverse('ddm_participation:continuation', args=[self.project_base.slug]) response = new_client.get(url, data={'p': 'some-non-existing-id'}, follow=True) self.assertEqual(response.status_code, 200) self.assertTemplateUsed(response, ContinuationView.template_name) @@ -422,7 +422,7 @@ def test_redirect_continuation(self): self.client.post(self.briefing_url) self.client.get(self.dd_url) participant = self.get_participant(self.project_base.pk) - url = reverse('participation:continuation', args=[self.project_base.slug]) + url = reverse('ddm_participation:continuation', args=[self.project_base.slug]) new_client = Client() response = new_client.get(url, data={'p': participant.external_id}, follow=True) self.assertRedirects(response, self.dd_url) diff --git a/ddm/participation/urls.py b/ddm/participation/urls.py index f478361f..cf9ae602 100644 --- a/ddm/participation/urls.py +++ b/ddm/participation/urls.py @@ -3,7 +3,7 @@ from ddm.participation import views -app_name = 'participation' +app_name = 'ddm_participation' urlpatterns = [ path(r'', views.participation_redirect_view, name='redirect'), path(r'briefing/', views.BriefingView.as_view(), name='briefing'), diff --git a/ddm/participation/views.py b/ddm/participation/views.py index 9a594eff..b78ee078 100644 --- a/ddm/participation/views.py +++ b/ddm/participation/views.py @@ -51,10 +51,10 @@ class ParticipationFlowBaseView(DetailView): context_object_name = 'project' steps = [ - 'participation:briefing', - 'participation:datadonation', - 'participation:questionnaire', - 'participation:debriefing' + 'ddm_participation:briefing', + 'ddm_participation:datadonation', + 'ddm_participation:questionnaire', + 'ddm_participation:debriefing' ] participant = None current_step = None @@ -151,12 +151,12 @@ def participation_redirect_view(request, slug): """ Redirect user to briefing page if url does not contain a step indicator. """ - return redirect('participation:briefing', slug) + return redirect('ddm_participation:briefing', slug) class BriefingView(ParticipationFlowBaseView): - template_name = 'participation/briefing.html' - step_name = 'participation:briefing' + template_name = 'ddm_participation/briefing.html' + step_name = 'ddm_participation:briefing' def post(self, request, *args, **kwargs): """ @@ -225,8 +225,8 @@ def extra_before_render(self, request): @method_decorator(cache_page(0), name='dispatch') class DataDonationView(ParticipationFlowBaseView): - template_name = 'participation/data_donation.html' - step_name = 'participation:datadonation' + template_name = 'ddm_participation/data_donation.html' + step_name = 'ddm_participation:datadonation' def get_context_data(self, **kwargs): context = super().get_context_data(**kwargs) @@ -298,8 +298,8 @@ def process_uploads(self, files): class QuestionnaireView(ParticipationFlowBaseView): - template_name = 'participation/questionnaire.html' - step_name = 'participation:questionnaire' + template_name = 'ddm_participation/questionnaire.html' + step_name = 'ddm_participation:questionnaire' def setup(self, request, *args, **kwargs): """ Reset extra_scripts """ @@ -349,8 +349,8 @@ def process_response(self, response): class DebriefingView(ParticipationFlowBaseView): - template_name = 'participation/debriefing.html' - step_name = 'participation:debriefing' + template_name = 'ddm_participation/debriefing.html' + step_name = 'ddm_participation:debriefing' def get_context_data(self, **kwargs): """ Inject url parameters in redirect target. """ @@ -384,7 +384,7 @@ class ContinuationView(DetailView): """ model = DonationProject context_object_name = 'project' - template_name = 'participation/continuation_not_found.html' + template_name = 'ddm_participation/continuation_not_found.html' def get(self, request, *args, **kwargs): self.object = self.get_object() diff --git a/ddm/projects/static/projects/css/research-interface-base.css b/ddm/projects/static/ddm_projects/css/research-interface-base.css similarity index 100% rename from ddm/projects/static/projects/css/research-interface-base.css rename to ddm/projects/static/ddm_projects/css/research-interface-base.css diff --git a/ddm/projects/static/projects/js/briefing-edit-utils.js b/ddm/projects/static/ddm_projects/js/briefing-edit-utils.js similarity index 100% rename from ddm/projects/static/projects/js/briefing-edit-utils.js rename to ddm/projects/static/ddm_projects/js/briefing-edit-utils.js diff --git a/ddm/projects/static/projects/js/delete-data.js b/ddm/projects/static/ddm_projects/js/delete-data.js similarity index 100% rename from ddm/projects/static/projects/js/delete-data.js rename to ddm/projects/static/ddm_projects/js/delete-data.js diff --git a/ddm/projects/static/projects/js/download-data.js b/ddm/projects/static/ddm_projects/js/download-data.js similarity index 100% rename from ddm/projects/static/projects/js/download-data.js rename to ddm/projects/static/ddm_projects/js/download-data.js diff --git a/ddm/projects/static/projects/js/project-admin-base.js b/ddm/projects/static/ddm_projects/js/project-admin-base.js similarity index 100% rename from ddm/projects/static/projects/js/project-admin-base.js rename to ddm/projects/static/ddm_projects/js/project-admin-base.js diff --git a/ddm/projects/static/projects/js/project-create-utils.js b/ddm/projects/static/ddm_projects/js/project-create-utils.js similarity index 100% rename from ddm/projects/static/projects/js/project-create-utils.js rename to ddm/projects/static/ddm_projects/js/project-create-utils.js diff --git a/ddm/projects/static/projects/js/project-edit-utils.js b/ddm/projects/static/ddm_projects/js/project-edit-utils.js similarity index 100% rename from ddm/projects/static/projects/js/project-edit-utils.js rename to ddm/projects/static/ddm_projects/js/project-edit-utils.js diff --git a/ddm/projects/templates/projects/create.html b/ddm/projects/templates/ddm_projects/create.html similarity index 96% rename from ddm/projects/templates/projects/create.html rename to ddm/projects/templates/ddm_projects/create.html index f6193bff..fb2873ef 100644 --- a/ddm/projects/templates/projects/create.html +++ b/ddm/projects/templates/ddm_projects/create.html @@ -1,4 +1,4 @@ -{% extends 'core/page_with_form.html' %} +{% extends 'ddm_core/page_with_form.html' %} {% load static %} @@ -92,5 +92,5 @@ {% block scripts %} {{ block.super }} - + {% endblock %} diff --git a/ddm/projects/templates/projects/delete.html b/ddm/projects/templates/ddm_projects/delete.html similarity index 95% rename from ddm/projects/templates/projects/delete.html rename to ddm/projects/templates/ddm_projects/delete.html index 4fa116fc..069ead15 100644 --- a/ddm/projects/templates/projects/delete.html +++ b/ddm/projects/templates/ddm_projects/delete.html @@ -1,4 +1,4 @@ -{% extends 'core/page_with_form.html' %} +{% extends 'ddm_core/page_with_form.html' %} {% block page_title %}Delete Project{% endblock %} diff --git a/ddm/projects/templates/projects/detail.html b/ddm/projects/templates/ddm_projects/detail.html similarity index 86% rename from ddm/projects/templates/projects/detail.html rename to ddm/projects/templates/ddm_projects/detail.html index 7b80f687..b38ce996 100644 --- a/ddm/projects/templates/projects/detail.html +++ b/ddm/projects/templates/ddm_projects/detail.html @@ -1,4 +1,4 @@ -{% extends 'core/base.html' %} +{% extends 'ddm_core/base.html' %} {% load static %} {% block page_title %}Project Overview{% endblock %} @@ -25,7 +25,7 @@ Public Access: - {{ request.scheme }}://{{ request.get_host }}{% url 'participation:briefing' object.slug %}
+ {{ request.scheme }}://{{ request.get_host }}{% url 'ddm_participation:briefing' object.slug %}
To test the project yourself from the participants' perspective, open this link in a new private window. @@ -58,7 +58,7 @@
- +
Data Donation
@@ -71,7 +71,7 @@
- +
Questionnaire
@@ -174,7 +174,7 @@
{# Modal for download error #} -{% include "core/components/info_modal.html" with modal_id="modal-download-error" body="

Download Failed

The download failed due to the following issue: " reload="False" %} +{% include "ddm_core/components/info_modal.html" with modal_id="modal-download-error" body="

Download Failed

The download failed due to the following issue: " reload="False" %} {# DANGER ZONE #} @@ -238,13 +238,13 @@

Delete Participant

{# Modal for participant delete success #} -{% include "core/components/info_modal.html" with modal_id="modal-participant-delete-success" body="

Participant Deleted

Participant was successfully deleted." reload="False" %} +{% include "ddm_core/components/info_modal.html" with modal_id="modal-participant-delete-success" body="

Participant Deleted

Participant was successfully deleted." reload="False" %} {# Modal for delete success #} -{% include "core/components/info_modal.html" with modal_id="modal-delete-success" body="

All data were successfully deleted.

" reload="True" %} +{% include "ddm_core/components/info_modal.html" with modal_id="modal-delete-success" body="

All data were successfully deleted.

" reload="True" %} {# Modal for delete error #} -{% include "core/components/info_modal.html" with modal_id="modal-delete-error" body="

An error occurred

Something went wrong during the data deletion: " reload="False" %} +{% include "ddm_core/components/info_modal.html" with modal_id="modal-delete-error" body="

An error occurred

Something went wrong during the data deletion: " reload="False" %}
🠐 Back @@ -266,6 +266,6 @@

Delete Participant

{% block scripts %} {{ block.super }} - - + + {% endblock %} diff --git a/ddm/projects/templates/projects/edit-briefing.html b/ddm/projects/templates/ddm_projects/edit-briefing.html similarity index 82% rename from ddm/projects/templates/projects/edit-briefing.html rename to ddm/projects/templates/ddm_projects/edit-briefing.html index da282124..c6fe32a9 100644 --- a/ddm/projects/templates/projects/edit-briefing.html +++ b/ddm/projects/templates/ddm_projects/edit-briefing.html @@ -1,4 +1,4 @@ -{% extends 'core/page_with_form.html' %} +{% extends 'ddm_core/page_with_form.html' %} {% load static %} @@ -18,5 +18,5 @@ {% block scripts %} {{ block.super }} - + {% endblock %} diff --git a/ddm/projects/templates/projects/edit-debriefing.html b/ddm/projects/templates/ddm_projects/edit-debriefing.html similarity index 91% rename from ddm/projects/templates/projects/edit-debriefing.html rename to ddm/projects/templates/ddm_projects/edit-debriefing.html index a62dd2a3..80ad2426 100644 --- a/ddm/projects/templates/projects/edit-debriefing.html +++ b/ddm/projects/templates/ddm_projects/edit-debriefing.html @@ -1,4 +1,4 @@ -{% extends 'core/page_with_form.html' %} +{% extends 'ddm_core/page_with_form.html' %} {% block page_title %}Edit Project{% endblock %} diff --git a/ddm/projects/templates/projects/edit.html b/ddm/projects/templates/ddm_projects/edit.html similarity index 93% rename from ddm/projects/templates/projects/edit.html rename to ddm/projects/templates/ddm_projects/edit.html index bd88fe7e..a978f678 100644 --- a/ddm/projects/templates/projects/edit.html +++ b/ddm/projects/templates/ddm_projects/edit.html @@ -1,4 +1,4 @@ -{% extends 'core/page_with_form.html' %} +{% extends 'ddm_core/page_with_form.html' %} {% load static %} @@ -30,7 +30,7 @@
{% for field in form %} {% if field.name in "name,slug" %} - {% include "core/components/form_field_basic.html" %} + {% include "ddm_core/components/form_field_basic.html" %} {% endif %} {% endfor %}
@@ -48,7 +48,7 @@

This information is linked in your project's footer. Participants can access this information at any time.

{% for field in form %} {% if field.name in "contact_information,data_protection_statement" %} - {% include "core/components/form_field_basic.html" %} + {% include "ddm_core/components/form_field_basic.html" %} {% endif %} {% endfor %}
@@ -68,7 +68,7 @@

{% for field in form %} {% if field.name in "url_parameter_enabled,expected_url_parameters" %} - {% include "core/components/form_field_basic.html" %} + {% include "ddm_core/components/form_field_basic.html" %} {% endif %} {% endfor %}
@@ -89,7 +89,7 @@

{% for field in form %} {% if field.name in "redirect_enabled,redirect_target" %} - {% include "core/components/form_field_basic.html" %} + {% include "ddm_core/components/form_field_basic.html" %} {% endif %} {% endfor %} @@ -143,5 +143,5 @@ {% block scripts %} {{ block.super }} - + {% endblock %} diff --git a/ddm/projects/templates/projects/list.html b/ddm/projects/templates/ddm_projects/list.html similarity index 95% rename from ddm/projects/templates/projects/list.html rename to ddm/projects/templates/ddm_projects/list.html index 95e432e2..bbde318d 100644 --- a/ddm/projects/templates/projects/list.html +++ b/ddm/projects/templates/ddm_projects/list.html @@ -1,4 +1,4 @@ -{% extends 'core/base.html' %} +{% extends 'ddm_core/base.html' %} {% block page_title %}Donation Projects{% endblock %} diff --git a/ddm/projects/tests/test_admin_views.py b/ddm/projects/tests/test_admin_views.py index e5bc6c34..9d2f5150 100644 --- a/ddm/projects/tests/test_admin_views.py +++ b/ddm/projects/tests/test_admin_views.py @@ -143,29 +143,29 @@ def get_admin_urls(cls, project_pk): 'ddm_projects:delete', 'ddm_projects:briefing_edit', 'ddm_projects:debriefing_edit', - 'datadonation:overview', - 'datadonation:blueprints:create', - 'questionnaire:overview', + 'ddm_datadonation:overview', + 'ddm_datadonation:blueprints:create', + 'ddm_questionnaire:overview', 'ddm_logging:project_logs', 'ddm_auth:project_token' ] for view in project_related_views: urls.append(reverse(view, args=[project_pk])) - blueprint_related_views = ['datadonation:blueprints:edit', 'datadonation:blueprints:delete'] + blueprint_related_views = ['ddm_datadonation:blueprints:edit', 'ddm_datadonation:blueprints:delete'] for view in blueprint_related_views: urls.append(reverse(view, args=[project_pk, cls.blueprint.pk])) uploader_related_views = [ - 'datadonation:uploaders:edit', - 'datadonation:uploaders:delete', - 'datadonation:instructions:overview', - 'datadonation:instructions:create' + 'ddm_datadonation:uploaders:edit', + 'ddm_datadonation:uploaders:delete', + 'ddm_datadonation:instructions:overview', + 'ddm_datadonation:instructions:create' ] for view in uploader_related_views: urls.append(reverse(view, args=[project_pk, cls.file_uploader.pk])) - instruction_related_views = ['datadonation:instructions:edit', 'datadonation:instructions:delete'] + instruction_related_views = ['ddm_datadonation:instructions:edit', 'ddm_datadonation:instructions:delete'] for view in instruction_related_views: urls.append( reverse(view, args=[project_pk, cls.file_uploader.pk, cls.instruction.pk])) @@ -180,29 +180,29 @@ def get_admin_urls(cls, project_pk): ] for question in questions: urls.append( - reverse('questionnaire:create', args=[project_pk, question[0]])) + reverse('ddm_questionnaire:create', args=[project_pk, question[0]])) - for view in ['questionnaire:edit', 'questionnaire:delete']: + for view in ['ddm_questionnaire:edit', 'ddm_questionnaire:delete']: for question in questions: urls.append( reverse(view, args=[project_pk, question[0], question[1]])) item_views = [ - reverse('questionnaire:items', + reverse('ddm_questionnaire:items', args=[project_pk, 'single_choice', cls.sc_quest.pk]), - reverse('questionnaire:items', + reverse('ddm_questionnaire:items', args=[project_pk, 'multi_choice', cls.mc_quest.pk]), - reverse('questionnaire:items', + reverse('ddm_questionnaire:items', args=[project_pk, 'matrix', cls.matrix_quest.pk]), - reverse('questionnaire:items', + reverse('ddm_questionnaire:items', args=[project_pk, 'semantic_diff', cls.diff_quest.pk]), ] urls += item_views scale_views = [ - reverse('questionnaire:scale', + reverse('ddm_questionnaire:scale', args=[project_pk, 'matrix', cls.matrix_quest.pk]), - reverse('questionnaire:scale', + reverse('ddm_questionnaire:scale', args=[project_pk, 'semantic_diff', cls.diff_quest.pk]), ] urls += scale_views diff --git a/ddm/projects/views.py b/ddm/projects/views.py index c05e6945..1fefcebb 100644 --- a/ddm/projects/views.py +++ b/ddm/projects/views.py @@ -12,7 +12,7 @@ class ProjectList(DDMAuthMixin, ListView): """ View to display a list of existing donation projects. """ model = DonationProject - template_name = 'projects/list.html' + template_name = 'ddm_projects/list.html' def get_queryset(self): return DonationProject.objects.filter(owner__user=self.request.user) @@ -21,7 +21,7 @@ def get_queryset(self): class ProjectCreate(SuccessMessageMixin, DDMAuthMixin, CreateView): """ View to create a new donation project. """ model = DonationProject - template_name = 'projects/create.html' + template_name = 'ddm_projects/create.html' form_class = ProjectCreateForm success_message = 'Project was created successfully.' @@ -38,13 +38,13 @@ def form_valid(self, form): class ProjectDetail(DDMAuthMixin, DetailView): """ View to display landing page for project. """ model = DonationProject - template_name = 'projects/detail.html' + template_name = 'ddm_projects/detail.html' class ProjectEdit(SuccessMessageMixin, DDMAuthMixin, UpdateView): """ View to edit the details of an existing donation project. """ model = DonationProject - template_name = 'projects/edit.html' + template_name = 'ddm_projects/edit.html' form_class = ProjectEditForm success_message = 'Project details successfully updated.' @@ -52,7 +52,7 @@ class ProjectEdit(SuccessMessageMixin, DDMAuthMixin, UpdateView): class ProjectDelete(SuccessMessageMixin, DDMAuthMixin, DeleteView): """ View to display a list of existing donation projects. """ model = DonationProject - template_name = 'projects/delete.html' + template_name = 'ddm_projects/delete.html' success_url = reverse_lazy('ddm_projects:list') success_message = 'Project "%s" was deleted.' @@ -63,7 +63,7 @@ def get_success_message(self, cleaned_data): class BriefingEdit(SuccessMessageMixin, DDMAuthMixin, UpdateView): """ View to edit the briefing page. """ model = DonationProject - template_name = 'projects/edit-briefing.html' + template_name = 'ddm_projects/edit-briefing.html' form_class = BriefingEditForm success_message = 'Briefing page successfully updated.' @@ -71,6 +71,6 @@ class BriefingEdit(SuccessMessageMixin, DDMAuthMixin, UpdateView): class DebriefingEdit(SuccessMessageMixin, DDMAuthMixin, UpdateView): """ View to edit the debriefing page. """ model = DonationProject - template_name = 'projects/edit-debriefing.html' + template_name = 'ddm_projects/edit-debriefing.html' form_class = DebriefingEditForm success_message = 'Debriefing page successfully updated.' diff --git a/ddm/questionnaire/static/questionnaire/css/questionnaire.css b/ddm/questionnaire/static/ddm_questionnaire/css/questionnaire.css similarity index 100% rename from ddm/questionnaire/static/questionnaire/css/questionnaire.css rename to ddm/questionnaire/static/ddm_questionnaire/css/questionnaire.css diff --git a/ddm/questionnaire/templates/questionnaire/create.html b/ddm/questionnaire/templates/ddm_questionnaire/create.html similarity index 65% rename from ddm/questionnaire/templates/questionnaire/create.html rename to ddm/questionnaire/templates/ddm_questionnaire/create.html index 896e69c3..01e09360 100644 --- a/ddm/questionnaire/templates/questionnaire/create.html +++ b/ddm/questionnaire/templates/ddm_questionnaire/create.html @@ -1,4 +1,4 @@ -{% extends 'core/page_with_form.html' %} +{% extends 'ddm_core/page_with_form.html' %} {% block page_title %}Create {{ question_type }}{% endblock %} @@ -6,11 +6,11 @@ {% block submit_label %}Create Question{% endblock %} -{% block cancel_target %}{% url 'questionnaire:overview' project_pk %}{% endblock %} +{% block cancel_target %}{% url 'ddm_questionnaire:overview' project_pk %}{% endblock %} {% block breadcrumbs %} Projects / "{{ project.name|truncatechars:15 }}" Project / -Questionnaire / +Questionnaire / Create Question {% endblock %} diff --git a/ddm/questionnaire/templates/questionnaire/delete.html b/ddm/questionnaire/templates/ddm_questionnaire/delete.html similarity index 83% rename from ddm/questionnaire/templates/questionnaire/delete.html rename to ddm/questionnaire/templates/ddm_questionnaire/delete.html index e044de21..d24c9746 100644 --- a/ddm/questionnaire/templates/questionnaire/delete.html +++ b/ddm/questionnaire/templates/ddm_questionnaire/delete.html @@ -1,4 +1,4 @@ -{% extends 'core/page_with_form.html' %} +{% extends 'ddm_core/page_with_form.html' %} {% block page_title %}Delete Question{% endblock %} @@ -28,7 +28,7 @@

Are you sure you want to delete this question?

- 🠐 Cancel + 🠐 Cancel

{% endblock %} @@ -36,6 +36,6 @@ {% block breadcrumbs %} Projects / "{{ project.name|truncatechars:15 }}" Project / -Questionnaire / +Questionnaire / Delete Question {% endblock %} diff --git a/ddm/questionnaire/templates/questionnaire/edit.html b/ddm/questionnaire/templates/ddm_questionnaire/edit.html similarity index 82% rename from ddm/questionnaire/templates/questionnaire/edit.html rename to ddm/questionnaire/templates/ddm_questionnaire/edit.html index ff093e07..5cea0706 100644 --- a/ddm/questionnaire/templates/questionnaire/edit.html +++ b/ddm/questionnaire/templates/ddm_questionnaire/edit.html @@ -1,4 +1,4 @@ -{% extends 'core/page_with_form.html' %} +{% extends 'ddm_core/page_with_form.html' %} {% block page_title %}Edit {{ question_type }}{% endblock %} @@ -26,7 +26,7 @@ {% block cancel %}

- 🠐 Back + 🠐 Back

{% endblock %} @@ -62,7 +62,7 @@ {% endfor %} -

Edit Items

+

Edit Items

{% endif %} @@ -91,13 +91,13 @@ No scale points defined. {% endfor %} -

Edit Scale Points

+

Edit Scale Points

{% endif %}
- 🠐 Back + 🠐 Back
{% endblock %} @@ -105,6 +105,6 @@ {% block breadcrumbs %} Projects / "{{ project.name|truncatechars:15 }}" Project / -Questionnaire / +Questionnaire / Edit Question {% endblock %} diff --git a/ddm/questionnaire/templates/questionnaire/edit_set.html b/ddm/questionnaire/templates/ddm_questionnaire/edit_set.html similarity index 78% rename from ddm/questionnaire/templates/questionnaire/edit_set.html rename to ddm/questionnaire/templates/ddm_questionnaire/edit_set.html index 6f403941..5e7c6aff 100644 --- a/ddm/questionnaire/templates/questionnaire/edit_set.html +++ b/ddm/questionnaire/templates/ddm_questionnaire/edit_set.html @@ -1,4 +1,4 @@ -{% extends 'core/page_with_form.html' %} +{% extends 'ddm_core/page_with_form.html' %} {% block page_title %}Edit {{ context_title }}{% endblock %} @@ -42,7 +42,7 @@

- 🠐 Back + 🠐 Back

{% endblock %} @@ -50,8 +50,8 @@ {% block breadcrumbs %} Projects / "{{ project.name|truncatechars:15 }}" Project / -Questionnaire / -Question / +Questionnaire / +Question / Items {% endblock %} diff --git a/ddm/questionnaire/templates/questionnaire/list.html b/ddm/questionnaire/templates/ddm_questionnaire/list.html similarity index 89% rename from ddm/questionnaire/templates/questionnaire/list.html rename to ddm/questionnaire/templates/ddm_questionnaire/list.html index 6af0135a..adce9f06 100644 --- a/ddm/questionnaire/templates/questionnaire/list.html +++ b/ddm/questionnaire/templates/ddm_questionnaire/list.html @@ -1,4 +1,4 @@ -{% extends 'core/base.html' %} +{% extends 'ddm_core/base.html' %} {% block page_title %}Questionnaire Setup{% endblock %} @@ -43,7 +43,7 @@
General Questions
{{ question.index }} {{ question.name }} {{ question.get_question_type_display }} - Edit Question | Delete Question + Edit Question | Delete Question {% empty %} General Questions @@ -91,7 +91,7 @@
Questions Associated to File Blueprints
{{ question.index }} {{ question.name }} {{ question.get_question_type_display }} - Edit Question | Delete Question + Edit Question | Delete Question {% empty %} {{ blueprint.name }} @@ -121,7 +121,7 @@