From 62dd4e92f7fd1a23548f39dc4570cc34dc33b05a Mon Sep 17 00:00:00 2001 From: martimiz Date: Thu, 8 Nov 2012 16:24:20 +0100 Subject: [PATCH] Relocate breadcrumbs to the top of the document Remove breadcrumbs from the searchbar to the top of the page content, and make sure they only display if there is more then the current link. Wrap the module and version selectors to fill the gap in the searchbar. --- code/controllers/DocumentationViewer.php | 2 +- css/DocumentationViewer.css | 5 ++- templates/DocumentationViewer.ss | 42 +++++++++---------- templates/Includes/DocBreadcrumbs.ss | 4 +- templates/Layout/DocumentationViewer.ss | 3 ++ .../Layout/DocumentationViewer_folder.ss | 3 ++ 6 files changed, 34 insertions(+), 25 deletions(-) diff --git a/code/controllers/DocumentationViewer.php b/code/controllers/DocumentationViewer.php index c763e7b..b16cfca 100755 --- a/code/controllers/DocumentationViewer.php +++ b/code/controllers/DocumentationViewer.php @@ -628,7 +628,7 @@ class DocumentationViewer extends Controller { } } - return $output; + return ($output->count() > 1)? $output : ''; } /** diff --git a/css/DocumentationViewer.css b/css/DocumentationViewer.css index 6edfae1..fdcf45e 100644 --- a/css/DocumentationViewer.css +++ b/css/DocumentationViewer.css @@ -105,11 +105,14 @@ fieldset { border: none; } } #footer p a { color: #798D85;} +/* module and version selection */ +#top-nav { float: left; } + /* Search */ #search { float: right; } #search label { display: none; } /* Breadcrumbs */ -#breadcrumbs { float: left; } +#breadcrumbs { float: none; } /* Content */ #layout { } diff --git a/templates/DocumentationViewer.ss b/templates/DocumentationViewer.ss index e311fc5..0a7fc90 100755 --- a/templates/DocumentationViewer.ss +++ b/templates/DocumentationViewer.ss @@ -19,35 +19,33 @@