-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
meinberlin_contrib/components: create moderator_form.html
- Loading branch information
Showing
6 changed files
with
100 additions
and
104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
### Changed | ||
|
||
- adapt forms on `proposal_moderate_form.html` to BO redesign | ||
- create reusable `moderator_form.html` snippet and update moderator form templates | ||
- add two new helper/utility classes `.mt-1` `.mb-2` | ||
- increase (overwrite) `.formgroup__help` font-size to 14px |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
meinberlin/apps/contrib/templates/meinberlin_contrib/components/moderator_form.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{% load i18n item_tags contrib_tags moderatorremark_tags %} | ||
|
||
<form enctype="multipart/form-data" action="{{ request.path }}" method="post"> | ||
{% csrf_token %} | ||
{% for form in forms.values %} | ||
{{ form.media }} | ||
{% endfor %} | ||
|
||
{% include 'meinberlin_contrib/includes/form_field_select.html' with field=forms.moderateable.moderator_status %} | ||
{% include 'meinberlin_contrib/includes/form_field.html' with field=forms.feedback_text.feedback_text %} | ||
{% include 'meinberlin_contrib/includes/form_checkbox_field.html' with field=forms.moderateable.is_archived %} | ||
{% if forms.moderateable.show_tasks %} | ||
{% include 'meinberlin_contrib/includes/form_field.html' with field=forms.moderateable.completed_tasks add_class='u-top-divider' %} | ||
{% include 'meinberlin_contrib/includes/form_field.html' with field=forms.remark.remark %} | ||
{% else %} | ||
{% include 'meinberlin_contrib/includes/form_field.html' with field=forms.remark.remark add_class='u-top-divider' %} | ||
{% endif %} | ||
|
||
<div class="form-actions"> | ||
<div class="form-actions__left"> | ||
<a href="{{ object.get_absolute_url }}" class="link--back">{% translate 'Cancel' %}</a> | ||
</div> | ||
<div class="form-actions__right"> | ||
<button type="submit" class="button">{% translate 'Save' %}</button> | ||
</div> | ||
</div> | ||
</form> |
56 changes: 29 additions & 27 deletions
56
meinberlin/apps/ideas/templates/meinberlin_ideas/idea_moderate_form.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,42 @@ | ||
{% extends "base.html" %} | ||
{% load i18n %} | ||
|
||
{% block title %}{{ object.name }} — {% translate 'Give feedback' %}{% endblock %} | ||
{% block title %} | ||
{{ object.name }} | ||
— | ||
{% translate 'Give feedback' %} | ||
{% endblock title %} | ||
|
||
{% block breadcrumbs %} | ||
<div id="content-header"> | ||
<nav class="breadcrumb" aria-label="{% translate 'You are here:' %}"> | ||
<ol> | ||
<li><a href="/">meinBerlin</a></li> | ||
<li><a href="{% url 'meinberlin_plans:plan-list' %}">{% translate 'Project Overview' %}</a></li> | ||
<li><a href="{% url 'project-detail' project.slug %}">{{ project.name|truncatechars:50 }}</a></li> | ||
{% if module.is_in_module_cluster %} | ||
<li><a href="{{ module.get_detail_url }}">{{ module.name|truncatechars:50 }}</a></li> | ||
<li> | ||
<a href="/">meinBerlin</a> | ||
</li> | ||
<li> | ||
<a href="{% url 'meinberlin_plans:plan-list' %}">{% translate 'Project Overview' %}</a> | ||
</li> | ||
<li> | ||
<a href="{% url 'project-detail' project.slug %}">{{ project.name|truncatechars:50 }}</a> | ||
</li> | ||
{% if module.is_in_module_cluster %} | ||
<li> | ||
<a href="{{ module.get_detail_url }}">{{ module.name|truncatechars:50 }}</a> | ||
</li> | ||
{% endif %} | ||
<li><a href="{{ object.get_absolute_url }}">{% translate 'Idea' %}</a></li> | ||
<li> | ||
<a href="{{ object.get_absolute_url }}">{% translate 'Idea' %}</a> | ||
</li> | ||
<li class="active" aria-current="page">{% translate 'Moderate idea' %}</li> | ||
</ol> | ||
</nav> | ||
</div> | ||
{% endblock %} | ||
{% block content %} | ||
<div id="layout-grid__area--maincontent"> | ||
<h1>{% translate 'Feedback on this idea' %}</h1> | ||
<form novalidate enctype="multipart/form-data" action="{{ request.path }}" method="post"> | ||
{% csrf_token %} | ||
{% for form in forms.values %} | ||
{{ form.media }} | ||
{% endfor %} | ||
|
||
{% include 'meinberlin_contrib/includes/form_field.html' with field=forms.moderateable.moderator_status %} | ||
{% include 'meinberlin_contrib/includes/form_field.html' with field=forms.feedback_text.feedback_text %} | ||
{% endblock breadcrumbs %} | ||
|
||
|
||
<div class="u-spacer-bottom"> | ||
<input type="submit" class="btn btn--primary" value="{% translate 'Save' %}" /> | ||
<a href="{{ object.get_absolute_url }}" class="btn btn--light">{% translate 'Cancel' %}</a> | ||
</div> | ||
</form> | ||
</div> | ||
{% endblock %} | ||
{% block content %} | ||
<div id="layout-grid__area--maincontent"> | ||
<h1>{% translate 'Feedback on this idea' %}</h1> | ||
{% include "meinberlin_contrib/components/moderator_form.html" %} | ||
</div> | ||
{% endblock content %} |
52 changes: 26 additions & 26 deletions
52
meinberlin/apps/kiezkasse/templates/meinberlin_kiezkasse/proposal_moderate_form.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,41 @@ | ||
{% extends "base.html" %} | ||
{% load i18n %} | ||
|
||
{% block title %}{% blocktranslate with name=object.name %}Moderate {{ name }}{% endblocktranslate %}{% endblock %} | ||
{% block title %} | ||
{% blocktranslate with name=object.name %} | ||
Moderate {{ name }} | ||
{% endblocktranslate %} | ||
{% endblock title %} | ||
|
||
{% 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 'Project Overview' %}</a></li> | ||
<li><a href="{% url 'project-detail' project.slug %}">{{ project.name|truncatechars:50 }}</a></li> | ||
{% if module.is_in_module_cluster %} | ||
<li><a href="{{ module.get_detail_url }}">{{ module.name|truncatechars:50 }}</a></li> | ||
<li> | ||
<a href="{% url 'meinberlin_plans:plan-list' %}">{% translate 'Project Overview' %}</a> | ||
</li> | ||
<li> | ||
<a href="{% url 'project-detail' project.slug %}">{{ project.name|truncatechars:50 }}</a> | ||
</li> | ||
{% if module.is_in_module_cluster %} | ||
<li> | ||
<a href="{{ module.get_detail_url }}">{{ module.name|truncatechars:50 }}</a> | ||
</li> | ||
{% endif %} | ||
<li><a href="{{ object.get_absolute_url }}">{% translate 'Idea' %}</a></li> | ||
<li> | ||
<a href="{{ object.get_absolute_url }}">{% translate 'Idea' %}</a> | ||
</li> | ||
<li class="active" aria-current="page">{% translate 'Moderate proposal' %}</li> | ||
</ol> | ||
</nav> | ||
</div> | ||
</div> | ||
{% endblock %} | ||
{% block content %} | ||
<div class="container"> | ||
<h1>{% translate 'Moderate proposal' %}</h1> | ||
<form enctype="multipart/form-data" action="{{ request.path }}" method="post"> | ||
{% csrf_token %} | ||
{% for form in forms.values %} | ||
{{ form.media }} | ||
{% endfor %} | ||
|
||
{% include 'meinberlin_contrib/includes/form_field.html' with field=forms.moderateable.moderator_status %} | ||
{% include 'meinberlin_contrib/includes/form_field.html' with field=forms.feedback_text.feedback_text %} | ||
|
||
{% endblock breadcrumbs %} | ||
|
||
<div class="u-spacer-bottom"> | ||
<input type="submit" class="btn btn--primary" value="{% translate 'Save' %}" /> | ||
<a href="{{ object.get_absolute_url }}" class="btn btn--light">{% translate 'Cancel' %}</a> | ||
</div> | ||
</form> | ||
</div> | ||
{% endblock %} | ||
{% block content %} | ||
<div class="container"> | ||
<h1>{% translate 'Moderate proposal' %}</h1> | ||
{% include "meinberlin_contrib/components/moderator_form.html" %} | ||
</div> | ||
{% endblock content %} |
38 changes: 15 additions & 23 deletions
38
meinberlin/apps/mapideas/templates/meinberlin_mapideas/mapidea_moderate_form.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,32 @@ | ||
{% extends "base.html" %} | ||
{% load i18n %} | ||
|
||
{% block title %}{% blocktranslate with name=object.name %}Moderate {{ name }}{% endblocktranslate %}{% endblock %} | ||
{% block title %} | ||
{% blocktranslate with name=object.name %} | ||
Moderate {{ name }} | ||
{% endblocktranslate %} | ||
{% endblock title %} | ||
|
||
{% block breadcrumbs %} | ||
<div id="content-header"> | ||
<nav class="breadcrumb" aria-label="{% translate 'You are here:' %}"> | ||
<ol> | ||
<li><a href="/">meinBerlin</a></li> | ||
<li><a href="{% url 'meinberlin_plans:plan-list' %}">{% translate 'Project Overview' %}</a></li> | ||
<li><a href="{% url 'project-detail' project.slug %}">{{ project.name|truncatechars:50 }}</a></li> | ||
{% if module.is_in_module_cluster %} | ||
<li><a href="{{ module.get_detail_url }}">{{ module.name|truncatechars:50 }}</a></li> | ||
{% if module.is_in_module_cluster %} | ||
<li><a href="{{ module.get_detail_url }}">{{ module.name|truncatechars:50 }}</a></li> | ||
{% endif %} | ||
<li><a href="{{ object.get_absolute_url }}">{% translate 'Idea' %}</a></li> | ||
<li class="active" aria-current="page">{% translate 'Moderate idea' %}</li> | ||
</ol> | ||
</nav> | ||
</div> | ||
{% endblock %} | ||
{% block content %} | ||
<div id="layout-grid__area--maincontent"> | ||
<h1>{% translate 'Moderate idea' %}</h1> | ||
<form novalidate enctype="multipart/form-data" action="{{ request.path }}" method="post"> | ||
{% csrf_token %} | ||
{% for form in forms.values %} | ||
{{ form.media }} | ||
{% endfor %} | ||
|
||
{% include 'meinberlin_contrib/includes/form_field.html' with field=forms.moderateable.moderator_status %} | ||
{% include 'meinberlin_contrib/includes/form_field.html' with field=forms.feedback_text.feedback_text %} | ||
{% endblock breadcrumbs %} | ||
|
||
|
||
<div class="u-spacer-bottom"> | ||
<input type="submit" class="btn btn--primary" value="{% translate 'Save' %}" /> | ||
<a href="{{ object.get_absolute_url }}" class="btn btn--light">{% translate 'Cancel' %}</a> | ||
</div> | ||
</form> | ||
</div> | ||
{% endblock %} | ||
{% block content %} | ||
<div id="layout-grid__area--maincontent"> | ||
<h1>{% translate 'Moderate idea' %}</h1> | ||
{% include "meinberlin_contrib/components/moderator_form.html" %} | ||
</div> | ||
{% endblock content %} |