mirror of
https://github.com/mediacms-io/mediacms.git
synced 2025-11-07 16:08:54 -05:00
Enable audio files in video edit and navigation
Updated logic in both the edit_video view and media navigation template to allow audio media types, in addition to video, to access video editing features and navigation links.
This commit is contained in:
parent
ea67201fa5
commit
cd9fc51619
@ -429,7 +429,7 @@ def edit_video(request):
|
|||||||
if not (request.user == media.user or is_mediacms_editor(request.user)):
|
if not (request.user == media.user or is_mediacms_editor(request.user)):
|
||||||
return HttpResponseRedirect("/")
|
return HttpResponseRedirect("/")
|
||||||
|
|
||||||
if not media.media_type == "video":
|
if not media.media_type in ["video", "audio"]:
|
||||||
messages.add_message(request, messages.INFO, "Media is not video")
|
messages.add_message(request, messages.INFO, "Media is not video")
|
||||||
return HttpResponseRedirect(media.get_absolute_url())
|
return HttpResponseRedirect(media.get_absolute_url())
|
||||||
|
|
||||||
|
|||||||
@ -11,7 +11,7 @@
|
|||||||
{{ "Metadata" | custom_translate:LANGUAGE_CODE}}
|
{{ "Metadata" | custom_translate:LANGUAGE_CODE}}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
{% if media_object.media_type == 'video' %}
|
{% if media_object.media_type == 'video' or media_object.media_type == 'audio' %}
|
||||||
<li style="display: inline-block;">
|
<li style="display: inline-block;">
|
||||||
<a href="{% url 'edit_video' %}?m={{media_object.friendly_token}}"
|
<a href="{% url 'edit_video' %}?m={{media_object.friendly_token}}"
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user