diff options
author | Ernesto Rico-Schmidt <e.rico.schmidt@gmail.com> | 2014-02-28 19:49:24 (GMT) |
---|---|---|
committer | Ernesto Rico-Schmidt <e.rico.schmidt@gmail.com> | 2014-02-28 19:49:24 (GMT) |
commit | 6b6050bc2e48d29778e3c256303ae41003760c74 (patch) | |
tree | 787b22197b48d515e671fbf51741b627f8476aa0 /program | |
parent | 933050279fa7d79bddf43f071557b067263c2f73 (diff) |
added color to broadcast formats
Diffstat (limited to 'program')
-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 %} |