put graph editing settings into a modal
This commit is contained in:
parent
8973c2cbf4
commit
d5041414e6
4 changed files with 30 additions and 5 deletions
|
@ -17,14 +17,14 @@
|
||||||
</small>
|
</small>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
|
<a href="{% url 'editor.graph.settings' %}" class="btn btn-default btn-xs pull-right">{% trans 'Settings' %}</a>
|
||||||
<p>
|
<p>
|
||||||
<a href="{{ back_url }}">« {{ back_title }}</a>
|
<a href="{{ back_url }}">« {{ back_title }}</a>
|
||||||
</p>
|
</p>
|
||||||
{% bootstrap_messages %}
|
{% bootstrap_messages %}
|
||||||
|
|
||||||
<h4>{% trans 'Default properties:' %}</h4>
|
<h4>{% trans 'Default node properties' %}</h4>
|
||||||
{% bootstrap_form node_form %}
|
{% bootstrap_form node_form %}
|
||||||
{% bootstrap_form edge_form %}
|
|
||||||
|
|
||||||
<h4>{% trans 'UI settings:' %}</h4>
|
<h4>{% trans 'Default edge properties' %}</h4>
|
||||||
{% bootstrap_form settings_form %}
|
{% bootstrap_form edge_form %}
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
{% load bootstrap3 %}
|
||||||
|
{% load i18n %}
|
||||||
|
|
||||||
|
{% include 'editor/fragment_modal_close.html' %}
|
||||||
|
<h3>{% trans 'Graph Editing Settings' %}</h3>
|
||||||
|
|
||||||
|
<form action="{{ request.path }}" method="post">
|
||||||
|
{% csrf_token %}
|
||||||
|
{% bootstrap_form form %}
|
||||||
|
{% buttons %}
|
||||||
|
<button type="submit" accesskey="s" class="btn btn-primary pull-right">
|
||||||
|
{% trans 'Save' %}
|
||||||
|
</button>
|
||||||
|
{% endbuttons %}
|
||||||
|
</form>
|
|
@ -2,7 +2,8 @@ from django.apps import apps
|
||||||
from django.conf.urls import url
|
from django.conf.urls import url
|
||||||
|
|
||||||
from c3nav.editor.views.changes import changeset_detail, changeset_edit
|
from c3nav.editor.views.changes import changeset_detail, changeset_edit
|
||||||
from c3nav.editor.views.edit import edit, graph_edit, level_detail, list_objects, main_index, space_detail
|
from c3nav.editor.views.edit import (edit, graph_edit, graph_editing_settings, level_detail, list_objects, main_index,
|
||||||
|
space_detail)
|
||||||
from c3nav.editor.views.login import login_view, logout_view
|
from c3nav.editor.views.login import login_view, logout_view
|
||||||
from c3nav.editor.views.users import user_detail
|
from c3nav.editor.views.users import user_detail
|
||||||
|
|
||||||
|
@ -39,6 +40,7 @@ urlpatterns = [
|
||||||
kwargs={'model': 'Level'}),
|
kwargs={'model': 'Level'}),
|
||||||
url(r'^levels/(?P<level>c?[0-9]+)/graph/$', graph_edit, name='editor.levels.graph'),
|
url(r'^levels/(?P<level>c?[0-9]+)/graph/$', graph_edit, name='editor.levels.graph'),
|
||||||
url(r'^spaces/(?P<space>c?[0-9]+)/graph/$', graph_edit, name='editor.spaces.graph'),
|
url(r'^spaces/(?P<space>c?[0-9]+)/graph/$', graph_edit, name='editor.spaces.graph'),
|
||||||
|
url(r'^graphsettings/$', graph_editing_settings, name='editor.graph.settings'),
|
||||||
url(r'^changesets/(?P<pk>[0-9]+)/$', changeset_detail, name='editor.changesets.detail'),
|
url(r'^changesets/(?P<pk>[0-9]+)/$', changeset_detail, name='editor.changesets.detail'),
|
||||||
url(r'^changesets/(?P<pk>[0-9]+)/edit$', changeset_edit, name='editor.changesets.edit'),
|
url(r'^changesets/(?P<pk>[0-9]+)/edit$', changeset_edit, name='editor.changesets.edit'),
|
||||||
url(r'^users/(?P<pk>[0-9]+)/$', user_detail, name='editor.users.detail'),
|
url(r'^users/(?P<pk>[0-9]+)/$', user_detail, name='editor.users.detail'),
|
||||||
|
|
|
@ -375,3 +375,11 @@ def graph_edit(request, level=None, space=None):
|
||||||
})
|
})
|
||||||
|
|
||||||
return render(request, 'editor/graph.html', ctx)
|
return render(request, 'editor/graph.html', ctx)
|
||||||
|
|
||||||
|
|
||||||
|
@sidebar_view
|
||||||
|
def graph_editing_settings(request):
|
||||||
|
ctx = {
|
||||||
|
'form': GraphEditorSettingsForm(),
|
||||||
|
}
|
||||||
|
return render(request, 'editor/graph_editing_settings.html', ctx)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue