add eventtype icons to event list and event detail views in program

This commit is contained in:
Thomas Steen Rasmussen 2018-06-03 17:16:35 +02:00
parent 64f4eebac3
commit 3fb2f44e94
3 changed files with 5 additions and 5 deletions

View file

@ -2,8 +2,8 @@ import uuid
import os
import icalendar
import logging
from datetime import timedelta
from django.contrib.postgres.fields import DateTimeRangeField, ArrayField
from django.contrib import messages
from django.db import models

View file

@ -20,9 +20,9 @@
{% for event in event_list %}
{% if event.event_type.include_in_event_list %}
<tr>
<td style="background-color: {{ event.event_type.color }}; ">
<a href="{% url 'program:schedule_index' camp_slug=camp.slug %}?type={{ event.event_type.slug }}" style="color: {% if event.event_type.light_text %}white{% else %}black{% endif %};">
{{ event.event_type.name }}
<td>
<a href="{% url 'program:schedule_index' camp_slug=camp.slug %}?type={{ event.event_type.slug }}">
<i class="fas fa-{{ event.event_type.icon }} fa-lg" style="color: {{ event.event_type.color }};"></i> <span style="font-size: larger">{{ event.event_type.name }}</span>
</a>
</td>
<td>

View file

@ -14,7 +14,7 @@
<div class="row">
<div class="panel panel-default">
<div class="panel-heading" ><span style="font-size: x-large"><span style="background-color: {{ event.event_type.color }}; border: 0; color: {% if event.event_type.light_text %}white{% else %}black{% endif %}; display: inline-block; padding: 5px;">{{ event.event_type.name }}</span> {{ event.title }}</span></div>
<div class="panel-heading" ><span style="font-size: x-large"><i class="fas fa-{{ event.event_type.icon }} fa-lg" style="color: {{ event.event_type.color }};"></i> {{ event.title }}</span></div>
<div class="panel-body">
<p>
{{ event.abstract|untrustedcommonmark }}