Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
radiopanik
panikweb
Commits
d2b77130
Commit
d2b77130
authored
Aug 23, 2013
by
Simon Daron
Browse files
Add view for emissions
parent
bfb9698f
Changes
5
Hide whitespace changes
Inline
Side-by-side
panikweb/urls.py
View file @
d2b77130
...
...
@@ -12,6 +12,7 @@ urlpatterns = patterns('',
url
(
r
'^onair.json$'
,
'panikweb.views.onair'
,
name
=
'onair'
),
url
(
r
'^program$'
,
'panikweb.views.program'
,
name
=
'program'
),
url
(
r
'^grid$'
,
'panikweb.views.grid'
,
name
=
'grid'
),
url
(
r
'^emissions/$'
,
'panikweb.views.emissions'
,
name
=
'emissions'
),
url
(
r
'^emissions/'
,
include
(
'emissions.urls'
)),
url
(
r
'^ckeditor/'
,
include
(
'ckeditor.urls'
)),
url
(
r
'^get$'
,
'panikweb.views.get'
,
name
=
'get'
),
...
...
panikweb/views.py
View file @
d2b77130
...
...
@@ -182,6 +182,16 @@ class News(TemplateView):
news
=
News
.
as_view
()
class
Emissions
(
TemplateView
):
template_name
=
'emissions.html'
def
get_context_data
(
self
,
**
kwargs
):
context
=
super
(
Emissions
,
self
).
get_context_data
(
**
kwargs
)
context
[
'emissions'
]
=
Emission
.
objects
.
all
().
order_by
(
'title'
)
return
context
emissions
=
Emissions
.
as_view
()
class
Get
(
TemplateView
):
template_name
=
'get.html'
...
...
@@ -220,7 +230,8 @@ def onair(request):
if
d
.
get
(
'emission'
):
d
[
'emission'
]
=
{
'title'
:
d
[
'emission'
].
title
,
'url'
:
d
[
'emission'
].
get_absolute_url
()
'url'
:
d
[
'emission'
].
get_absolute_url
(),
'schedules'
:
list
(
d
[
'emission'
].
get_schedules
())
}
return
d
...
...
panikweb_templates/static/css/specifics.css
View file @
d2b77130
...
...
@@ -41,7 +41,7 @@
border-color
:
#fff
;
color
:
white
!important
;
}
#player
.simple
*,
#Player
a
{
#player
.simple
*,
#Player
a
,
#Player
button
{
color
:
white
!important
;
}
#player
.simple
.playlist
{
...
...
panikweb_templates/templates/includes/audio.html
View file @
d2b77130
{% if src %}
<span
class=
"controls small"
>
<button
class=
"icon-play"
></button>
<a
class=
"icon-download"
href=
"{{ src.url }}"
></a>
</span>
<audio
id=
"Audio-{{ id }}"
{%
if
preload
%}
preload=
"{{ preload }}"
{%
endif
%}
class=
"
hidden
{{ class }}"
class=
"{{ class }}"
src=
"{{ src }}"
{%
if
controls
%}
controls=
"{{ controls }}"
{%
endif
%}
></audio>
{% else %}
<div
class=
"icon-ban-circle "
>
No Sound URL given
</div>
{% endif%}
panikweb_templates/templates/listen.html
View file @
d2b77130
...
...
@@ -5,9 +5,9 @@
<ul
class=
"small custom list columns padded"
>
{% for sound in sounds %}
<li
class=
"item ellipsis"
>
<a
href=
"{{ sound.url }}"
>
{{ sound.episode }}
</a>
{% include "includes/audio.html" with src=sound.file %}
{{ sound.episode }}
</li>
{% endfor %}
</ul>
...
...
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