-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
51 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,22 @@ | ||
{% extends "modeladmin/create.html" %} | ||
{% load i18n wagtailadmin_tags %} | ||
{% load i18n wagtailadmin_tags modeladmin_tags %} | ||
|
||
{% block header %} | ||
{% include "modeladmin/includes/header_with_history.html" with title=view.get_page_title subtitle=view.get_page_subtitle icon=view.header_icon merged=1 latest_log_entry=latest_log_entry history_url=history_url %} | ||
{% endblock %} | ||
|
||
{% block form_action %}{{ view.edit_url }}{% endblock %} | ||
|
||
{% block form_actions %} | ||
<div class="dropdown dropup dropdown-button match-width"> | ||
<button | ||
type="submit" | ||
class="button action-save button-longrunning" | ||
data-controller="w-progress" | ||
data-action="w-progress#activate" | ||
data-w-progress-active-value="{% trans 'Saving…' %}" | ||
> | ||
{% icon name="spinner" %} | ||
<em data-w-progress-target="label">{% trans 'Save' %}</em> | ||
</button> | ||
|
||
{% if user_can_delete %} | ||
{% block more_action_items %} | ||
{% wagtail_version 6 0 as wagtail60 %} | ||
{% if user_can_delete %} | ||
{% if wagtail60 %} | ||
<a href="{{ view.delete_url }}" class="button">{% trans "Delete" %}</a> | ||
{% else %} | ||
<div class="dropdown-toggle">{% icon name="arrow-up" %}</div> | ||
<ul> | ||
<li><a href="{{ view.delete_url }}" class="shortcut">{% trans "Delete" %}</a></li> | ||
</ul> | ||
{% endif %} | ||
|
||
</div> | ||
{% endif %} | ||
{% endblock %} |
12 changes: 12 additions & 0 deletions
12
wagtail_modeladmin/templates/modeladmin/includes/dropdown_button.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{% load wagtailadmin_tags i18n %} | ||
|
||
{% comment "text/markdown" %} | ||
A button with a dropdown menu next to it. | ||
Legacy implementation fallback for the new | ||
"wagtailadmin/shared/dropdown/dropdown_button.html" in Wagtail 6.0+. | ||
{% endcomment %} | ||
|
||
<div class="dropdown dropup dropdown-button match-width"> | ||
{{ button }} | ||
{{ children }} | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters