Add the possibility to save an article as draft
This commit is contained in:
@@ -29,6 +29,9 @@
|
||||
—
|
||||
<a href="{{ article.url}}delete" onclick="return confirm('Are you sure you?')">{{ "Delete this article" | _ }}</a>
|
||||
{% endif %}
|
||||
{% if not article.post.published %}
|
||||
<span class="badge">{{ "Draft" }}</span>
|
||||
{% endif %}
|
||||
</p>
|
||||
<article>
|
||||
{{ article.post.content | safe }}
|
||||
|
||||
@@ -35,10 +35,21 @@
|
||||
{% set license_infos = "Default license will be {{ instance.default_license }}" | _(instance=instance) %}
|
||||
{{ macros::input(name="license", label="License", errors=errors, form=form, optional=true, details=license_infos) }}
|
||||
|
||||
{% if is_draft %}
|
||||
<label for="draft">
|
||||
<input type="checkbox" name="draft" id="draft" checked>
|
||||
{{ "This is a draft, don't publish it yet." | _ }}
|
||||
</label>
|
||||
{% endif %}
|
||||
|
||||
{% if editing %}
|
||||
<input type="submit" value="{{ "Update" | _ }}" />
|
||||
{% else %}
|
||||
<input type="submit" value="{{ "Publish" | _ }}" />
|
||||
{% if is_draft %}
|
||||
<input type="submit" value="{{ "Update or publish" | _ }}" />
|
||||
{% else %}
|
||||
<input type="submit" value="{{ "Publish" | _ }}" />
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</form>
|
||||
<script src="/static/js/autoExpand.js"></script>
|
||||
|
||||
Reference in New Issue
Block a user