diff options
-rw-r--r-- | program/models.py | 3 | ||||
-rw-r--r-- | program/templates/styles.css | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/program/models.py b/program/models.py index 5ee4446..9e8fd06 100644 --- a/program/models.py +++ b/program/models.py @@ -15,6 +15,7 @@ class BroadcastFormat(models.Model): format = models.CharField(_("Format"), max_length=32) slug = models.SlugField(_("Slug"), max_length=32, unique=True) color = models.CharField(_("Color"), max_length=7, default='#ffffff') + text_color = models.CharField(_("Text color"), max_length=7, default='#000000') enabled = models.BooleanField(_("Enabled"), default=True) class Meta: @@ -23,7 +24,7 @@ class BroadcastFormat(models.Model): verbose_name_plural = _("Broadcast formats") def admin_color(self): - return u'<span style="background-color:%s; padding: 0.2em">%s</span>' % (self.color, self.color) + return u'<span style="background-color:%s; color: %s padding: 0.2em">%s/%s</span>' % (self.color, self.text_color, self.color, self.text_color) admin_color.short_description = _("Color") admin_color.allow_tags = True diff --git a/program/templates/styles.css b/program/templates/styles.css index 9448df2..2934a7f 100644 --- a/program/templates/styles.css +++ b/program/templates/styles.css @@ -1,5 +1,5 @@ {% for bf in broadcastformats %} -.bf-{{ bf.slug }} { background-color: {{ bf.color }}; } +.bf-{{ bf.slug }} { background-color: {{ bf.color }}; color: {{ bf.text_color }}; } {% endfor %} {% for mf in musicfocus %} |