{% import "forms.html" as forms with context %}

{% macro meta_editor(form, may_admin) %}
    <h2>Blog entry metadata</h2>
    <dl>
        {# TODO: Make blog_entry nameless #}
        {% if may_admin %}
            {{ forms.render(form['acl']) }}
        {% else %}
            {{ forms.raw_input(form['acl'], type='hidden') }}
        {% endif %}
        {% for e in [
            'summary',
            'itemtype',
            'contenttype',
            'tags',
            'name',
            'ptime',
            ] %}
            {{ forms.render(form[e]) }}
        {% endfor %}
    </dl>
{% endmacro %}

{% macro basic_meta_editor(form) %}
    {% for e in [
        'summary',
        'itemtype',
        'contenttype',
        'tags',
        'name',
        'ptime',
        ] %}
        <div class="form-group">
            {{ gen.label(form[e]) }}
            {{ gen.textarea(form[e], rows='1', class='form-control') }}
        </div>
    {% endfor %}
{% endmacro %}
