Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion evap/evaluation/templates/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
<div class="collapse navbar-collapse justify-content-between">
<ul class="navbar-nav justify-content-start">
<li class="nav-item my-auto">
<a class="nav-link nav-link-multiline" href="{% url 'evaluation:legal_notice' %}">{% translate 'Legal Notice' %}<br />{% translate 'Data Privacy' %}</a>
<a class="nav-link nav-link-multiline" href="{% legal_link %}">
<span>{% translate 'Legal Notice' %}</span>
<span class="fas fa-arrow-up-right-from-square ps-1"></span>
</a>
</li>
<li class="d-none d-sm-block nav-item">
<a class="nav-link" href="https://github.com/e-valuation/EvaP/releases/tag/{% release_version %}" target="_blank">
Expand Down
12 changes: 0 additions & 12 deletions evap/evaluation/templates/legal_notice.html

This file was deleted.

5 changes: 5 additions & 0 deletions evap/evaluation/templatetags/footer_templatetags.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,8 @@
@register.simple_tag
def release_version():
return settings.RELEASE_VERSION


@register.simple_tag
def legal_link():
return settings.LEGAL_NOTICE_LINK
5 changes: 0 additions & 5 deletions evap/evaluation/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,6 @@ def test_default_startpage(self):
self.assertRedirects(self.app.get(reverse("evaluation:index"), user=responsible), reverse("contributor:index"))


class TestLegalNoticeView(WebTestWith200Check):
url = "/legal_notice"
test_users = [""]


class TestFAQView(WebTestWith200Check):
url = "/faq"
test_users = [""]
Expand Down
1 change: 0 additions & 1 deletion evap/evaluation/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
path("", views.index, name="index"),
path("faq", views.faq, name="faq"),
path("set_lang", views.set_lang, name="set_lang"),
path("legal_notice", views.LegalNoticeView.as_view(), name="legal_notice"),
path("contact", views.contact, name="contact"),
path("key/<int:key>", views.login_key_authentication, name="login_key_authentication"),
path("profile", views.profile_edit, name="profile_edit"),
Expand Down
7 changes: 0 additions & 7 deletions evap/evaluation/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
from django.utils.translation import gettext as _
from django.views.decorators.debug import sensitive_post_parameters
from django.views.decorators.http import require_POST
from django.views.generic import TemplateView
from django.views.i18n import set_language

from evap.evaluation.forms import LoginEmailForm, NewKeyForm, NotebookForm, ProfileForm
Expand Down Expand Up @@ -160,12 +159,6 @@ def faq(request):
return render(request, "faq.html", {"sections": FaqSection.objects.all()})


@no_login_required
class LegalNoticeView(TemplateView):
template_name = "legal_notice.html"
extra_context = {"LEGAL_NOTICE_TEXT": settings.LEGAL_NOTICE_TEXT}


@require_POST
def contact(request):
sent_anonymous = request.POST.get("anonymous") == "true"
Expand Down
2 changes: 1 addition & 1 deletion evap/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ class ManifestStaticFilesStorageWithJsReplacement(ManifestStaticFilesStorage):

CONTACT_EMAIL = "webmaster@localhost"
ALLOW_ANONYMOUS_FEEDBACK_MESSAGES = True
LEGAL_NOTICE_TEXT = "Objection! (this is a default setting that the administrators should change, please contact them)"
LEGAL_NOTICE_LINK = "http://example.com/legalnotice"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably doesn't matter much, but if we specify a protocol (do we have to?), I would just default to using https instead

Suggested change
LEGAL_NOTICE_LINK = "http://example.com/legalnotice"
LEGAL_NOTICE_LINK = "https://example.com/legalnotice"


# Config for mail system
DEFAULT_FROM_EMAIL = "webmaster@localhost"
Expand Down