Improve layout of articles admin save buttons
This commit is contained in:
parent
8d335282e4
commit
5b2a2f79c8
2 changed files with 11 additions and 12 deletions
11
articles/templates/admin/articles/article/submit_line.html
Normal file
11
articles/templates/admin/articles/article/submit_line.html
Normal file
|
@ -0,0 +1,11 @@
|
|||
{% extends "admin/submit_line.html" %}
|
||||
{% load i18n admin_urls %}
|
||||
{% block submit-row %}
|
||||
{{ block.super }}
|
||||
{% if original.status != original.PUBLISHED %}
|
||||
<input type="submit" value="Save & publish" name="_publish">
|
||||
{% elif original.status != original.DRAFT %}
|
||||
<input type="submit" value="Save & unpublish" name="_unpublish">
|
||||
{% endif %}
|
||||
<input type="submit" value="Save & preview" name="_preview">
|
||||
{% endblock %}
|
|
@ -1,17 +1,5 @@
|
|||
{% extends 'admin/change_form.html' %}
|
||||
|
||||
{% block submit_buttons_bottom %}
|
||||
{{ block.super }}
|
||||
<div class="submit-row">
|
||||
{% if original.status != original.PUBLISHED %}
|
||||
<input type="submit" value="Save & publish" name="_publish">
|
||||
{% elif original.status != original.DRAFT %}
|
||||
<input type="submit" value="Save & unpublish" name="_unpublish">
|
||||
{% endif %}
|
||||
<input type="submit" value="Save & preview" name="_preview">
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block object-tools-items %}
|
||||
<li><a href="https://www.markdownguide.org/cheat-sheet/" class="historylink" target="_blank">Markdown cheat sheet</a></li>
|
||||
{{ block.super }}
|
||||
|
|
Reference in a new issue