from emissions.models import Emission, Episode, NewsItem, SoundFile, Focus
from emissions.utils import period_program
+from panikombo.models import Topik
+
from panikweb import utils
from panikweb import search
@register.filter
def facet_tag(tag):
return tag.name
+
+
+@register.filter
+def image_file(page):
+ try:
+ matching_topik = Topik.objects.get(page=page)
+ return matching_topik.image
+ except Topik.DoesNotExist:
+ pass
+ return None
{% endif %}
<div class="text">{% placeholder "content" %}</div>
</div>
- <div id="fiber-nav" class="sub rightPart custom marged">
- {% block menu %}{% show_menu level=1 depth=2 %}{% endblock %}
+ <div class="sub rightPart custom marged">
+ <ul class="custom list">
+ {% for page in page.get_parents_and_self.0.get_children %}
+ {% if page.public and not page.exclude_from_navigation %}
+ {% if page.has_children %}
+ {% for subpage in page.get_children %}
+ {% include "combo/topik_menu_item.html" with page=subpage only %}
+ {% endfor %}
+ {% else %}
+ {% include "combo/topik_menu_item.html" with page=page only %}
+ {% endif %}
+ {% endif %}
+ {% endfor %}
+ </ul>
{% placeholder "sidebar" %}
</div>
</div>
--- /dev/null
+{% load combo paniktags thumbnail %}
+<li class="item">
+ <div class="topik inline cf">
+ <div class="logo">
+ {% with page|image_file as logo %}
+ {% if logo %}
+ {% thumbnail logo "60x60" crop="50% 25%" as im %}
+ <img width="60" height="60" src="{{im.url}}"/>
+ {% endthumbnail %}
+ {% else %}
+ <img src="/static/img/sound.png" width="60" height="60">
+ {% endif %}
+ {% endwith %}
+ </div>
+ <div class="content">
+ <div class="title">
+ <h5 class="title"><a href="{{page.get_online_url}}">{{page.title}}</a></h5>
+ </div>
+ <div class="smooth metas">
+ <span class="categories">{{page.title}}</span>
+ </div>
+ </div>
+ </div>
+</li>