Skip to content

Commit

Permalink
Merge branch 'dev-1.10.0' into 'feature/490-editor-permissions-multis…
Browse files Browse the repository at this point in the history
…ite'

Fixes base branch 490-editor-permissions-multisite

See pull request rdmorganiser#565
  • Loading branch information
MyPyDavid committed Apr 14, 2023
2 parents 5b76f30 + 807f80d commit 3269771
Show file tree
Hide file tree
Showing 40 changed files with 477 additions and 115 deletions.
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
# Changelog

## RDMO 1.9.2 (Feb 23, 2023)

* Fix URL in invite emails in the multi site setup (#576)
* Check permissions for parent project on project page (#576)
* Fix project invite timeout (#580)
* Restore missing commits from last release

## RDMO 1.9.1 (Feb 03, 2023)

* Fix overlays if tasks/views are not available for a project
* Add a last overlay with the invitation to contact local support
* Add find_inactive_users and find_inactive_projects management scripts
* Add delete_projects management script
* Fix cancel button on project import
* Add A4 as default paper size to pandoc args
* Improve continuous integration

## RDMO 1.9.0 (Nov 28, 2022)

* Automatically update existing projects on saving of views
Expand Down
2 changes: 1 addition & 1 deletion rdmo/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
__title__ = 'rdmo'
__version__ = '1.9.0'
__version__ = '1.9.2'
__author__ = 'RDMO Arbeitsgemeinschaft'
__email__ = 'rdmo-team@listserv.dfn.de'
__license__ = 'Apache-2.0'
Expand Down
32 changes: 32 additions & 0 deletions rdmo/core/management/commands/find_inactive_users.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import sys
import csv

from datetime import datetime

import pytz

from django.contrib.auth.models import User
from django.core.management.base import BaseCommand


class Command(BaseCommand):

columns = ('id', 'username', 'first_name', 'last_name', 'email', 'date_joined', 'last_login')

def add_arguments(self, parser):
parser.add_argument('since',
type=lambda s: pytz.utc.localize(datetime.strptime(s, '%Y-%m-%d')),
help='Date since the users have been inactive (format: "2022-12-31").')
parser.add_argument('-o|--output-file', dest='output_file', default=None,
help='Store the output in a csv file.')

def handle(self, *args, **options):
rows = User.objects.filter(last_login__lt=options['since']) \
.order_by('-last_login').values_list(*self.columns)

if rows:
fp = open(options['output_file'], 'w') if options['output_file'] else sys.stdout
csv_writer = csv.writer(fp)
csv_writer.writerow(self.columns)
csv_writer.writerows(rows)
fp.close()
11 changes: 7 additions & 4 deletions rdmo/core/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,8 @@
'projects': [
'projects-table',
'create-project',
'import-project'
'import-project',
'support-info'
],
'project': [
'project-questions',
Expand All @@ -222,11 +223,13 @@
'project-memberships',
'project-snapshots',
'export-project',
'import-project'
'import-project',
'support-info'
],
'issue_send': [
'issue-message',
'issue-attachments'
'issue-attachments',
'support-info'
]
}

Expand All @@ -247,7 +250,7 @@
EXPORT_REFERENCE_DOCX = None

EXPORT_PANDOC_ARGS = {
'pdf': ['-V', 'geometry:margin=1in', '--pdf-engine=xelatex'],
'pdf': ['-V', 'geometry:a4paper, margin=1in', '--pdf-engine=xelatex'],
'rtf': ['--standalone']
}

Expand Down
1 change: 1 addition & 0 deletions rdmo/domain/serializers/v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ class Meta:
fields = (
'id',
'uri',
'uri_prefix',
'key',
'path',
'read_only'
Expand Down
Binary file modified rdmo/locale/de/LC_MESSAGES/django.mo
Binary file not shown.
96 changes: 48 additions & 48 deletions rdmo/locale/de/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ msgstr ""
"Project-Id-Version: RDMO\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-11-28 11:07+0100\n"
"PO-Revision-Date: 2022-11-28 11:11+0100\n"
"PO-Revision-Date: 2023-01-11 11:31+0100\n"
"Last-Translator: Jochen Klar <jklar@aip.de>\n"
"Language-Team: RDMO <rdmo-team@listserv.dfn.de>\n"
"Language: de\n"
Expand Down Expand Up @@ -322,11 +322,11 @@ msgstr "Bestätigen"
#: accounts/templates/account/email_confirm.html:29
#, python-format
msgid ""
"This e-mail confirmation link expired or is invalid. Please <a "
"href=\"%(email_url)s\">issue a new e-mail confirmation request</a>."
"This e-mail confirmation link expired or is invalid. Please <a href="
"\"%(email_url)s\">issue a new e-mail confirmation request</a>."
msgstr ""
"Dieser Bestätigungs-Link ist abgelaufen oder ungültig. Bitte <a "
"href=\"%(email_url)s\">fordern sie eine neue Betätigungs-E-Mail an</a>."
"Dieser Bestätigungs-Link ist abgelaufen oder ungültig. Bitte <a href="
"\"%(email_url)s\">fordern sie eine neue Betätigungs-E-Mail an</a>."

#: accounts/templates/account/login.html:6
#: accounts/templates/account/login_form.html:20
Expand All @@ -343,17 +343,17 @@ msgstr "Mit Shibboleth einloggen"
#: accounts/templates/account/login_form_account.html:7
#, python-format
msgid ""
"If you have not created an account yet, then please <a "
"href=\"%(signup_url)s\">sign up</a> first."
"If you have not created an account yet, then please <a href=\"%(signup_url)s"
"\">sign up</a> first."
msgstr ""
"Falls Sie noch kein Benutzerkonto haben, <a "
"href=\"%(signup_url)s\">registrieren</a> Sie sich bitte zunächst."
"Falls Sie noch kein Benutzerkonto haben, <a href=\"%(signup_url)s"
"\">registrieren</a> Sie sich bitte zunächst."

#: accounts/templates/account/login_form_account.html:14
#, python-format
msgid ""
"If you forgot your password and want to reset it, click <a "
"href=\"%(reset_url)s\">here</a>."
"If you forgot your password and want to reset it, click <a href="
"\"%(reset_url)s\">here</a>."
msgstr ""
"Falls Sie Ihr Passwort vergessen haben und es zurücksetzen wollen, klicken "
"Sie bitte <a href=\"%(reset_url)s\">hier</a>."
Expand Down Expand Up @@ -483,8 +483,8 @@ msgstr "Neues Benutzerkonto erstellen"
msgid ""
"Already have an account? Then please <a href=\"%(login_url)s\">sign in</a>."
msgstr ""
"Falls Sie schon eine Benutzerkonto haben können Sie sich <a "
"href=\"%(login_url)s\">hier</a> anmelden."
"Falls Sie schon eine Benutzerkonto haben können Sie sich <a href="
"\"%(login_url)s\">hier</a> anmelden."

#: accounts/templates/account/signup.html:34
#: accounts/templates/socialaccount/signup.html:33
Expand Down Expand Up @@ -592,8 +592,8 @@ msgid ""
"<strong>Note:</strong> you can still <a href=\"%(email_url)s\">change your e-"
"mail address</a>."
msgstr ""
"<strong>Hinweis:</strong> Sie können immer noch Ihre <a "
"href=\"%(email_url)s\">E-Mail Adresse ändern</a>."
"<strong>Hinweis:</strong> Sie können immer noch Ihre <a href=\"%(email_url)s"
"\">E-Mail Adresse ändern</a>."

#: accounts/templates/profile/profile_remove_closed.html:6
#: accounts/templates/profile/profile_remove_failed.html:6
Expand Down Expand Up @@ -660,8 +660,8 @@ msgid ""
"mail using the <a href=\"%(email_url)s\">e-mail form</a>."
msgstr ""
"Bitte aktualisieren Sie die in Ihrem Benutzerkonto gespeicherten "
"Informationen. Sie könne Ihr Password <a href=\"%(password_url)s\">hier</a> "
"ändern und ihre E-Mail Adressen <a href=\"%(email_url)s\">hier</a> verwalten."
"Informationen. Sie können Ihr Passwort <a href=\"%(password_url)s\">hier</a> "
"ändern und ihre E-Mail Adresse <a href=\"%(email_url)s\">hier</a> verwalten."

#: accounts/templates/profile/profile_update_form.html:33
msgid ""
Expand Down Expand Up @@ -719,12 +719,12 @@ msgstr "Anmeldung abgebrochen"
#, python-format
msgid ""
"You decided to cancel logging in to our site using one of your existing "
"accounts. If this was a mistake, please proceed to <a "
"href=\"%(login_url)s\">sign in</a>."
"accounts. If this was a mistake, please proceed to <a href=\"%(login_url)s"
"\">sign in</a>."
msgstr ""
"Sie haben sich entschieden, die Anmeldung mit einem externen Konto "
"abzubrechen. Falls dies versehentlich geschehen ist, könne Sie <a "
"href=\"%(login_url)s\">hier</a> fortsetzen."
"abzubrechen. Falls dies versehentlich geschehen ist, könne Sie <a href="
"\"%(login_url)s\">hier</a> fortsetzen."

#: accounts/templates/socialaccount/signup.html:9
#, python-format
Expand Down Expand Up @@ -1527,11 +1527,11 @@ msgstr "Es werden auch die folgenden Attribute entfernt:"
#: domain/templates/domain/domain_modal_show_attributes.html:15
#, python-format
msgid ""
"This attribute is used for <b>%(values_count)s values</b> in "
"<b>%(projects_count)s projects</b>."
"This attribute is used for <b>%(values_count)s values</b> in <b>"
"%(projects_count)s projects</b>."
msgstr ""
"Dieses Attribut wird für <b>%(values_count)s Werte</b> in "
"<b>%(projects_count)s Projekten</b> verwendet."
"Dieses Attribut wird für <b>%(values_count)s Werte</b> in <b>"
"%(projects_count)s Projekten</b> verwendet."

#: domain/templates/domain/domain_modal_delete_attributes.html:42
#: domain/templates/domain/domain_modal_show_attributes.html:18
Expand Down Expand Up @@ -1893,8 +1893,8 @@ msgstr ""
#: options/templates/options/options_modal_show_options.html:15
#, python-format
msgid ""
"This option is used for <b>%(values_count)s values</b> in "
"<b>%(projects_count)s projects</b>."
"This option is used for <b>%(values_count)s values</b> in <b>"
"%(projects_count)s projects</b>."
msgstr ""
"Diese Option wird für <b>%(values_count)s Werte</b> in <b>%(projects_count)s "
"Projekten</b> verwendet."
Expand Down Expand Up @@ -2837,11 +2837,11 @@ msgstr "Sehr geerte Damen und Herren,"
#: projects/templates/projects/issue_send_message.txt:3
#, python-format
msgid ""
"The following task was identified in the project \"%(project_title)s\" "
"<%(project_url)s>:"
"The following task was identified in the project \"%(project_title)s\" <"
"%(project_url)s>:"
msgstr ""
"Die folgende Aufgabe wurde im Projekt \"%(project_title)s\" "
"<%(project_url)s> identifiziert:"
"Die folgende Aufgabe wurde im Projekt \"%(project_title)s\" <"
"%(project_url)s> identifiziert:"

#: projects/templates/projects/issue_send_message.txt:13
#, python-format
Expand All @@ -2866,8 +2866,8 @@ msgid ""
"You are about to remove the user <strong>%(user)s</strong> from the project "
"<strong>%(title)s</strong>."
msgstr ""
"Sie sind dabei den User <strong>%(user)s</strong> aus dem Projekt "
"<strong>%(title)s</strong> zu entfernen."
"Sie sind dabei den User <strong>%(user)s</strong> aus dem Projekt <strong>"
"%(title)s</strong> zu entfernen."

#: projects/templates/projects/membership_form.html:9
#: projects/templates/projects/membership_form.html:11
Expand Down Expand Up @@ -3430,11 +3430,11 @@ msgstr ""

#: projects/templates/projects/project_questions_navigation_help.html:14
msgid ""
"Entries with <i class=\"fa fa-question-circle-o small\" aria-"
"hidden=\"true\"></i> might be skipped based on your input."
"Entries with <i class=\"fa fa-question-circle-o small\" aria-hidden=\"true"
"\"></i> might be skipped based on your input."
msgstr ""
"Einträge mit <i class=\"fa fa-question-circle-o small\" aria-"
"hidden=\"true\"></i> können aufgrund Ihrer Eingabe übersprungen werden."
"Einträge mit <i class=\"fa fa-question-circle-o small\" aria-hidden=\"true"
"\"></i> können aufgrund Ihrer Eingabe übersprungen werden."

#: projects/templates/projects/project_questions_overview.html:14
#: projects/templates/projects/site_projects.html:27
Expand All @@ -3459,9 +3459,9 @@ msgid ""
msgstr ""
"Warnung: In der Datenbank sind mehrere Antworten vorhanden. Dies kann "
"aufgrund eines technischen Problems in der Vergangenheit geschehen. Sie "
"können unerwünschte Antworten über das Feld \"Eintrag entfernen\" (<i "
"class=\"fa fa-times\"></i>) entfernen. Bitte kontaktieren Sie den Support, "
"wenn das Problem weiterhin besteht."
"können unerwünschte Antworten über das Feld \"Eintrag entfernen\" (<i class="
"\"fa fa-times\"></i>) entfernen. Bitte kontaktieren Sie den Support, wenn "
"das Problem weiterhin besteht."

#: projects/templates/projects/project_questions_questionset_head.html:34
#, python-format
Expand Down Expand Up @@ -4306,8 +4306,8 @@ msgstr "Optional"
#: questions/templates/questions/catalogs_modal_delete_catalogs.html:17
#, python-format
msgid ""
"You are about to permanently delete the catalog <code class=\"text-"
"primary\">%(object)s</code>."
"You are about to permanently delete the catalog <code class=\"text-primary\">"
"%(object)s</code>."
msgstr ""
"Sie sind dabei den Katalog <code class=\"text-primary\">%(object)s</code> "
"permanent zu entfernen."
Expand All @@ -4331,8 +4331,8 @@ msgstr ""
#: questions/templates/questions/catalogs_modal_delete_questions.html:17
#, python-format
msgid ""
"You are about to permanently delete the question <code class=\"text-"
"primary\">%(object)s</code>."
"You are about to permanently delete the question <code class=\"text-primary"
"\">%(object)s</code>."
msgstr ""
"Sie sind dabei die Frage <code class=\"text-primary\">%(object)s</code> "
"permanent zu entfernen."
Expand All @@ -4349,8 +4349,8 @@ msgstr ""
#: questions/templates/questions/catalogs_modal_delete_sections.html:17
#, python-format
msgid ""
"You are about to permanently delete the section <code class=\"text-"
"primary\">%(object)s</code>."
"You are about to permanently delete the section <code class=\"text-primary\">"
"%(object)s</code>."
msgstr ""
"Sie sind dabei den Abschnitt <code class=\"text-primary\">%(object)s</code> "
"permanent zu entfernen."
Expand Down Expand Up @@ -5286,8 +5286,8 @@ msgstr ""
#~ "You are about to permanently delete the subsection <code class=\"text-"
#~ "primary\">%(object)s</code>."
#~ msgstr ""
#~ "Sie sind dabei den Unterabschnitt <code class=\"text-"
#~ "primary\">%(object)s</code> permanent zu entfernen."
#~ "Sie sind dabei den Unterabschnitt <code class=\"text-primary\">"
#~ "%(object)s</code> permanent zu entfernen."

#~ msgid "Update subsection"
#~ msgstr "Unterabschnitt bearbeiten"
Expand Down
6 changes: 6 additions & 0 deletions rdmo/overlays/static/overlays/js/overlays.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ function initOverlays(url_name) {
'content': $(overlayId).html(),
})

// if overlay element does not exist, proceed with next overlay
if (!$(elementId).length) {
fetchResponse('next');
return;
}

// show popover
$(elementId).popover(opts).popover('show');

Expand Down
19 changes: 0 additions & 19 deletions rdmo/overlays/utils.py

This file was deleted.

Loading

0 comments on commit 3269771

Please sign in to comment.