Fix scope order when importing partials with metadata.
Render error when importing wiki pages that do not exist.
This commit is contained in:
parent
55e2ceccaa
commit
9a730a947e
4 changed files with 18 additions and 34 deletions
|
@ -8,22 +8,6 @@
|
|||
</script>
|
||||
<script src="{{ url_for('static', filename='js/editor.js') }}"></script>
|
||||
|
||||
{% if partials %}
|
||||
<script>
|
||||
$(function() {
|
||||
{% for name, value in partials.items() %}
|
||||
{% if name and value %}
|
||||
try {
|
||||
Handlebars.registerPartial({{ name|tojson|safe }}, {{ value|tojson|safe }});
|
||||
} catch (e) {
|
||||
// no data?
|
||||
}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
});
|
||||
</script>
|
||||
{% endif %}
|
||||
|
||||
{% if config.get('COLLABORATION') %}
|
||||
<script src="{{ url_for('static', filename='js/collaboration/main.js') }}"></script>
|
||||
{% endif %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue