2016-07-31 19:36:13 +00:00
|
|
|
{% extends 'master.twig' %}
|
2016-07-29 19:31:36 +00:00
|
|
|
|
|
|
|
{% set title = category ~ ' / ' ~ mode %}
|
|
|
|
|
2016-09-22 20:14:28 +00:00
|
|
|
{% block js %}
|
|
|
|
<script>
|
|
|
|
function updateSettings(form, action, text) {
|
|
|
|
var forms = {},
|
|
|
|
dialogue = new Sakura.Dialogue,
|
|
|
|
updater = new Sakura.AJAX;
|
|
|
|
|
|
|
|
dialogue.AddCallback(Sakura.DialogueButton.Ok, function () {
|
|
|
|
this.Close();
|
|
|
|
});
|
|
|
|
|
|
|
|
for (var a = 0; a < form.elements.length; a++) {
|
|
|
|
forms[form.elements.item(a).name] = form.elements.item(a).value;
|
|
|
|
}
|
|
|
|
|
|
|
|
updater.SetUrl(action);
|
|
|
|
updater.Form();
|
|
|
|
updater.SetSend(forms);
|
|
|
|
updater.AddCallback(0, function () {
|
|
|
|
var resp = updater.JSON();
|
|
|
|
dialogue.Text = resp.error || text || 'Updated!';
|
|
|
|
dialogue.Display();
|
|
|
|
});
|
|
|
|
updater.Start(Sakura.HTTPMethod.POST);
|
|
|
|
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
function updateSettingsConfirm(form, action) {
|
|
|
|
var dialogue = new Sakura.Dialogue;
|
|
|
|
dialogue.Text = "Are you sure?";
|
|
|
|
dialogue.SetType(Sakura.DialogueType.Confirm);
|
|
|
|
dialogue.AddCallback(Sakura.DialogueButton.No, function () {
|
|
|
|
this.Close();
|
|
|
|
});
|
|
|
|
dialogue.AddCallback(Sakura.DialogueButton.Yes, function () {
|
|
|
|
updateSettings(form, action);
|
|
|
|
this.Close();
|
|
|
|
});
|
|
|
|
dialogue.Display();
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
{% endblock %}
|
|
|
|
|
2016-07-29 19:31:36 +00:00
|
|
|
{% block content %}
|
2016-09-10 13:47:27 +00:00
|
|
|
<div class="content settings messages {% if showBG %}background-transparent{% endif %}">
|
|
|
|
<div class="content-right content-column">
|
|
|
|
<div class="head">
|
|
|
|
Navigation
|
|
|
|
</div>
|
|
|
|
<div class="right-menu-nav">
|
|
|
|
{% for name,links in navigation %}
|
|
|
|
<div>{{ name }}</div>
|
|
|
|
{% for name,link in links %}
|
|
|
|
<a href="{{ link }}">{{ name }}</a>
|
|
|
|
{% endfor %}
|
2016-07-29 19:31:36 +00:00
|
|
|
{% endfor %}
|
2016-09-10 13:47:27 +00:00
|
|
|
</div>
|
2016-07-29 19:31:36 +00:00
|
|
|
</div>
|
2016-09-10 13:47:27 +00:00
|
|
|
<div class="content-left content-column">
|
|
|
|
<div class="head">{{ title }}</div>
|
|
|
|
<div class="settings-explanation">{{ block('description') }}</div>
|
|
|
|
{{ block('settingsContent') }}
|
|
|
|
</div>
|
|
|
|
<div class="clear"></div>
|
2016-07-29 19:31:36 +00:00
|
|
|
</div>
|
|
|
|
{% endblock %}
|