Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
radiopanik
panikweb
Commits
1a49ee11
Commit
1a49ee11
authored
Sep 02, 2013
by
Simon Daron
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Categories for Listen
parent
33127b60
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
1 deletion
+30
-1
panikweb/paniktags/templatetags/paniktags.py
panikweb/paniktags/templatetags/paniktags.py
+1
-0
panikweb/views.py
panikweb/views.py
+1
-0
panikweb_templates/templates/listen.html
panikweb_templates/templates/listen.html
+16
-1
panikweb_templates/templates/news/nav.html
panikweb_templates/templates/news/nav.html
+12
-0
No files found.
panikweb/paniktags/templatetags/paniktags.py
View file @
1a49ee11
...
...
@@ -122,6 +122,7 @@ def news_inline(content=None, klass=None, logo=None):
@
register
.
inclusion_tag
(
'news/roll.html'
,
takes_context
=
True
)
def
newsroll
(
context
,
nbr
=
None
):
return
{
'categories'
:
context
.
get
(
'categories'
),
'news'
:
context
.
get
(
'news'
),
'focus'
:
context
.
get
(
'focus'
),
'nbr'
:
nbr
,
...
...
panikweb/views.py
View file @
1a49ee11
...
...
@@ -447,6 +447,7 @@ class Listen(TemplateView):
# lookups
for
episode
in
context
[
'episodes'
]:
episode
.
main_sound
=
soundfiles
.
get
(
episode
.
id
)
context
[
'categories'
]
=
Category
.
objects
.
all
()
return
context
...
...
panikweb_templates/templates/listen.html
View file @
1a49ee11
{% extends "base.html" %}
{% load paniktags %}
{% block nav %}
<div
class=
"wrapper"
>
{% if categories %}
<nav
id=
"gridNav"
class=
"checkable"
>
<ul
class=
"by{{ categories.count }}"
>
<li><button
class=
"check icon-check"
data-about=
"#Main"
data-toggle=
".nocat"
>
?
</button></li>
{% for category in categories %}
<li><button
class=
"check icon-check"
data-about=
"#Main"
data-toggle=
".{{ category|slugify }}"
>
{{ category }}
</button></li>
{% endfor %}
</ul>
</nav>
{% endif %}
</div>
{% endblock %}
{% block main %}
<div
class=
"padded"
>
<ul
class=
"custom columns list"
>
{% for episode in episodes %}
<li
class=
"item"
>
<li
class=
"item
{% if episode.emission.categories.all.count = 0 %}nocat{% endif %} {% for category in episode.emission.categories.all %} {{ category|slugify }}{% endfor %}
"
>
{% episode_resume model="inline" klass="standalone"%}
</li>
{% endfor %}
...
...
panikweb_templates/templates/news/nav.html
View file @
1a49ee11
{% load paniktags %}
{% newsroll %}
<div
class=
"wrapper"
>
{% if categories %}
<nav
id=
"gridNav"
class=
"checkable"
>
<ul
class=
"by{{ categories.count }}"
>
{% for category in categories %}
<li><button
class=
"check icon-check"
data-about=
"#Main"
data-toggle=
".{{ category|slugify }}"
>
{{ category }}
</button></li>
{% endfor %}
</ul>
</nav>
{% endif %}
</div>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment