Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Commit

Permalink
Merge branch 'develop' of https://github.com/ic-labs/icekit-events in…
Browse files Browse the repository at this point in the history
…to develop
  • Loading branch information
Greg Turner committed Mar 20, 2017
2 parents 507c937 + bcd9bc2 commit eee3075
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 26 deletions.
8 changes: 4 additions & 4 deletions icekit_events/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,9 @@ class EventTypeFilter(ChildModelFilter):
child_model_plugin_class = EventChildModelPlugin


class PrimaryTypeFilter(SimpleListFilter):
title = "primary type"
parameter_name = "primary_type"
class PrimaryCategoryFilter(SimpleListFilter):
title = "primary category"
parameter_name = "primary_category"

def lookups(self, request, model_admin):
"""
Expand Down Expand Up @@ -172,7 +172,7 @@ class EventAdmin(ChildModelPluginPolymorphicParentModelAdmin,
"""
base_model = models.EventBase
list_filter = (
EventTypeFilter, PrimaryTypeFilter, 'secondary_types', 'modified', 'show_in_calendar', 'is_drop_in', 'has_tickets_available',
EventTypeFilter, PrimaryCategoryFilter, 'secondary_types', 'modified', 'show_in_calendar', 'is_drop_in', 'has_tickets_available',
) + icekit_admin.ICEkitContentsAdmin.list_filter
list_display = (
'primary_type_swatch', 'publishing_object_title', 'child_type_name', 'modified',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,26 @@
{% block title %}{{ page.get_title }} {{ start|date }}{% endblock %}

{% block content %}
<h1>{{ page.get_title }}</h1>
<h2>{{ start|date }}</h2>

<ul>
{% for item in items_to_list %}
<li><a href="{{ item.get_absolute_url }}">
{{ item.event|safe }}: {{ item.time_range_string }}
</a></li>
{% empty %}
<li>There are no events happening today</li>
{% endfor %}
</ul>


{% with tomorrow=start.date|add_days:1 yesterday=start.date|add_days:-1 %}
<p><a href="?{% update_GET 'date' = yesterday %}">{{ yesterday }}</a></p>
<p><a href="?{% update_GET 'date' = tomorrow %}">{{ tomorrow }}</a></p>
{% endwith %}

<div class="events-datepicker" id="datepicker" data-period="{{ days }}" data-start="{{ start|date:'Y-m-d' }}"></div>

{% endblock %}
<div class="container">
<h1>{{ page.get_title }}</h1>
<h2>{{ start|date }}</h2>

<ul>
{% for item in items_to_list %}
<li><a href="{{ item.get_absolute_url }}">
{{ item.event|safe }}: {{ item.time_range_string }}
</a></li>
{% empty %}
<li>There are no events happening today</li>
{% endfor %}
</ul>


{% with tomorrow=start.date|add_days:1 yesterday=start.date|add_days:-1 %}
<p><a href="?{% update_GET 'date' = yesterday %}">{{ yesterday }}</a></p>
<p><a href="?{% update_GET 'date' = tomorrow %}">{{ tomorrow }}</a></p>
{% endwith %}

<div class="events-datepicker" id="datepicker" data-period="{{ days }}" data-start="{{ start|date:'Y-m-d' }}"></div>
</div>
{% endblock %}

0 comments on commit eee3075

Please sign in to comment.