Commit 50e4c65abaade0890def699ddc7514e9dd00c3f6

Authored by Macartur Sousa
1 parent 71357f92

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>
colab/plugins/utils/models.py
... ... @@ -3,6 +3,10 @@ from django.conf import settings
3 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 10 class Collaboration(models.Model):
7 11 '''
8 12 Class to define the fields of the collaboration block
... ...
colab/super_archives/templates/message-preview.html
... ... @@ -3,9 +3,9 @@
3 3 <li class="preview-message">
4 4 <span class="glyphicon glyphicon-{{ result.icon_name }}" title="{{ result.type }}"></span>
5 5  
6   -{% if result.tag %}
  6 +{% if result.tag_name %}
7 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 9 </a>
10 10 {% endif %}
11 11  
... ...