Commit 67d3ae96 authored by Seb's avatar Seb
Browse files

Tidy up video edit screen

parent 7324ab7e
...@@ -6,3 +6,7 @@ DATABASES = { ...@@ -6,3 +6,7 @@ DATABASES = {
'NAME': 'tests.sqlite3', 'NAME': 'tests.sqlite3',
}, },
} }
INSTALLED_APPS += [
'wagtail.contrib.styleguide',
]
...@@ -5,8 +5,14 @@ ...@@ -5,8 +5,14 @@
{% block titletag %}{% blocktrans with title=video.title %}Editing video {{ title }}{% endblocktrans %}{% endblock %} {% block titletag %}{% blocktrans with title=video.title %}Editing video {{ title }}{% endblocktrans %}{% endblock %}
{% block extra_css %} {% block extra_css %}
<link rel="stylesheet" href="{% static 'wagtailvideos/css/edit-video.css' %}" type="text/css" /> {% endblock %} {% block extra_js %} {{ block.super }} {% url 'wagtailadmin_tag_autocomplete' as autocomplete_url %} {{ block.super }}
<link rel="stylesheet" href="{% static 'wagtailvideos/css/edit-video.css' %}" type="text/css" /> {% endblock %}
{% block extra_js %}
{{ block.super }}
{% url 'wagtailadmin_tag_autocomplete' as autocomplete_url %}
<script> <script>
{{ form.media.css }}
$(function() { $(function() {
$('#id_tags').tagit({ $('#id_tags').tagit({
autocomplete: { autocomplete: {
...@@ -22,18 +28,17 @@ ...@@ -22,18 +28,17 @@
{% include "wagtailadmin/shared/header.html" with title=editing_str subtitle=video.title icon="media" %} {% include "wagtailadmin/shared/header.html" with title=editing_str subtitle=video.title icon="media" %}
<div class="row row-flush nice-padding"> <div class="row row-flush nice-padding">
<div class="col5"> <div class="col5">
<form action="{% url 'wagtailvideos:edit' video.id %}" method="POST" enctype="multipart/form-data"> <form action="{% url 'wagtailvideos:edit' video.id %}" method="POST" enctype="multipart/form-data">
{% csrf_token %} {% csrf_token %}
<ul class="fields"> <ul class="fields">
{% for field in form %} {% for field in form %}
{% if field.name == 'file' %} {% if field.name == 'file' %}
{% include "wagtailvideos/videos/_file_field_as_li.html" %} {% include "wagtailvideos/videos/_file_field_as_li.html" with li_classes="label-above label-uppercase" %}
{% elif field.is_hidden %} {% elif field.is_hidden %}
{{ field }} {{ field }}
{% else %} {% else %}
{% include "wagtailadmin/shared/field_as_li.html" %} {% include "wagtailadmin/shared/field_as_li.html" with li_classes="label-above label-uppercase" %}
{% endif %} {% endif %}
{% endfor %} {% endfor %}
<li> <li>
...@@ -44,12 +49,12 @@ ...@@ -44,12 +49,12 @@
</form> </form>
</div> </div>
<div class="col5 divider-after"> <div class="col5 divider-after">
<h2 class="label">{% trans "Video preview" %}</h2> {% video video controls style=max-width:100% %} <h2 class="label no-float u-text-transform-uppercase">{% trans "Video preview" %}</h2> {% video video controls style=max-width:100% %}
{% if can_transcode %} {% if can_transcode %}
<h3 class="label">Transcodes</h3> <h3 class="label no-float u-text-transform-uppercase">Transcodes</h3>
<p>If you wish to generate HTML5 compliant transcodes use the form below. This may take a while depending on the length of the video.</p> <p>If you wish to generate HTML5 compliant transcodes use the form below. This may take a while depending on the length of the video.</p>
{% if transcodes %} {% if transcodes %}
<h3 class="label">Available Transcodes</h3> <h3 class="label no-float u-text-transform-uppercase">Available Transcodes</h3>
<ul> <ul>
{% for transcode in transcodes %} {% for transcode in transcodes %}
<li> <li>
...@@ -63,12 +68,12 @@ ...@@ -63,12 +68,12 @@
{% endfor %} {% endfor %}
</ul> </ul>
{% endif %} {% endif %}
<h3 class="label">Create transcode</h3> <h3 class="label no-float u-text-transform-uppercase">Create transcode</h3>
<form action="{% url 'wagtailvideos:create_transcode' video.id %}" method="POST"> <form action="{% url 'wagtailvideos:create_transcode' video.id %}" method="POST">
<ul class="fields"> <ul class="fields">
{% csrf_token %} {% csrf_token %}
{% include "wagtailadmin/shared/field_as_li.html" with field=transcode_form.media_format %} {% include "wagtailadmin/shared/field_as_li.html" with field=transcode_form.media_format li_classes="label-above label-uppercase" %}
{% include "wagtailadmin/shared/field_as_li.html" with field=transcode_form.quality %} {% include "wagtailadmin/shared/field_as_li.html" with field=transcode_form.quality li_classes="label-above label-uppercase" %}
<li> <li>
<input class="button" type='submit' value="Start" /> <input class="button" type='submit' value="Start" />
</li> </li>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment