Adding icons
This commit is contained in:
parent
9513a903a3
commit
c32cde780a
|
@ -472,6 +472,7 @@ class EventInstance(CampRelatedModel):
|
|||
'fg-color': '#fff' if self.event.event_type.light_text else '#000',
|
||||
'event_type': self.event.event_type.slug,
|
||||
'location': self.location.slug,
|
||||
'location_icon': self.location.icon,
|
||||
'timeslots': self.timeslots,
|
||||
}
|
||||
|
||||
|
|
|
@ -273,8 +273,15 @@ function render_event_instance(event_instance) {
|
|||
title_element = document.createElement('p');
|
||||
title_element.innerHTML = event_instance['title'];
|
||||
|
||||
icon_element = document.createElement('i');
|
||||
icon_element.classList.add('fa-' + event_instance['location_icon']);
|
||||
icon_element.classList.add('fa');
|
||||
icon_element.classList.add('pull-right');
|
||||
|
||||
element.appendChild(time_element);
|
||||
element.appendChild(icon_element);
|
||||
element.appendChild(title_element);
|
||||
|
||||
element.onclick = openModal
|
||||
|
||||
return element
|
||||
|
@ -475,4 +482,3 @@ function toggleFilterBoxes(types, locations) {
|
|||
return box;
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -54,10 +54,13 @@
|
|||
|
||||
<div class="btn-group">
|
||||
<label for="location-{{ location.slug }}" class="btn btn-default" style="min-width: 200px; text-align: left;">
|
||||
<i class="fa fa-minus"></i>
|
||||
<i class="fa fa-plus"></i>
|
||||
|
||||
{{ location.name }}
|
||||
<span class="pull-left">
|
||||
<i class="fa fa-minus"></i>
|
||||
<i class="fa fa-plus"></i>
|
||||
|
||||
{{ location.name }}
|
||||
</span>
|
||||
<i class="pull-right fa fa-{{ location.icon }}"></i>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -366,25 +366,25 @@ class Command(BaseCommand):
|
|||
speakers_tent = EventLocation.objects.create(
|
||||
name='Speakers Tent',
|
||||
slug='speakers-tent',
|
||||
icon='f075',
|
||||
icon='comment',
|
||||
camp=camp
|
||||
)
|
||||
workshop_room = EventLocation.objects.create(
|
||||
name='Workshop rooms',
|
||||
slug='workshop-rooms',
|
||||
icon='f0b1',
|
||||
icon='briefcase',
|
||||
camp=camp
|
||||
)
|
||||
bar_area = EventLocation.objects.create(
|
||||
name='Bar Area',
|
||||
slug='bar-area',
|
||||
icon='f000',
|
||||
icon='glass',
|
||||
camp=camp
|
||||
)
|
||||
food_area = EventLocation.objects.create(
|
||||
name='Food Area',
|
||||
slug='food-area',
|
||||
icon='f0f5',
|
||||
icon='cutlery',
|
||||
camp=camp
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in a new issue