back to c3nav link in editor

This commit is contained in:
Laura Klünder 2017-12-18 23:58:17 +01:00
parent 2901b0eb30
commit 1fa0179bd6
2 changed files with 6 additions and 1 deletions

View file

@ -237,9 +237,11 @@ editor = {
}, },
_sidebar_link_click: function(e) { _sidebar_link_click: function(e) {
// listener for link-clicks in the sidebar. // listener for link-clicks in the sidebar.
var href = $(this).attr('href');
if (href && !href.startsWith('/editor/')) return;
e.preventDefault(); e.preventDefault();
if (editor._loading_geometry) return; if (editor._loading_geometry) return;
if ($(this).attr('href') === '') return; if (!href) return;
if ($(this).is('[data-force-next-zoom]')) editor._next_zoom = true; if ($(this).is('[data-force-next-zoom]')) editor._next_zoom = true;
if ($(this).is('[data-no-next-zoom]')) editor._next_zoom = false; if ($(this).is('[data-no-next-zoom]')) editor._next_zoom = false;
editor.sidebar_get($(this).attr('href')); editor.sidebar_get($(this).attr('href'));

View file

@ -1,6 +1,9 @@
{% load i18n %} {% load i18n %}
<ul class="nav navbar-nav navbar-right"> <ul class="nav navbar-nav navbar-right">
<li><a href="{% url 'site.index' %}">
&laquo; {% trans 'back to c3nav' %}
</a></li>
<li><a href="{{ request.changeset.get_absolute_url }}"> <li><a href="{{ request.changeset.get_absolute_url }}">
{% if request.changeset.direct_editing %} {% if request.changeset.direct_editing %}
<span class="text-warning">{{ request.changeset.count_display }}</span> <span class="text-warning">{{ request.changeset.count_display }}</span>