From 557f8bbbfe6a4cba5511c6e14c469f064ed70ad6 Mon Sep 17 00:00:00 2001 From: James Vasile Date: Fri, 8 Feb 2013 15:22:43 -0500 Subject: [PATCH] Make template handle columns, stop using many different versions * adjust template to remove nav and top menu for first boot * base on login_nav.tmpl * add login and nav to template * no need for two_cols, don't populate nav unless one exists --- templates/base.tmpl | 46 ++++++++++++++++------------------------ templates/err.tmpl | 2 +- templates/login_nav.tmpl | 31 +++++++++++++++++++++++++++ util.py | 9 ++++---- 4 files changed, 55 insertions(+), 33 deletions(-) create mode 100644 templates/login_nav.tmpl diff --git a/templates/base.tmpl b/templates/base.tmpl index 5a37f537b..08443b0bc 100644 --- a/templates/base.tmpl +++ b/templates/base.tmpl @@ -118,17 +118,8 @@ FreedomBoxFreedomBox Dashboard - @@ -136,18 +127,26 @@
+ #if $nav or $sidebar_right or $sidebar_left
+ #if $nav -
+ #end if + #if $sidebar_left + + #end if + #if $sidebar_right + + #end if +
+ #end if
-
+

#block title_block $title @@ -157,15 +156,6 @@ $main #end block main_block

- -
-
- #block sidebar_right_block - $sidebar_right - #end block sidebar_right_block -
-
-
diff --git a/templates/err.tmpl b/templates/err.tmpl index 74dc12cc4..02106184b 100644 --- a/templates/err.tmpl +++ b/templates/err.tmpl @@ -1,4 +1,4 @@ -#extends templates.two_col +#extends templates.login_nav #def title_block Error: $title diff --git a/templates/login_nav.tmpl b/templates/login_nav.tmpl new file mode 100644 index 000000000..05780d05b --- /dev/null +++ b/templates/login_nav.tmpl @@ -0,0 +1,31 @@ +#extends templates.base + +#def add_nav_and_login +