work on playlist & tracklist
This commit is contained in:
@ -2,8 +2,29 @@
|
||||
{% load static i18n humanize honeypot aircox %}
|
||||
|
||||
{% block page_form %}
|
||||
<a-modal ref="sound-edit-modal" title="{% translate "Edit sound" %}">
|
||||
<template #default>
|
||||
<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>
|
||||
|
||||
@ -11,37 +32,11 @@
|
||||
<template v-slot="{podcasts,page}">
|
||||
{{ block.super }}
|
||||
<hr/>
|
||||
{% include "./widgets/tracklist_editor.html" with formset=playlist_formset %}
|
||||
{% include "./widgets/tracklist_editor.html" with formset=tracklist_formset %}
|
||||
<hr/>
|
||||
<section class="container">
|
||||
<h3 class="title">{% translate "Sound files" %}</h3>
|
||||
<a-playlist v-if="page" :set="podcasts"
|
||||
name="{{ page.title }}"
|
||||
list-class="menu-list" item-class="menu-item"
|
||||
:player="player" :actions="['play']"
|
||||
@select="player.playItems('queue', $event.item)">
|
||||
<template #after-title="{item}">
|
||||
<span class="flex-grow-1">
|
||||
[[ item.data.type_display ]]
|
||||
<span v-if="item.data.is_public">
|
||||
/
|
||||
{% translate "public" %}
|
||||
</span>
|
||||
<span v-if="item.data.is_downloadable">
|
||||
/
|
||||
{% translate "downloadable" %}
|
||||
</span>
|
||||
</span>
|
||||
</template>
|
||||
<template #actions="{item}">
|
||||
<button type="button" class="button"
|
||||
title="{% translate "Edit" %}">
|
||||
<span class="icon">
|
||||
<i class="fa fa-edit"></i>
|
||||
</span>
|
||||
</button>
|
||||
</template>
|
||||
</a-playlist>
|
||||
{% include "./widgets/playlist_editor.html" with formset=playlist_formset %}
|
||||
</section>
|
||||
</template>
|
||||
</a-episode>
|
||||
|
Reference in New Issue
Block a user