Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

apps/plans & apps/plans/templates: default text for participation explanation #4233

Merged
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 3.2.12 on 2022-03-03 12:30

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('meinberlin_plans', '0053_plan_participation_explanation'),
]

operations = [
migrations.AlterField(
model_name='plan',
name='participation_explanation',
field=models.TextField(help_text='Justify your selection. The justification appears below the description of the project.', max_length=4000, verbose_name='Participation explanation'),
),
]
1 change: 0 additions & 1 deletion meinberlin/apps/plans/models.py
Original file line number Diff line number Diff line change
@@ -156,7 +156,6 @@ class Plan(ProjectContactDetailMixin, UserGeneratedContentModel):
)
participation_explanation = models.TextField(
verbose_name=_('Participation explanation'),
default='Bitte Begründung einfügen',
max_length=4000,
help_text=_('Justify your selection. '
'The justification appears '
52 changes: 26 additions & 26 deletions meinberlin/apps/plans/templates/meinberlin_plans/plan_detail.html
Original file line number Diff line number Diff line change
@@ -116,37 +116,37 @@ <h1 class="item-detail__title u-break-word">
{% endif %}
</div>
</div>
{% if object.participation_explanation != "Bitte Begründung einfügen" %}
<div class="item-detail-2__info-box">
<h3 class="item-detail-2__info-box-headline">{% trans 'Level of participation' %}: {{ object.get_participation_display }}</h3>
{% if object.participation_explanation != "Bitte Begründung einfügen" %}
{% if object.participation_explanation|length > 300 %}
<div id="collapsibleExplanation" class="collapse show u-no-transition">
{{ object.participation_explanation|truncatechars:160 }}
</div>
<div id="collapsibleExplanation" class="collapse u-no-transition">
{{ object.participation_explanation }}
</div>
<button
class="btn--link collapsible"
type="button" data-bs-toggle="collapse"
data-bs-target="#collapsibleExplanation"
aria-expanded="false"
aria-controls="collapseReadLink"
>
<span class="link--more">
<span class="visually-hidden">{% trans 'toggle to' %}</span>
{% trans 'Read more' %}
</span>
<span class="link--less">
<span class="visually-hidden">{% trans 'toggle to' %}</span>
{% trans 'Read Less' %}
</span>
</button>
{% else %}
{% if object.participation_explanation|length > 300 %}
<div id="collapsibleExplanation" class="collapse show u-no-transition">
{{ object.participation_explanation|truncatechars:160 }}
</div>
<div id="collapsibleExplanation" class="collapse u-no-transition">
{{ object.participation_explanation }}
{% endif %}
</div>
<button
class="btn--link collapsible"
type="button" data-bs-toggle="collapse"
data-bs-target="#collapsibleExplanation"
aria-expanded="false"
aria-controls="collapseReadLink"
>
<span class="link--more">
<span class="visually-hidden">{% trans 'toggle to' %}</span>
{% trans 'Read more' %}
</span>
<span class="link--less">
<span class="visually-hidden">{% trans 'toggle to' %}</span>
{% trans 'Read Less' %}
</span>
</button>
{% else %}
{{ object.participation_explanation }}
{% endif %}
</div>
{% endif %}
{% if object.contact_name or object.contact_address_text or object.contact_email or object.contact_phone or object.contact_url or object.organisation.address or object.organisation.url %}
<div class="l-tiles-2 u-spacer-bottom">
{% if object.contact_name or object.contact_address_text or object.contact_email or object.contact_phone or object.contact_url %}