mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +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 %}
|
||||
#
|
||||
# This file is part of FreedomBox.
|
||||
@ -21,7 +21,8 @@
|
||||
{% load bootstrap %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block content %}
|
||||
{% block configuration %}
|
||||
<h3>{% trans "Create Wiki or Blog" %}</h3>
|
||||
|
||||
<form class="form" method="post">
|
||||
{% csrf_token %}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
{% extends "base.html" %}
|
||||
{% extends "service-subsubmenu.html" %}
|
||||
{% comment %}
|
||||
#
|
||||
# This file is part of FreedomBox.
|
||||
@ -21,7 +21,7 @@
|
||||
{% load bootstrap %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block content %}
|
||||
{% block configuration %}
|
||||
|
||||
<h3>
|
||||
{% blocktrans trimmed %}
|
||||
@ -40,7 +40,7 @@
|
||||
<form class="form" method="post">
|
||||
{% 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 %}"/>
|
||||
|
||||
<a href="{% url 'ikiwiki:manage' %}" role="button"
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
{% extends "base.html" %}
|
||||
{% extends "service-subsubmenu.html" %}
|
||||
{% comment %}
|
||||
#
|
||||
# This file is part of FreedomBox.
|
||||
@ -23,17 +23,18 @@
|
||||
|
||||
{% block page_head %}
|
||||
<style type="text/css">
|
||||
.wiki-label {
|
||||
display: inline-block;
|
||||
width: 40%;
|
||||
}
|
||||
.list-group-item .btn {
|
||||
margin: -5px 0;
|
||||
}
|
||||
.wiki-label {
|
||||
display: inline-block;
|
||||
width: 40%;
|
||||
}
|
||||
.list-group-item .btn {
|
||||
margin: -5px 0;
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% block configuration %}
|
||||
<h3>{% trans "Manage Wikis and Blogs" %}</h3>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
|
||||
@ -48,12 +48,15 @@ class IkiwikiServiceView(views.ServiceView):
|
||||
description = ikiwiki.description
|
||||
diagnostics_module_name = "ikiwiki"
|
||||
show_status_block = False
|
||||
template_name = "ikiwiki_configure.html"
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
"""Return the context data for rendering the template view."""
|
||||
context = super().get_context_data(**kwargs)
|
||||
context['title'] = ikiwiki.name
|
||||
context['subsubmenu'] = subsubmenu
|
||||
context['clients'] = ikiwiki.clients
|
||||
context['manual_page'] = ikiwiki.manual_page
|
||||
return context
|
||||
|
||||
|
||||
@ -64,7 +67,10 @@ def manage(request):
|
||||
|
||||
return TemplateResponse(
|
||||
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,
|
||||
'sites': sites
|
||||
})
|
||||
@ -97,10 +103,12 @@ def create(request):
|
||||
|
||||
return TemplateResponse(
|
||||
request, 'ikiwiki_create.html', {
|
||||
'title': _('Create Wiki or Blog'),
|
||||
'title': ikiwiki.name,
|
||||
'clients': ikiwiki.clients,
|
||||
'description': ikiwiki.description,
|
||||
'form': form,
|
||||
'subsubmenu': subsubmenu,
|
||||
'manual_page': ikiwiki.manual_page,
|
||||
'subsubmenu': subsubmenu,
|
||||
})
|
||||
|
||||
|
||||
@ -142,14 +150,19 @@ def delete(request, name):
|
||||
messages.success(request, _('{name} deleted.').format(name=name))
|
||||
frontpage.remove_shortcut('ikiwiki_' + name)
|
||||
except actions.ActionError as error:
|
||||
messages.error(request,
|
||||
_('Could not delete {name}: {error}').format(
|
||||
name=name, error=error))
|
||||
messages.error(
|
||||
request,
|
||||
_('Could not delete {name}: {error}').format(
|
||||
name=name, error=error))
|
||||
|
||||
return redirect(reverse_lazy('ikiwiki:manage'))
|
||||
|
||||
return TemplateResponse(request, 'ikiwiki_delete.html', {
|
||||
'title': _('Delete Wiki or Blog'),
|
||||
'subsubmenu': subsubmenu,
|
||||
'name': name
|
||||
})
|
||||
return TemplateResponse(
|
||||
request, 'ikiwiki_delete.html', {
|
||||
'title': ikiwiki.name,
|
||||
'clients': ikiwiki.clients,
|
||||
'description': ikiwiki.description,
|
||||
'manual_page': ikiwiki.manual_page,
|
||||
'subsubmenu': subsubmenu,
|
||||
'name': name
|
||||
})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user