From e4c11e7d8eabac1a35371ca4c02877c1b2fcedfa Mon Sep 17 00:00:00 2001 From: fonfon Date: Thu, 20 Nov 2014 06:32:27 +0100 Subject: [PATCH] show the sidebar with help during first_boot --- .../first_boot/templates/firstboot_sidebar.html | 8 +++++--- plinth/modules/first_boot/views.py | 10 +++++++++- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/plinth/modules/first_boot/templates/firstboot_sidebar.html b/plinth/modules/first_boot/templates/firstboot_sidebar.html index 5b89b873e..664bbb984 100644 --- a/plinth/modules/first_boot/templates/firstboot_sidebar.html +++ b/plinth/modules/first_boot/templates/firstboot_sidebar.html @@ -21,8 +21,10 @@

Getting Help

-

We've done our best to make your FreedomBox easy to use. If - you have questions during setup, there are a few places to turn - for help. TODO: add links to such help.

+

If you have any questions or problems please take a look at the + + Debian Wiki + where you also find links to the mailing list and IRC channels. +

diff --git a/plinth/modules/first_boot/views.py b/plinth/modules/first_boot/views.py index ffc7e622c..74f672272 100644 --- a/plinth/modules/first_boot/views.py +++ b/plinth/modules/first_boot/views.py @@ -33,6 +33,13 @@ class State0View(CreateView): form_class = State0Form success_url = reverse_lazy('first_boot:state10') + def get_context_data(self, **kwargs): + """Set 'sidebar_right' to display the sidebar_right in the templates. + Otherwise we wouldn't be able to include firstboot_sidebar.html""" + context = super(State0View, self).get_context_data(**kwargs) + context['sidebar_right'] = "a" + return context + def get_initial(self): initial = super(State0View, self).get_initial() initial['hostname'] = config.get_hostname() @@ -55,5 +62,6 @@ def state10(request): kvstore.set('firstboot_state', 10) return render_to_response('firstboot_state10.html', - {'title': _('Setup Complete')}, + {'title': _('Setup Complete'), + 'sidebar_right': 'a'}, context_instance=RequestContext(request))