f8048da76c
* agenda_item.get_absolute_url('projector') returns the activate-url of the related slide. * agenda_item.is_activate() returns True, if the related item is active * Fixed set_active_slide to accept kwargs * Reset countdown when saving a new duration time * Update countdown overlay when begin_speak and end_speak is called * Fixed blinking countdown Fixes: #1078, #1076, #1075
31 lines
744 B
Python
31 lines
744 B
Python
# -*- coding: utf-8 -*-
|
|
|
|
from django.db import models
|
|
|
|
from openslides.projector.models import SlideMixin
|
|
|
|
|
|
class RelatedItem(SlideMixin, models.Model):
|
|
slide_callback_name = 'test_related_item'
|
|
name = models.CharField(max_length='255')
|
|
|
|
class Meta:
|
|
verbose_name = 'Related Item CHFNGEJ5634DJ34F'
|
|
|
|
def get_agenda_title(self):
|
|
return self.name
|
|
|
|
def get_agenda_title_supplement(self):
|
|
return 'test item'
|
|
|
|
def get_absolute_url(self, link=None):
|
|
if link is None:
|
|
value = '/absolute-url-here/'
|
|
else:
|
|
value = super(RelatedItem, self).get_absolute_url(link)
|
|
return value
|
|
|
|
|
|
class BadRelatedItem(models.Model):
|
|
name = models.CharField(max_length='255')
|