It is now possible, only for user with admin capability, to setup a project as ‘film’. This action can be performed via CLI using ./manage.py cloud setup_for_film <project_url> or via the web interface in the Cloud settings area. Setting up a project for film creates a number of extension props under the ‘cloud’ key. Such properties are listed in the cloud_extension_props variable in setup.py. At this moment the functionality exists for a very specific purpose: improving the presentation of public Film projects in the Blender Cloud. It can be further extended to improve the presentation of Training and Libraries later on.
68 lines
2.1 KiB
Plaintext
68 lines
2.1 KiB
Plaintext
| {% extends 'project_settings/cloud_layout.html' %}
|
|
|
|
| {% block cloud_container %}
|
|
#node-edit-form
|
|
form(onsubmit="save(this, '{{ url_for('cloud.save_film_settings', project_url=project['url']) }}'); return false;")
|
|
| {% for field in form %}
|
|
|
|
| {% if field.name == 'csrf_token' %}
|
|
| {{ field }}
|
|
| {% else %}
|
|
| {% if field.type == 'HiddenField' %}
|
|
| {{ field }}
|
|
| {% else %}
|
|
|
|
| {% if field.name not in hidden_fields %}
|
|
|
|
.form-group(class="{{field.name}}{% if field.errors %} error{% endif %}")
|
|
| {{ field.label }}
|
|
| {% if field.name == 'picture' %}
|
|
| {% if post.picture %}
|
|
img.node-preview-thumbnail(src="{{ post.picture.thumbnail('m', api=api) }}")
|
|
a(href="#", class="file_delete", data-field-name="picture", data-file_id="{{post.picture._id}}") Delete
|
|
| {% endif %}
|
|
| {% endif %}
|
|
| {{ field(class='form-control') }}
|
|
|
|
| {% if field.errors %}
|
|
ul.error
|
|
| {% for error in field.errors %}
|
|
li {{ error }}
|
|
| {% endfor %}
|
|
| {% endif %}
|
|
|
|
| {% else %}
|
|
| {{ field(class='d-none') }}
|
|
| {% endif %}
|
|
|
|
| {% endif %}
|
|
| {% endif %}
|
|
|
|
| {% endfor %}
|
|
button.btn.btn-outline-success.btn-block(type='submit')
|
|
i.pi-check
|
|
| Save
|
|
|
|
|
|
| {% endblock cloud_container %}
|
|
| {% block footer_scripts %}
|
|
script(type='text/javascript', src="{{ url_for('static_pillar', filename='assets/js/vendor/jquery.ui.widget.min.js') }}")
|
|
script(type='text/javascript', src="{{ url_for('static_pillar', filename='assets/js/vendor/jquery.iframe-transport.min.js') }}")
|
|
script(type='text/javascript', src="{{ url_for('static_pillar', filename='assets/js/vendor/jquery.fileupload.min.js') }}")
|
|
script(type='text/javascript', src="{{ url_for('static_pillar', filename='assets/js/file_upload.min.js') }}")
|
|
|
|
script.
|
|
ProjectUtils.setProjectAttributes({projectId: "{{project._id}}", isProject: true, nodeId: ''});
|
|
|
|
function save(form, url) {
|
|
let serizalizedData = $(form).serializeArray()
|
|
$.post(url, serizalizedData)
|
|
.done(function(xhr) {
|
|
toastr.success('Properties saved');
|
|
})
|
|
.fail(function(err) {
|
|
toastr.error(xhrErrorResponseElement(err, 'Error saving properties: '));
|
|
});
|
|
}
|
|
| {% endblock %}
|