Skip to content

Commit

Permalink
release commit - apps/moderationtasks: remove moderator tasks from da…
Browse files Browse the repository at this point in the history
…shboard, detail view and form
  • Loading branch information
fuzzylogic2000 committed Dec 13, 2022
1 parent 851f45c commit 3e3beb6
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 68 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,6 @@ <h1>{% translate 'Moderate proposal' %}</h1>
{% include 'meinberlin_contrib/includes/form_field.html' with field=forms.moderateable.moderator_feedback %}
{% include 'meinberlin_contrib/includes/form_field.html' with field=forms.statement.statement %}
{% 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="u-spacer-bottom">
<input type="submit" class="btn btn--primary" value="{% translate 'Save' %}" />
Expand Down
2 changes: 0 additions & 2 deletions meinberlin/apps/budgeting/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from adhocracy4.labels import filters as label_filters
from adhocracy4.projects.mixins import DisplayProjectOrModuleMixin
from meinberlin.apps.ideas import views as idea_views
from meinberlin.apps.moderatorremark.forms import ModeratorRemarkForm
from meinberlin.apps.projects.views import ArchivedWidget
from meinberlin.apps.votes.forms import TokenForm
from meinberlin.apps.votes.models import VotingToken
Expand Down Expand Up @@ -138,7 +137,6 @@ class ProposalModerateView(idea_views.AbstractIdeaModerateView):
permission_required = 'meinberlin_budgeting.moderate_proposal'
template_name = 'meinberlin_budgeting/proposal_moderate_form.html'
moderateable_form_class = forms.ProposalModerateForm
remark_form_class = ModeratorRemarkForm


class ProposalDashboardExportView(DashboardExportView):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ <h1 class="item-detail__title">{{ object.name }}</h1>


<div class="lr-bar__right">
{% if is_moderator and not module.blueprint_type in 'PB3,PB2,PB' %}
{% if is_moderator %}
{% popover_remark object %}
{% endif %}

Expand Down Expand Up @@ -125,64 +125,6 @@ <h2 class="moderator-statement__title">{% translate 'Official Statement' %}</h2>

{% block vote_button %}{% endblock %}

{% block moderation_info %}
{% if is_moderator and module.blueprint_type in 'PB3,PB2,PB' %}
<div class="offset-lg-3 col-lg-6">
<div class="moderation-info__accordion">
<details class="accordion" open>
<summary class="moderation-info__accordion-title">
<h2 class="moderation-info__title">{% translate 'Moderation' %}</h2>
<i class="fa fa-chevron-down" aria-hidden="true"></i>
</summary>
{% if object.module.moderationtask_set or object.remark.remark %}
<div class="moderation-info__accordion-body">
<h3 class="moderation-info__section">{% translate 'Moderation tasks' %}</h3>
{% if object.module.moderationtask_set.count > 0 %}
<ul class="u-list-reset">
{% for task in object.module.moderationtask_set.all %}
<li class="moderation-info__list-item">
{% if task in object.completed_tasks.all %}
<i class="fas fa-circle-check u-success" aria-role="img" aria-label="{% translate 'Done' %}"></i>
{% else %}
<i class="far fa-circle u-muted" aria-role="img" aria-label="{% translate 'Open' %}"></i>
{% endif %}
{{ task.name }}
</li>
{% endfor %}
</ul>
{% else %}
<p class="u-muted">
{% translate 'If you want to add moderation tasks here, you can do so in the module settings.' %}
</p>
{% endif %}
<h3 class="moderation-info__section">{% translate 'Remark' %}</h3>
{% if object.remark.remark %}
<p>
{{ object.remark.remark }}
</p>
{% else %}
<p class="u-muted">
{% translate 'No moderation remark has been filled yet.' %}
</p>
{% endif %}
</div>
{% endif %}
</details>
{% get_item_url object 'moderate' False as moderate_url %}
{% if moderate_url %}
<a
href="{{ moderate_url }}"
class="btn btn--light btn--small moderation-info__btn"
data-embed-target="external">
<i class="fas fa-pencil" aria-hidden="true"></i>
{% translate 'Edit' %}
</a>
{% endif %}
</div>
</div>
{% endif %}
{% endblock %}

<section class="offset-lg-3 col-lg-6">
{% react_comments_async object %}
</section>
Expand Down
2 changes: 1 addition & 1 deletion meinberlin/apps/moderationtasks/dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class ModerationTasksComponent(ModuleFormSetComponent):
'meinberlin_moderationtasks/moderation_tasks_form.html'

def is_effective(self, module):
return module.blueprint_type in ['PB', 'PB2', 'PB3']
return False


components.register_module(ModerationTasksComponent())

0 comments on commit 3e3beb6

Please sign in to comment.