Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
radiopanik
panikdb
Commits
543eb6d5
Commit
543eb6d5
authored
Nov 20, 2013
by
fred
Browse files
add a column to (un)set focus on a sound directly from episode view
parent
f9f23dbe
Changes
1
Hide whitespace changes
Inline
Side-by-side
panikdb/templates/emissions/episode_detail.html
0 → 100644
View file @
543eb6d5
{% extends "base.html" %}
{% load soundfiles panikdbtags %}
{% block appbar %}
<h2>
{{ episode.emission.title }} — {{ episode.title }}
</h2>
<span><a
href=
"../"
>
Retourner à l'émission
</a></span>
{% endblock %}
{% block content %}
{% if can_manage %}
<p>
<a
class=
"big-friendly-button"
href=
"edit/"
>
Modifier
</a>
<a
class=
"big-friendly-button"
id=
"add-diffusion-link"
href=
"#"
>
Ajouter une diffusion
</a>
<a
class=
"big-friendly-button"
id=
"add-soundfile-link"
href=
"#"
>
Ajouter un son
</a>
<a
class=
"big-friendly-button actually-not-that-friendly"
href=
"delete/"
>
Supprimer
</a>
</p>
{% endif %}
{% if episode.subtitle %}
<div
class=
"description"
>
{{ episode.subtitle|safe }}
</div>
{% endif %}
{% if episode.image %}
<div
class=
"image"
>
<img
src=
"{{ episode.image.url }}"
/>
</div>
{% endif %}
{% if episode.text %}
<div
class=
"text"
>
{{ episode.text|safe }}
</div>
{% endif %}
{% if episode.tags.all %}
<p>
Tags :
{% for tag in episode.tags.all %}
<span
class=
"tag"
>
{{ tag }}
</span>
{% if not forloop.last %}, {% endif %}
{% endfor %}
</p>
{% endif %}
<h3>
Diffusions
</h3>
<ul>
{% for diffusion in diffusions %}
<li>
{{ diffusion.datetime }}
{% if can_manage %}
<a
href=
"diffusion/{{ diffusion.id }}/remove"
class=
"icon-remove-sign"
title=
"Retirer"
></a>
{% endif %}
</li>
{% endfor %}
</ul>
<form
id=
"add-diffusion-form"
action=
"add-diffusion"
method=
"POST"
style=
"display: none;"
>
{% csrf_token %}
{{ add_diffusion_form.as_p }}
<input
type=
"submit"
value=
"Ajouter cet horaire"
/>
<button
class=
"cancel"
>
Annuler
</button>
</form>
<h3>
Sons
</h3>
<table
id=
"soundfiles"
>
<thead>
<tr>
<th>
Fichier
</th>
<th>
Titre
</th>
<th>
Format
</th>
<th>
Podcastable?
</th>
<th>
Fragment?
</th>
{% if can_manage %}
<th>
Modifier
</th>
{% endif %}
{% if can_manage %}
<th>
Supprimer
</th>
{% endif %}
{% if perms.emissions.add_focus %}
<th>
Focus
</th>
{% endif %}
</thead>
<tbody>
{% for soundfile in soundfiles %}
<tr>
<td><a
href=
"{{ soundfile.file.url }}"
>
{{ soundfile|sound_filename }}
</a></td>
<td>
{{ soundfile.title }}
</td>
<td>
{{ soundfile.format }}
</td>
<td>
{{ soundfile.podcastable }}
</td>
<td>
{{ soundfile.fragment }}
</td>
{% if can_manage %}
<td><a
href=
"sounds/{{ soundfile.id }}/"
class=
"icon-edit"
title=
"Modifier"
></a></td>
{% endif %}
{% if can_manage %}
<td><a
href=
"sounds/{{ soundfile.id }}/remove"
class=
"icon-remove-sign"
title=
"Retirer"
></a></td>
{% endif %}
{% if perms.emissions.add_focus %}
<td>
{% if soundfile.has_focus %}
✓
<a
class=
"icon-pushpin"
href=
"{{ soundfile|unset_focus_url }}"
>
retirer
</a>
{% else %}
<a
class=
"icon-pushpin"
href=
"{{ soundfile|set_focus_url }}"
>
mettre
</a>
{% endif %}
</td>
{% endif %}
{% endfor %}
</tbody>
</table>
<form
id=
"add-soundfile-form"
action=
"add-soundfile"
method=
"POST"
style=
"display: none;"
>
{% csrf_token %}
{{ add_soundfile_form.as_p }}
<input
type=
"submit"
value=
"Ajouter ce son"
/>
<button
class=
"cancel"
>
Annuler
</button>
</form>
{% endblock %}
{% block page-end %}
<script>
$
(
function
()
{
$
(
'
#add-soundfile-link
'
).
click
(
function
()
{
$
(
'
#id_title
'
).
parent
().
hide
();
$
(
'
#add-soundfile-form
'
).
dialog
({
modal
:
true
,
title
:
'
Son
'
,
width
:
'
auto
'
});
});
$
(
'
#add-diffusion-link
'
).
click
(
function
()
{
$
(
'
#add-diffusion-form
'
).
dialog
({
modal
:
true
,
title
:
'
Horaire
'
,
width
:
'
auto
'
});
});
$
(
'
.image img
'
).
click
(
function
()
{
$
(
this
).
toggleClass
(
'
large
'
);
});
$
(
'
#id_fragment
'
).
change
(
function
()
{
if
(
this
.
checked
)
{
$
(
'
#id_title
'
).
parent
().
show
();
}
else
{
$
(
'
#id_title
'
).
parent
().
hide
();
}
});
$
(
'
button.cancel
'
).
click
(
function
()
{
$
(
this
).
parent
().
dialog
(
'
close
'
);
return
false
;
});
});
</script>
{% endblock %}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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