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

Commit

Permalink
Add configurable "no items" message for events content listing plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
jmurty committed Feb 22, 2017
1 parent 62de2fb commit 820164a
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('ik_event_listing', '0002_auto_20170222_1136'),
]

operations = [
migrations.AddField(
model_name='eventcontentlistingitem',
name='no_items_message',
field=models.CharField(blank=True, help_text=b'Message to show if there are not items in listing.', null=True, max_length=255),
),
]
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
{% for event in instance.get_items %}
{% include "icekit_events/plugins/event_content_listing/_event.html" %}
{% empty %}
<li>There are no items to show on this page</li>
{{ instance.get_default_embed }}
<li>{{ instance.no_items_message|default:"There are no items to show" }}</li>
{% endfor %}
</div>

0 comments on commit 820164a

Please sign in to comment.