diff --git a/CHANGELOG.md b/CHANGELOG.md index c43a361cc0..6a979e5f9e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # Changelog +## RDMO 1.8.1 (May 25, 2022) + +* Fix a bug on the "show all projects on site" view +* Fix a bug with the slider in the interview +* Fix a when selecting and deselecting a checkbox in the interview +* Fix exception when no user matched filter criteria +* Add keycloak logo to be used with allauth +* Add email and phone to VALUE_TYPE_CHOICES +* Various minor fixes + ## RDMO 1.8.0 (Mar 07, 2022) * Add Project Export Provider to perform import and export from and to webservices diff --git a/docs/dev.md b/docs/dev.md index f931773e82..ffa60e1719 100644 --- a/docs/dev.md +++ b/docs/dev.md @@ -92,6 +92,12 @@ The testing data can be imported using: ```bash python manage.py loaddata ../rdmo/testing/fixtures/* ``` +To update the testing data fixtures based on the current database, each of the RDMO apps with new data needs to be dumped using the following command. +As an example, the views and projects app contain new data: +```bash +python manage.py dumpdata --indent 4 -o ../rdmo/testing/fixtures/views.json views +python manage.py dumpdata --indent 4 -o ../rdmo/testing/fixtures/projects.json projects +``` The test upload files are initialized using: diff --git a/rdmo/accounts/static/accounts/img/keycloak_logo_200px.svg b/rdmo/accounts/static/accounts/img/keycloak_logo_200px.svg new file mode 100644 index 0000000000..27fba53778 --- /dev/null +++ b/rdmo/accounts/static/accounts/img/keycloak_logo_200px.svg @@ -0,0 +1,711 @@ + + + + + + + + + + + + + + keycloak_deliverables + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + keycloak_deliverables + + + + diff --git a/rdmo/accounts/templates/socialaccount/snippets/provider_list.html b/rdmo/accounts/templates/socialaccount/snippets/provider_list.html index 99727dd2d5..f8f4e278cd 100644 --- a/rdmo/accounts/templates/socialaccount/snippets/provider_list.html +++ b/rdmo/accounts/templates/socialaccount/snippets/provider_list.html @@ -24,6 +24,13 @@ ORCID sign in +{% elif provider.id == 'keycloak' %} +
  • + + Keycloak sign in + +
  • {% else %}
  • 0: + data_file = open(filename, 'w') + csv_writer = csv.writer(data_file) + csv_writer.writerow(list(data[0].keys())) + for user in data: + csv_writer.writerow(user.values()) + print('List written to ' + filename) def print_file(self, filename): f = open(filename, 'r') diff --git a/rdmo/core/management/commands/find_users.py b/rdmo/core/management/commands/find_users.py index 31134f2b6a..2625c5bacc 100644 --- a/rdmo/core/management/commands/find_users.py +++ b/rdmo/core/management/commands/find_users.py @@ -39,12 +39,13 @@ def add_arguments(self, parser): ) def save_csv(self, data, filename): - data_file = open(filename, 'w') - csv_writer = csv.writer(data_file) - csv_writer.writerow(list(data[0].keys())) - for user in data: - csv_writer.writerow(user.values()) - print('List written to ' + filename) + if len(data) > 0: + data_file = open(filename, 'w') + csv_writer = csv.writer(data_file) + csv_writer.writerow(list(data[0].keys())) + for user in data: + csv_writer.writerow(user.values()) + print('List written to ' + filename) def print_file(self, filename): f = open(filename, 'r') @@ -102,7 +103,7 @@ def handle(self, *args, **options): found_users = self.find_users(options) print( - 'Matching filter the: %d %.2f%%' + 'Matching the filter: %d %.2f%%' % ( len(found_users), (100/no_total_users)*len(found_users) diff --git a/rdmo/core/settings.py b/rdmo/core/settings.py index 6d936522cd..9cbcdf19a3 100644 --- a/rdmo/core/settings.py +++ b/rdmo/core/settings.py @@ -323,6 +323,23 @@ 'path': 'css/bootstrap.min.css', 'sri': 'sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu', } + ], + 'font': [ + { + 'path': 'fonts/glyphicons-halflings-regular.eot' + }, + { + 'path': 'fonts/glyphicons-halflings-regular.woff' + }, + { + 'path': 'fonts/glyphicons-halflings-regular.woff2' + }, + { + 'path': 'fonts/glyphicons-halflings-regular.ttf' + }, + { + 'path': 'fonts/glyphicons-halflings-regular.svg' + } ] }, 'bootstrap-datepicker': { diff --git a/rdmo/core/utils.py b/rdmo/core/utils.py index a4ffd27bc1..497998a5e9 100644 --- a/rdmo/core/utils.py +++ b/rdmo/core/utils.py @@ -350,7 +350,7 @@ def markdown2html(markdown_string): html = markdown(force_str(markdown_string)) html = re.sub( r'\[(.*?)\]\{(.*?)\}', - '\1', + r'\1', html ) return html diff --git a/rdmo/core/xml.py b/rdmo/core/xml.py index c48dd4bd56..7961202453 100644 --- a/rdmo/core/xml.py +++ b/rdmo/core/xml.py @@ -73,9 +73,10 @@ def get_ns_map(treenode): def get_uri(treenode, ns_map): - ns_tag = get_ns_tag('dc:uri', ns_map) - if ns_tag is not None: - return treenode.attrib.get(ns_tag) + if treenode is not None: + ns_tag = get_ns_tag('dc:uri', ns_map) + if ns_tag is not None: + return treenode.attrib.get(ns_tag) def strip_ns(tag, ns_map): diff --git a/rdmo/projects/mixins.py b/rdmo/projects/mixins.py index 0cfca3d718..1cec275088 100644 --- a/rdmo/projects/mixins.py +++ b/rdmo/projects/mixins.py @@ -33,7 +33,7 @@ def get_questions(self, catalog): questions = {} for question in queryset: - if question.attribute.uri not in questions: + if question.attribute and question.attribute.uri not in questions: questions[question.attribute.uri] = question return questions diff --git a/rdmo/projects/static/projects/js/project_questions/services.js b/rdmo/projects/static/projects/js/project_questions/services.js index 46ecd0395a..a3ce0cca8a 100644 --- a/rdmo/projects/static/projects/js/project_questions/services.js +++ b/rdmo/projects/static/projects/js/project_questions/services.js @@ -666,6 +666,7 @@ angular.module('project_questions') id: value.id, project: service.project.id }, function() { + delete(value.id); value.changed = false; }).$promise; } else { diff --git a/rdmo/projects/templates/projects/project_questions_form_group_range.html b/rdmo/projects/templates/projects/project_questions_form_group_range.html index ff1457bd66..384f413d59 100644 --- a/rdmo/projects/templates/projects/project_questions_form_group_range.html +++ b/rdmo/projects/templates/projects/project_questions_form_group_range.html @@ -27,7 +27,7 @@ ng-attr-id="id_{$ question.attribute $}_{$ valueset.set_prefix $}_{$ valueset.set_index $}_{$ $index $}" ng-model="value.text" ng-disabled="service.project.read_only" - ng-change="service.changed(value, true)" + ng-mouseup="service.changed(value, true)" ng-class="{'default-value': service.isDefaultValue(question, value)}"/> diff --git a/rdmo/questions/templates/questions/catalogs.html b/rdmo/questions/templates/questions/catalogs.html index 34cb663ceb..b6bb1e380e 100644 --- a/rdmo/questions/templates/questions/catalogs.html +++ b/rdmo/questions/templates/questions/catalogs.html @@ -67,13 +67,13 @@

    {% trans 'Questions' %}

    {% trans 'Sites for this catalog' %}
    -
      -
    • +
    • {$ site.name $}
    • -
    • - {% trans 'all Sites' %} +
    • + {% trans 'All sites' %}