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

module-detail: fix layout ids #6252

Merged
merged 1 commit into from
Mar 10, 2025
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
136 changes: 66 additions & 70 deletions meinberlin/templates/a4modules/module_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,91 +3,87 @@

<!-- Extra blocks to ensure cookie banner for live stream -->
{% block extra_js %}
{{ block.super }}
<script type="text/javascript" src="{% static 'dsgvo_video_embed.js' %}"></script>
{{ block.super }}
<script type="text/javascript" src="{% static 'dsgvo_video_embed.js' %}"></script>
{% endblock extra_js %}

{% block title %}
{{ project.name }}
{{ block.super }}
{{ project.name }}
{{ block.super }}
{% endblock title %}

{% block extra_messages %}
{{ block.super }}
{{ block.super }}

{% if project.is_draft %}
{% include 'meinberlin_contrib/components/info-box.html' with info_message='This project has not yet been published.' %}
{% endif %}
{% if project.is_draft %}
{% include 'meinberlin_contrib/components/info-box.html' with info_message='This project has not yet been published.' %}
{% endif %}
{% endblock extra_messages %}

<!-- Breadcrumbs are only necessary for multimodule projects with simultaneously running modules since the project detail
template correctly displays breadcrumbs for other project -->
{% if module.is_in_module_cluster %}
{% block breadcrumbs %}
<div id="layout-grid__area--contentheader">
<div id="content-header">
<nav class="breadcrumb" aria-label="{% translate 'You are here:' %}">
<ol>
<li>
<a href="{% url 'meinberlin_plans:plan-list' %}">{% translate 'Kiezradar' %}</a>
</li>
<li>
<a href="{% url 'project-detail' project.slug %}">{{ project.name|truncatechars:50 }}</a>
</li>
<li class="active" aria-current="page">{{ module.name|truncatechars:50 }}</li>
</ol>
</nav>
</div>
</div>
{% endblock breadcrumbs %}
{% block breadcrumbs %}
<div id="content-header">
<nav class="breadcrumb" aria-label="{% translate 'You are here:' %}">
<ol>
<li>
<a href="{% url 'meinberlin_plans:plan-list' %}">{% translate 'Kiezradar' %}</a>
</li>
<li>
<a href="{% url 'project-detail' project.slug %}">{{ project.name|truncatechars:50 }}</a>
</li>
<li class="active" aria-current="page">{{ module.name|truncatechars:50 }}</li>
</ol>
</nav>
</div>
{% endblock breadcrumbs %}
{% endif %}

{% block content %}
<div id="layout-grid__area--herounit">
<div class="modul-video">
<h1>
{{ module.name }}
{% for phase in module.phases %}
{% if phase == module.active_phase and live_stream %}
<span class="pill pill--live">{% translate 'Live' context 'video' %}</span>
{% endif %}
{% endfor %}
</h1>
<p>{{ module.description }}</p>
<div class="video-container">
{% if live_stream %}
<div class="ck-content">
{{ live_stream.live_stream | disable_iframes | richtext }}
</div>
{% endif %}
</div>
</div>

<section id="layout-grid__area--maincontent">
<div class="modul-servicepanel fullwidth panel--heavy phase-info">
<div class="servicepanel__main">
{% include "a4modules/includes/module_detail_phase.html" %}
<div id="layout-grid__area--maincontent">
<div class="modul-video">
<h1>
{{ module.name }}
{% for phase in module.phases %}
{% if phase == module.active_phase and live_stream %}
<span class="pill pill--live">{% translate 'Live' context 'video' %}</span>
{% endif %}
{% endfor %}
</h1>
<p>{{ module.description }}</p>
<div class="video-container">
{% if live_stream %}
<div class="ck-content">
{{ live_stream.live_stream | disable_iframes | richtext }}
</div>
{% endif %}
</div>
</div>
<div class="servicepanel__right phase-info__cta">
{% block project_action %}{% endblock project_action %}

<div class="modul-servicepanel fullwidth panel--heavy phase-info">
<div class="servicepanel__main">
{% include "a4modules/includes/module_detail_phase.html" %}
</div>
<div class="servicepanel__right phase-info__cta">
{% block project_action %}{% endblock project_action %}
</div>
</div>
</div>

{% block voting_token_field %}{% endblock voting_token_field %}
{% block phase_content %}{% endblock phase_content %}
{% if module.is_in_module_cluster %}
<section>
<h2>{% translate 'More from this online participation' %}</h2>
<ul class="list--clean flexgrid grid--3 grid--stretch">
{% get_sorted_modules as modules %}
{% for module in modules %}
<li>
{% include "meinberlin_projects/includes/project_module_tile.html" with project=project module=module %}
</li>
{% endfor %}
</ul>
</section>
{% endif %}
</section>
</div>{% endblock content %}
{% block voting_token_field %}{% endblock voting_token_field %}
{% block phase_content %}{% endblock phase_content %}
{% if module.is_in_module_cluster %}
<section>
<h2>{% translate 'More from this online participation' %}</h2>
<ul class="list--clean flexgrid grid--3 grid--stretch">
{% get_sorted_modules as modules %}
{% for module in modules %}
<li>
{% include "meinberlin_projects/includes/project_module_tile.html" with project=project module=module %}
</li>
{% endfor %}
</ul>
</section>
{% endif %}
</div>{% endblock content %}