diff --git a/doc/themes.mdwn b/doc/themes.mdwn index 9d95cbc73..3f5ae78c4 100644 --- a/doc/themes.mdwn +++ b/doc/themes.mdwn @@ -40,13 +40,12 @@ the title field. ### Layout -Plinth expects a `main` block. This is where the meat of the content -goes. It is the center pain in the default layout. There is a -`title` block that the program will fill with text describing the -current page. `sidebar_left` contains the submenu navigation menu, -and `sidebar_right` is where we put all short text that helps the -admin fill out forms. They don't have to be sidebars, and they don't -have to go on the left and right. +Plinth expects a `content` block. This is where the meat of the +content goes. It is the center pane in the default layout. There +is a `title` block that the program will fill with text describing +the current page. There are two bars on the left side: `submenu` +for the menu and `sidebar` where short help texts go. +The lowest layer in the navigation is `subsubmenu`, displayed on top +of the content pane. -It is possible to override the `footer`, but I haven't yet found a -reason to do so. +All these items are inside of blocks and can be overwritten. diff --git a/plinth/__main__.py b/plinth/__main__.py index 58b6a0fae..aa4079161 100644 --- a/plinth/__main__.py +++ b/plinth/__main__.py @@ -144,6 +144,7 @@ def configure_django(): 'django.core.context_processors.debug', 'django.core.context_processors.i18n', 'django.core.context_processors.media', + 'django.core.context_processors.request', 'django.core.context_processors.static', 'django.core.context_processors.tz', 'django.contrib.messages.context_processors.messages', diff --git a/plinth/modules/apps/templates/apps.html b/plinth/modules/apps/templates/apps.html index 9dd2a0df2..a7f56629f 100644 --- a/plinth/modules/apps/templates/apps.html +++ b/plinth/modules/apps/templates/apps.html @@ -18,8 +18,9 @@ # {% endcomment %} -{% block main_block %} +{% block content %} +

Apps

User Applications are web apps hosted on your {{ cfg.product_name }}.

diff --git a/plinth/modules/config/templates/config.html b/plinth/modules/config/templates/config.html index ea4ed51a3..f38411fda 100644 --- a/plinth/modules/config/templates/config.html +++ b/plinth/modules/config/templates/config.html @@ -20,7 +20,7 @@ {% load bootstrap %} -{% block main_block %} +{% block content %} {% if is_expert %} diff --git a/plinth/modules/diagnostics/templates/diagnostics.html b/plinth/modules/diagnostics/templates/diagnostics.html index d9d1908ee..fd91b7fa3 100644 --- a/plinth/modules/diagnostics/templates/diagnostics.html +++ b/plinth/modules/diagnostics/templates/diagnostics.html @@ -18,7 +18,8 @@ # {% endcomment %} -{% block main_block %} +{% block content %} +

{{ title }}

The system diagnostic test will run a number of checks on your system to confirm that network services are running and configured diff --git a/plinth/modules/diagnostics/templates/diagnostics_test.html b/plinth/modules/diagnostics/templates/diagnostics_test.html index 04f5b0036..4a9a2fc60 100644 --- a/plinth/modules/diagnostics/templates/diagnostics_test.html +++ b/plinth/modules/diagnostics/templates/diagnostics_test.html @@ -18,7 +18,7 @@ # {% endcomment %} -{% block main_block %} +{% block content %} {% if diagnostics_error %}

The diagnostic test encountered an error:

diff --git a/plinth/modules/expert_mode/expert_mode.py b/plinth/modules/expert_mode/expert_mode.py index 14a62ec13..05eebd8ac 100644 --- a/plinth/modules/expert_mode/expert_mode.py +++ b/plinth/modules/expert_mode/expert_mode.py @@ -28,13 +28,14 @@ from plinth.modules.lib.auth import get_or_create_group class ExpertsForm(forms.Form): # pylint: disable-msg=W0232 """Form to configure expert mode""" expert_mode = forms.BooleanField( - label=_('Expert Mode'), required=False) + label=_('Enable Expert Mode'), required=False) def init(): """Initialize the module""" menu = cfg.main_menu.get('system:index') - menu.add_urlname(_('Expert Mode'), 'glyphicon-wrench', 'expert_mode:index', 10) + menu.add_urlname(_('Expert Mode'), 'glyphicon-wrench', + 'expert_mode:index', 10) @login_required @@ -70,7 +71,7 @@ def _apply_changes(request, new_status): expert_group = get_or_create_group('Expert') if new_status['expert_mode']: - if not expert_group in request.user.groups.all(): + if expert_group not in request.user.groups.all(): request.user.groups.add(expert_group) message = (messages.success, _('Expert mode enabled')) else: diff --git a/plinth/modules/expert_mode/templates/expert_mode.html b/plinth/modules/expert_mode/templates/expert_mode.html index 4f2bc1dec..122228b85 100644 --- a/plinth/modules/expert_mode/templates/expert_mode.html +++ b/plinth/modules/expert_mode/templates/expert_mode.html @@ -20,7 +20,9 @@ {% load bootstrap %} -{% block main_block %} +{% block content %} + +

{{ title }}

The {{ cfg.box_name }} can be administered in two modes, 'basic' and 'expert'. Basic mode hides a lot of features and configuration diff --git a/plinth/modules/firewall/templates/firewall.html b/plinth/modules/firewall/templates/firewall.html index 7e07e3241..509a3e8d0 100644 --- a/plinth/modules/firewall/templates/firewall.html +++ b/plinth/modules/firewall/templates/firewall.html @@ -18,7 +18,8 @@ # {% endcomment %} -{% block main_block %} +{% block content %} +

{{ title }}

Firewall is a network security system that controls the incoming and outgoing network traffic on your {{ cfg.box_name }}. Keeping a diff --git a/plinth/modules/first_boot/templates/firstboot_sidebar.html b/plinth/modules/first_boot/templates/firstboot_sidebar.html index 664bbb984..d4d5decc3 100644 --- a/plinth/modules/first_boot/templates/firstboot_sidebar.html +++ b/plinth/modules/first_boot/templates/firstboot_sidebar.html @@ -17,7 +17,7 @@ # {% endcomment %} -