Commit 50e4c65abaade0890def699ddc7514e9dd00c3f6
1 parent
71357f92
Exists in
timestamp_plugins
and in
1 other branch
Added model Tag and update templates preview
Signed-off-by: Macartur Sousa <macartur.sc@gmail.com> Signed-off-by: Lucas Kanashiro <kanashiro.duarte@gmail.com>
Showing
2 changed files
with
6 additions
and
2 deletions
Show diff stats
colab/plugins/utils/models.py
@@ -3,6 +3,10 @@ from django.conf import settings | @@ -3,6 +3,10 @@ from django.conf import settings | ||
3 | from colab.accounts.models import User | 3 | from colab.accounts.models import User |
4 | 4 | ||
5 | 5 | ||
6 | +class Tag(models.Model): | ||
7 | + name = models.CharField(max_length=255) | ||
8 | + color = models.CharField(max_length=30) | ||
9 | + | ||
6 | class Collaboration(models.Model): | 10 | class Collaboration(models.Model): |
7 | ''' | 11 | ''' |
8 | Class to define the fields of the collaboration block | 12 | Class to define the fields of the collaboration block |
colab/super_archives/templates/message-preview.html
@@ -3,9 +3,9 @@ | @@ -3,9 +3,9 @@ | ||
3 | <li class="preview-message"> | 3 | <li class="preview-message"> |
4 | <span class="glyphicon glyphicon-{{ result.icon_name }}" title="{{ result.type }}"></span> | 4 | <span class="glyphicon glyphicon-{{ result.icon_name }}" title="{{ result.type }}"></span> |
5 | 5 | ||
6 | -{% if result.tag %} | 6 | +{% if result.tag_name %} |
7 | <a href="{% firstof result.mailinglist_url result.mailinglist.get_absolute_url result.url %}"> | 7 | <a href="{% firstof result.mailinglist_url result.mailinglist.get_absolute_url result.url %}"> |
8 | - <span class="label label-primary">{{ result.tag }}</span> | 8 | + <span class="label label-primary" style="background-color:{{result.tag_color}}" >{{ result.tag_name}}</span> |
9 | </a> | 9 | </a> |
10 | {% endif %} | 10 | {% endif %} |
11 | 11 |