Skip to content

Add language hints #68

Merged
merged 2 commits into from
Feb 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added mpicms/static/images/de.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added mpicms/static/images/de.xcf
Binary file not shown.
Binary file added mpicms/static/images/en.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added mpicms/static/images/en.xcf
Binary file not shown.
26 changes: 26 additions & 0 deletions mpicms/templates/wagtailadmin/pages/edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,31 @@
.fieldname-markdown textarea {
font-family: monospace;
}

li.object.stream-field.english {
background-image: url("http://localhost:8000/static/images/en.png");
donald marked this conversation as resolved.
Show resolved Hide resolved
background-repeat: no-repeat
}
li.object.stream-field.german {
background: #cfe2e2;
background-image: url("http://localhost:8000/static/images/de.png");
background-repeat: no-repeat
}
</style>
{% endblock %}

{% block extra_js %}
{{ block.super }}
<script type="text/javascript">
$(document).ready(function() {
$("div#body_de-list, div#sidebar_de-list").
closest("li.object.stream-field").
addClass("german");
$("div#body_en-list, div#sidebar_en-list").
closest("li.object.stream-field").
addClass("english");
$("label:contains('[de]')").append(" 🇩🇪");
$("label:contains('[en]')").append(" 🇬🇧");
});
</script>
{% endblock %}