forked from jazzband/wagtailmenus
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Templates need to be conditional based on the Wagtail version
- Loading branch information
1 parent
ab128aa
commit ffb3fb3
Showing
6 changed files
with
102 additions
and
16 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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<header class="w-header"> | ||
<div class="row nice-padding"> | ||
<div class="left"> | ||
<div class="col header-title"> | ||
<h1 class="w-header__title" id="header-title"> | ||
<svg class="icon icon-list-ol w-header__glyph" aria-hidden="true"><use href="#icon-list-ol"></use></svg> | ||
{{ title }}{% if subtitle %} <span>{{ subtitle }}</span>{% endif %}</h1> | ||
</div> | ||
</div> | ||
<div class="right"> | ||
{% block right_content %}{% endblock %} | ||
</div> | ||
</div> | ||
</header> |
24 changes: 12 additions & 12 deletions
24
wagtailmenus/templates/wagtailmenus/includes/header_with_site_switcher.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 |
---|---|---|
@@ -1,12 +1,12 @@ | ||
{% if site_switcher %} | ||
<div class="w-field__wrapper " data-field-wrapper=""> | ||
<form method="get" id="settings-site-switch"> | ||
<label class="w-field__label" for="{{ site_switcher.site.id_for_label }}" id="{{ site_switcher.site.id_for_label }}-label"> | ||
Site: <span class="w-required-mark">*</span> | ||
</label> | ||
<div class="w-field__input" data-field-input=""> | ||
{{ site_switcher.site }} | ||
</div> | ||
</form> | ||
</div> | ||
{% endif %} | ||
{% extends 'wagtailmenus/includes/header.html' %} | ||
|
||
{% block right_content %} | ||
{% if site_switcher %} | ||
<form method="get" id="settings-site-switch"> | ||
<label for="{{ site_switcher.site.id_for_label }}"> | ||
Site: | ||
</label> | ||
{{ site_switcher.site }} | ||
</form> | ||
{% endif %} | ||
{% endblock %} |
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
12 changes: 12 additions & 0 deletions
12
wagtailmenus/templates/wagtailmenus/wagtail_63/includes/header_with_site_switcher.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 @@ | ||
{% if site_switcher %} | ||
<div class="w-field__wrapper " data-field-wrapper=""> | ||
<form method="get" id="settings-site-switch"> | ||
<label class="w-field__label" for="{{ site_switcher.site.id_for_label }}" id="{{ site_switcher.site.id_for_label }}-label"> | ||
Site: <span class="w-required-mark">*</span> | ||
</label> | ||
<div class="w-field__input" data-field-input=""> | ||
{{ site_switcher.site }} | ||
</div> | ||
</form> | ||
</div> | ||
{% endif %} |
34 changes: 34 additions & 0 deletions
34
wagtailmenus/templates/wagtailmenus/wagtail_63/mainmenu_edit.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,34 @@ | ||
{% extends "wagtailadmin/generic/edit.html" %} | ||
{% load wagtailadmin_tags i18n %} | ||
{% block titletag %}{% blocktrans trimmed with snippet_type_name=model_opts.verbose_name %}Editing {{ snippet_type_name }} - {{ object }}{% endblocktrans %}{% endblock %} | ||
{% block bodyclass %}{% if locked_for_user %}content-locked{% endif %}{% endblock %} | ||
|
||
{% block main_content %} | ||
{% include "wagtailmenus/wagtail_63/includes/header_with_site_switcher.html" with title=object icon=header_icon merged=1 %} | ||
{{ block.super }} | ||
{% endblock %} | ||
|
||
{% block extra_css %} | ||
{{ block.super }} | ||
{{ media.css }} | ||
{{ view.media.css }} | ||
{% endblock %} | ||
{% block extra_js %} | ||
{{ block.super }} | ||
{% include "wagtailadmin/pages/_editor_js.html" %} | ||
{{ media.js }} | ||
{{ view.media.js }} | ||
|
||
<script> | ||
// Set wagtailConfig.ACTIVE_CONTENT_LOCALE if this is a translated page | ||
// This value may be used by JS widgets on the form | ||
{% if locale %} | ||
window.wagtailConfig = window.wagtailConfig || {}; | ||
window.wagtailConfig.ACTIVE_CONTENT_LOCALE = '{{ locale.language_code|escapejs }}'; | ||
{% endif %} | ||
</script> | ||
|
||
{% if workflow_enabled %} | ||
{% include "wagtailadmin/shared/_workflow_init.html" %} | ||
{% endif %} | ||
{% endblock %} |