Update after comments: Removed user context var. Removed condition in unupport state check.
This commit is contained in:
parent
ee0e599a6c
commit
5c70b4a044
|
@ -394,7 +394,6 @@ class Motion(SlideMixin, models.Model):
|
|||
not self.is_supporter(person)),
|
||||
|
||||
'unsupport': (self.state.allow_support and
|
||||
config['motion_min_supporters'] > 0 and
|
||||
not self.is_submitter(person) and
|
||||
self.is_supporter(person)),
|
||||
|
||||
|
|
|
@ -253,7 +253,7 @@
|
|||
{{ motion.version.creation_time }}
|
||||
|
||||
<!-- Widthdraw button -->
|
||||
{% if allowed_actions.wit and user in motion.submitters %}
|
||||
{% if allowed_actions.wit and user in motion.submitters %}
|
||||
<br><br>
|
||||
<a href="{% url 'motion_set_state' motion.id 'wit' %}" class="btn">
|
||||
<span class="icon revert">{% trans 'Withdraw motion' %}</span>
|
||||
|
|
|
@ -75,7 +75,6 @@ class MotionDetailView(GetVersionMixin, DetailView):
|
|||
context = super(MotionDetailView, self).get_context_data(**kwargs)
|
||||
context['allowed_actions'] = self.object.get_allowed_actions(self.request.user)
|
||||
context['min_supporters'] = int(config['motion_min_supporters'])
|
||||
context['user'] = self.request.user
|
||||
return context
|
||||
|
||||
motion_detail = MotionDetailView.as_view()
|
||||
|
|
Loading…
Reference in New Issue