Skip to content
Merged
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
Binary file modified adhocracy-plus/assets/images/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
38 changes: 1 addition & 37 deletions adhocracy-plus/assets/images/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion adhocracy-plus/config/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@
}

# Wagtail
WAGTAIL_SITE_NAME = "adhocracy+"
WAGTAIL_SITE_NAME = "ROOTS Beteiligung"
WAGTAILIMAGES_IMAGE_MODEL = "a4_candy_cms_images.CustomImage"
WAGTAILDOCS_MAX_FILE_SIZE = 20 * 1024 * 1024 # 20MB

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,17 @@
{% translate "Social Media" %}
</a>
</li>
<li class="dashboard-nav__page">
<a href="{% url 'a4dashboard:qr-create' organisation_slug=view.organisation.slug %}"
class="dashboard-nav__item dashboard-nav__item--interactive {% if request.resolver_match.url_name == 'qr-create' %}is-active{% endif %}">
{% translate "QR Codes erstellen" %}
</a>
</li>
</ul>
</div>
</nav>


<div class="col-md-9">
{% block communication_form %}{% endblock %}
{% block communication_form %}{% endblock communication_form %}
</div>
</div>
{% endblock %}
{% endblock dashboard_content %}
15 changes: 4 additions & 11 deletions adhocracy-plus/templates/email_base.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,9 @@
style="width: 100%; max-width: 600px; margin: auto;">
<tr>
<td style="padding: 0px; position: relative; top: -4.5em;" align="center">
{% if organisation and organisation.logo %}
<div style="width: 100px; height: 100px; box-shadow: 0 2px 18px 0 rgba(0, 0, 0, 0.08); background-color: #ffffff;">
<img src="cid:organisation_logo" height="80" width="80" alt="{{ organisation.name }} logo" style="margin: 10px;" />
</div>
{% else %}
<div style="width: 150px; height: 100px; box-shadow: 0 2px 18px 0 rgba(0, 0, 0, 0.08); background-color: #ffffff;">
<img src="cid:logo" height="80" alt="adhocracy-plus logo" style="margin: 10px;" />
</div>
{% endif %}
<div style="width: 150px; height: 100px; box-shadow: 0 2px 18px 0 rgba(0, 0, 0, 0.08); background-color: #ffffff;">
<img src="cid:logo" height="80" alt="ROOTS logo" style="margin: 10px;" />
</div>
</td>
</tr>
<tr>
Expand Down Expand Up @@ -90,8 +84,7 @@ <h3 style="color: #818181;">
<td style="color: #818181; font-size: small; padding-top: 20px; padding-left: 5px; padding-right: 5px;">
{% block reason %}{% endblock %}
<p>
{% blocktranslate with platformname=settings.a4_candy_cms_settings.OrganisationSettings.platform_name %}{{ platformname }} is a participation platform operated by{% endblocktranslate %}<br />
Liquid Democracy e.V., Am Sudhaus 2, D-12053 Berlin
ROOTS-Beteiligung ist eine Beteiligungsplattform für Non-Profit Organisationen, die im Rahmen des <a href="https://kmi-netzwerk.org/kmi-roots/">KMI/ROOTS</a> Projektes entstanden ist und von Liquid Democracy e.V. umgesetzt wird.
</p>
</td>
</tr>
Expand Down
2 changes: 1 addition & 1 deletion adhocracy-plus/templates/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<nav class="navi p-0">
<ul class="navi__list mb-2 d-sm-flex flex-wrap">
<li class="navi__item footer__link">
2020 Liquid Democracy
2025 Liquid Democracy
</li>
{% if pages.imprint %}
<li class="navi__item footer__link">
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Generated by Django 4.2.18 on 2025-05-21 13:35

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
("a4_candy_cms_settings", "0007_importantpages_registration"),
]

operations = [
migrations.AlterField(
model_name="organisationsettings",
name="platform_name",
field=models.CharField(
default="ROOTS Beteiligung",
help_text="This name appears in the footer of all pages and e-mails as well as in the tab of the browser.",
max_length=20,
verbose_name="Platform name",
),
),
]
2 changes: 1 addition & 1 deletion apps/cms/settings/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ class ImportantPages(BaseSiteSetting):
class OrganisationSettings(BaseSiteSetting):
platform_name = models.CharField(
max_length=20,
default="adhocracy+",
default="ROOTS Beteiligung",
verbose_name="Platform name",
help_text=(
"This name appears in the footer of all pages and e-mails "
Expand Down
5 changes: 5 additions & 0 deletions apps/dashboard/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@
organisation_views.DashboardCommunicationContentCreateView.as_view(),
name="communication-content-create",
),
path(
"communication/content/qr-codes-create/",
organisation_views.DashboardCommunicationQRCreateView.as_view(),
name="qr-create",
),
]

# a4 dashboard urls without organisation slug
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Generated by Django 4.2.18 on 2025-05-20 15:06

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
("a4_candy_learning_nuggets", "0004_alter_learningnuggetpage_content"),
]

operations = [
migrations.AlterField(
model_name="learningcategory",
name="permission_level",
field=models.CharField(
choices=[
("participant", "Teilnehmer"),
("initiator", "Initiator"),
("moderator", "Moderator"),
],
default="participant",
max_length=50,
),
),
]
10 changes: 5 additions & 5 deletions apps/learning_nuggets/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
from django.utils.text import slugify
from wagtail.admin.panels import FieldPanel
from wagtail.fields import StreamField
from wagtail.models import Orderable
from wagtail.models import Page
from wagtail.search import index
from wagtail.snippets.models import register_snippet
from wagtail.models import Orderable

from .blocks import LearningContentBlock

Expand All @@ -20,7 +20,7 @@ class LearningCategory(models.Model):
permission_level = models.CharField(
max_length=50,
choices=[
("participant", "Participant"),
("participant", "Teilnehmer"),
("initiator", "Initiator"),
("moderator", "Moderator"),
],
Expand Down Expand Up @@ -58,7 +58,7 @@ def save(self, update_fields=None, *args, **kwargs):
super().save(update_fields=update_fields, *args, **kwargs)

def ordered_nuggets(self):
return self.nuggets.all().order_by('order')
return self.nuggets.all().order_by("order")

def __str__(self):
return self.name
Expand Down Expand Up @@ -114,7 +114,7 @@ class LearningNuggetPage(Page, Orderable):
content_panels = Page.content_panels + [
FieldPanel("category"),
FieldPanel("content"),
FieldPanel('order'),
FieldPanel("order"),
]

parent_page_types = ["LearningCenterPage"]
Expand All @@ -131,4 +131,4 @@ def get_absolute_url(self):

class Meta:
verbose_name = "Learning Nugget Page"
ordering = ['order']
ordering = ["order"]
7 changes: 0 additions & 7 deletions apps/learning_nuggets/views.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from django.core.exceptions import PermissionDenied
from django.shortcuts import get_object_or_404
from django.views.generic import DetailView
from django.views.generic import ListView
Expand Down Expand Up @@ -90,10 +89,4 @@ def get_object(self):
LearningNuggetPage, slug=self.kwargs["nugget_slug"], category=category
)

permission_check = (
f"a4_candy_learning_nuggets.view_{category.permission_level}_content"
)
if not self.request.user.has_perm(permission_check):
raise PermissionDenied

return nugget
8 changes: 4 additions & 4 deletions apps/organisations/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"description_y": 902,
"img_min_width": 1080,
"img_min_height": 760,
"aplus_logo_width": 70,
"aplus_logo_width": 75,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@shn-liqd that file for logo update fyi, for another project here

"aplus_logo_height": 56,
"aplus_logo_y": 970,
"org_logo_y": 80,
Expand All @@ -61,7 +61,7 @@
"description_y": 1554,
"img_min_width": 1080,
"img_min_height": 1278,
"aplus_logo_width": 360,
"aplus_logo_width": 117,
"aplus_logo_height": 88,
"aplus_logo_y": 1654,
"org_logo_y": 1054,
Expand All @@ -76,7 +76,7 @@
"description_y": 588,
"img_min_width": 1104,
"img_min_height": 482,
"aplus_logo_width": 196,
"aplus_logo_width": 64,
"aplus_logo_height": 48,
"aplus_logo_y": 634,
"org_logo_y": 80,
Expand All @@ -91,7 +91,7 @@
"description_y": 548,
"img_min_width": 1200,
"img_min_height": 448,
"aplus_logo_width": 196,
"aplus_logo_width": 64,
"aplus_logo_height": 48,
"aplus_logo_y": 602,
"org_logo_y": 80,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{% extends "a4dashboard/communication_form_base.html" %}
{% load i18n %}

{% block title %}{% translate "Settings" %} — {{ block.super }}{% endblock title %}

{% block communication_form %}
<div class="col-md-9">
<h1 class="u-first-heading">{% translate "QR Codes erstellen" %}</h1>

<div class="qr-code-info mb-4">
<p class="mb-2">
{% translate "Mit QR-Codes könnt ihr einfach und direkt auf eure Beteiligungsprojekte verlinken – z. B. auf Plakaten oder Flyern." %}
</p>
<p class="mb-2">
{% translate "Über dieses externe Tool der TU Chemnitz könnt ihr QR-Codes kostenlos erstellen:" %}
<br/>
<a href="https://www.tu-chemnitz.de/urz/apps/qrcode/" target="_blank">
{% translate "QR-Code-Generator öffnen" %}
</a>
</p>
<p>
{% translate "Einfach Projekt-Link einfügen, Code erzeugen und für eure Öffentlichkeitsarbeit nutzen!" %}
</p>
</div>

</div>
{% endblock communication_form %}
12 changes: 12 additions & 0 deletions apps/organisations/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,18 @@ def get_success_url(self):
return self.request.path


class DashboardCommunicationQRCreateView(
a4dashboard_mixins.DashboardBaseMixin, generic.TemplateView
):

template_name = "a4_candy_organisations/communication_qr_create.html"
permission_required = "a4_candy_organisations.change_organisation"

def get_permission_object(self):
"""Required by DashboardBaseMixin (rules_mixins.PermissionRequiredMixin)."""
return self.organisation # Or another object for permission checks


class DashboardCommunicationProjectChoiceView(
a4dashboard_mixins.DashboardBaseMixin, generic.FormView
):
Expand Down
5 changes: 3 additions & 2 deletions tests/account/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,9 @@ def test_account_deletion(client, user):
assert User.objects.count() == 0
assert not User.objects.filter(pk=user.pk).exists()
assert len(mail.outbox) == 1
assert mail.outbox[0].subject == (
"Confirmation: Deletion of Your Account on " "adhocracy+"
assert (
mail.outbox[0].subject
== "Confirmation: Deletion of Your Account on ROOTS Beteiligung"
)
# assert that user is redirected to homepage
assert redirect_target(response) == "wagtail_serve"
Expand Down