work on sound list

This commit is contained in:
bkfox
2024-03-25 18:05:55 +01:00
parent f41cc3ce0c
commit 70a55607a5
17 changed files with 433 additions and 226 deletions

View File

@ -2,41 +2,15 @@
{% load static i18n humanize honeypot aircox %}
{% block page_form %}
<a-modal ref="sound-edit-modal" v-if="item" title="{% translate "Edit sound" %}">
<template #default="{item}">
{% for field in sound_form %}
{% if field.name in "episode,program" %}
<input type="hidden" name="{{ field.name }}" value="{{ field.value }}" />
{% else %}
<div class="field">
{% if field|is_checkbox %}
<label class="label">
<input type="text" name="{{ field.name }}" :value="item.{{ field.name }}">
{{ field.label }}
</label>
{% else %}
<label class="label">{{ field.label }}</label>
<div class="control">
<input type="text" name="{{ field.name }}" :value="item.{{ field.name }}">
</div>
{% endif %}
<p class="help">{{ field.help_text }}</p>
</div>
{% endif %}
{% endfor %}
</template>
</a-modal>
<a-episode :page="{title: &quot;{{ object.title }}&quot;, podcasts: {{ object.sounds|json }}}">
<template v-slot="{podcasts,page}">
{{ block.super }}
<hr/>
{% include "./widgets/tracklist_editor.html" with formset=tracklist_formset %}
{% include "./dashboard/tracklist_editor.html" with formset=tracklist_formset %}
<hr/>
<section class="container">
<h3 class="title">{% translate "Sound files" %}</h3>
{% include "./widgets/playlist_editor.html" with formset=playlist_formset %}
{% include "./dashboard/soundlist_editor.html" with formset=soundlist_formset %}
</section>
</template>
</a-episode>