mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-05-27 10:44:33 +00:00
ikiwiki: Move subsubmenu below description
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com> Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
parent
00eb30861c
commit
ec7ae92d89
42
plinth/modules/ikiwiki/templates/ikiwiki_configure.html
Normal file
42
plinth/modules/ikiwiki/templates/ikiwiki_configure.html
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
{% extends "service-subsubmenu.html" %}
|
||||||
|
{% comment %}
|
||||||
|
#
|
||||||
|
# This file is part of FreedomBox.
|
||||||
|
#
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU Affero General Public License as
|
||||||
|
# published by the Free Software Foundation, either version 3 of the
|
||||||
|
# License, or (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU Affero General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU Affero General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
{% endcomment %}
|
||||||
|
|
||||||
|
{% load bootstrap %}
|
||||||
|
{% load i18n %}
|
||||||
|
|
||||||
|
{% block configuration %}
|
||||||
|
<h3>{% trans "Configuration" %}</h3>
|
||||||
|
|
||||||
|
{% block diagnostics %}
|
||||||
|
{% if diagnostics_module_name %}
|
||||||
|
{% include "diagnostics_button.html" with module=diagnostics_module_name enabled=service.is_enabled %}
|
||||||
|
{% endif %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
<form class="form form-configuration" method="post">
|
||||||
|
{% csrf_token %}
|
||||||
|
|
||||||
|
{{ form|bootstrap }}
|
||||||
|
|
||||||
|
<input type="submit" class="btn btn-primary"
|
||||||
|
value="{% trans "Update setup" %}"/>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
{% endblock %}
|
||||||
@ -1,4 +1,4 @@
|
|||||||
{% extends "base.html" %}
|
{% extends "service-subsubmenu.html" %}
|
||||||
{% comment %}
|
{% comment %}
|
||||||
#
|
#
|
||||||
# This file is part of FreedomBox.
|
# This file is part of FreedomBox.
|
||||||
@ -21,7 +21,8 @@
|
|||||||
{% load bootstrap %}
|
{% load bootstrap %}
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
|
|
||||||
{% block content %}
|
{% block configuration %}
|
||||||
|
<h3>{% trans "Create Wiki or Blog" %}</h3>
|
||||||
|
|
||||||
<form class="form" method="post">
|
<form class="form" method="post">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
{% extends "base.html" %}
|
{% extends "service-subsubmenu.html" %}
|
||||||
{% comment %}
|
{% comment %}
|
||||||
#
|
#
|
||||||
# This file is part of FreedomBox.
|
# This file is part of FreedomBox.
|
||||||
@ -21,7 +21,7 @@
|
|||||||
{% load bootstrap %}
|
{% load bootstrap %}
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
|
|
||||||
{% block content %}
|
{% block configuration %}
|
||||||
|
|
||||||
<h3>
|
<h3>
|
||||||
{% blocktrans trimmed %}
|
{% blocktrans trimmed %}
|
||||||
@ -40,7 +40,7 @@
|
|||||||
<form class="form" method="post">
|
<form class="form" method="post">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
|
|
||||||
<input type="submit" class="btn btn-md btn-primary"
|
<input type="submit" class="btn btn-md btn-danger"
|
||||||
value="{% blocktrans %}Delete {{ name }}{% endblocktrans %}"/>
|
value="{% blocktrans %}Delete {{ name }}{% endblocktrans %}"/>
|
||||||
|
|
||||||
<a href="{% url 'ikiwiki:manage' %}" role="button"
|
<a href="{% url 'ikiwiki:manage' %}" role="button"
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
{% extends "base.html" %}
|
{% extends "service-subsubmenu.html" %}
|
||||||
{% comment %}
|
{% comment %}
|
||||||
#
|
#
|
||||||
# This file is part of FreedomBox.
|
# This file is part of FreedomBox.
|
||||||
@ -33,7 +33,8 @@
|
|||||||
</style>
|
</style>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block configuration %}
|
||||||
|
<h3>{% trans "Manage Wikis and Blogs" %}</h3>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-6">
|
<div class="col-sm-6">
|
||||||
|
|||||||
@ -48,12 +48,15 @@ class IkiwikiServiceView(views.ServiceView):
|
|||||||
description = ikiwiki.description
|
description = ikiwiki.description
|
||||||
diagnostics_module_name = "ikiwiki"
|
diagnostics_module_name = "ikiwiki"
|
||||||
show_status_block = False
|
show_status_block = False
|
||||||
|
template_name = "ikiwiki_configure.html"
|
||||||
|
|
||||||
def get_context_data(self, **kwargs):
|
def get_context_data(self, **kwargs):
|
||||||
"""Return the context data for rendering the template view."""
|
"""Return the context data for rendering the template view."""
|
||||||
context = super().get_context_data(**kwargs)
|
context = super().get_context_data(**kwargs)
|
||||||
|
context['title'] = ikiwiki.name
|
||||||
context['subsubmenu'] = subsubmenu
|
context['subsubmenu'] = subsubmenu
|
||||||
context['clients'] = ikiwiki.clients
|
context['clients'] = ikiwiki.clients
|
||||||
|
context['manual_page'] = ikiwiki.manual_page
|
||||||
return context
|
return context
|
||||||
|
|
||||||
|
|
||||||
@ -64,7 +67,10 @@ def manage(request):
|
|||||||
|
|
||||||
return TemplateResponse(
|
return TemplateResponse(
|
||||||
request, 'ikiwiki_manage.html', {
|
request, 'ikiwiki_manage.html', {
|
||||||
'title': _('Manage Wikis and Blogs'),
|
'title': ikiwiki.name,
|
||||||
|
'clients': ikiwiki.clients,
|
||||||
|
'description': ikiwiki.description,
|
||||||
|
'manual_page': ikiwiki.manual_page,
|
||||||
'subsubmenu': subsubmenu,
|
'subsubmenu': subsubmenu,
|
||||||
'sites': sites
|
'sites': sites
|
||||||
})
|
})
|
||||||
@ -97,10 +103,12 @@ def create(request):
|
|||||||
|
|
||||||
return TemplateResponse(
|
return TemplateResponse(
|
||||||
request, 'ikiwiki_create.html', {
|
request, 'ikiwiki_create.html', {
|
||||||
'title': _('Create Wiki or Blog'),
|
'title': ikiwiki.name,
|
||||||
|
'clients': ikiwiki.clients,
|
||||||
|
'description': ikiwiki.description,
|
||||||
'form': form,
|
'form': form,
|
||||||
'subsubmenu': subsubmenu,
|
|
||||||
'manual_page': ikiwiki.manual_page,
|
'manual_page': ikiwiki.manual_page,
|
||||||
|
'subsubmenu': subsubmenu,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
@ -142,14 +150,19 @@ def delete(request, name):
|
|||||||
messages.success(request, _('{name} deleted.').format(name=name))
|
messages.success(request, _('{name} deleted.').format(name=name))
|
||||||
frontpage.remove_shortcut('ikiwiki_' + name)
|
frontpage.remove_shortcut('ikiwiki_' + name)
|
||||||
except actions.ActionError as error:
|
except actions.ActionError as error:
|
||||||
messages.error(request,
|
messages.error(
|
||||||
|
request,
|
||||||
_('Could not delete {name}: {error}').format(
|
_('Could not delete {name}: {error}').format(
|
||||||
name=name, error=error))
|
name=name, error=error))
|
||||||
|
|
||||||
return redirect(reverse_lazy('ikiwiki:manage'))
|
return redirect(reverse_lazy('ikiwiki:manage'))
|
||||||
|
|
||||||
return TemplateResponse(request, 'ikiwiki_delete.html', {
|
return TemplateResponse(
|
||||||
'title': _('Delete Wiki or Blog'),
|
request, 'ikiwiki_delete.html', {
|
||||||
|
'title': ikiwiki.name,
|
||||||
|
'clients': ikiwiki.clients,
|
||||||
|
'description': ikiwiki.description,
|
||||||
|
'manual_page': ikiwiki.manual_page,
|
||||||
'subsubmenu': subsubmenu,
|
'subsubmenu': subsubmenu,
|
||||||
'name': name
|
'name': name
|
||||||
})
|
})
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user