From 6b6050bc2e48d29778e3c256303ae41003760c74 Mon Sep 17 00:00:00 2001 From: Ernesto Rico-Schmidt Date: Fri, 28 Feb 2014 20:49:24 +0100 Subject: added color to broadcast formats 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'%s' % (self.color, self.color) + return u'%s/%s' % (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 %} -- cgit v0.10.2