From eba389bb2fd1174360c5d255bbf53e1d40ab8712 Mon Sep 17 00:00:00 2001
From: Andreas Gohr <gohr@cosmocode.de>
Date: Mon, 9 Feb 2015 17:03:34 +0100
Subject: [PATCH] avoid messages pushing down page tools. fixes #1011

This moves the message area into content div. The pageid is now aligned
by floating instead of absolute positioning.
---
 lib/tpl/dokuwiki/css/design.less | 16 +++++++++-------
 lib/tpl/dokuwiki/detail.php      |  1 +
 lib/tpl/dokuwiki/main.php        |  1 +
 lib/tpl/dokuwiki/tpl_header.php  |  2 +-
 4 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/lib/tpl/dokuwiki/css/design.less b/lib/tpl/dokuwiki/css/design.less
index 66607b5e9..3ded73581 100644
--- a/lib/tpl/dokuwiki/css/design.less
+++ b/lib/tpl/dokuwiki/css/design.less
@@ -11,7 +11,7 @@
 ********************************************************************/
 
 #dokuwiki__header {
-    padding: 2em 0 1.5em;
+    padding: 2em 0 0;
 
     .headings,
     .tools {
@@ -349,11 +349,11 @@ form.search {
 ********************************************************************/
 
 .dokuwiki .pageId {
-    position: absolute;
-    top: -2.3em;
-    right: -1em;
+    float: right;
+    margin-right: -1em;
+    margin-bottom: -1px;
     overflow: hidden;
-    padding: 1em 1em 0;
+    padding: 0.5em 1em 0;
 
     span {
         font-size: 0.875em;
@@ -370,6 +370,7 @@ form.search {
 }
 
 .dokuwiki div.page {
+    clear: both;
     background: @ini_background;
     color: inherit;
     border: 1px solid @ini_background_alt;
@@ -396,8 +397,9 @@ form.search {
 }
 
 [dir=rtl] .dokuwiki .pageId {
-    right: auto;
-    left: -1em;
+    float: left;
+    margin-left: -1em;
+    margin-right: 0;
 }
 
 /* footer
diff --git a/lib/tpl/dokuwiki/detail.php b/lib/tpl/dokuwiki/detail.php
index d4f9c39d1..b27567987 100644
--- a/lib/tpl/dokuwiki/detail.php
+++ b/lib/tpl/dokuwiki/detail.php
@@ -36,6 +36,7 @@ header('X-UA-Compatible: IE=edge,chrome=1');
 
             <!-- ********** CONTENT ********** -->
             <div id="dokuwiki__content"><div class="pad group">
+                <?php html_msgarea() ?>
 
                 <?php if(!$ERROR): ?>
                     <div class="pageId"><span><?php echo hsc(tpl_img_getTag('IPTC.Headline',$IMG)); ?></span></div>
diff --git a/lib/tpl/dokuwiki/main.php b/lib/tpl/dokuwiki/main.php
index 10c0bf91e..165230e8a 100644
--- a/lib/tpl/dokuwiki/main.php
+++ b/lib/tpl/dokuwiki/main.php
@@ -49,6 +49,7 @@ $showSidebar = $hasSidebar && ($ACT=='show');
 
             <!-- ********** CONTENT ********** -->
             <div id="dokuwiki__content"><div class="pad group">
+                <?php html_msgarea() ?>
 
                 <div class="pageId"><span><?php echo hsc($ID) ?></span></div>
 
diff --git a/lib/tpl/dokuwiki/tpl_header.php b/lib/tpl/dokuwiki/tpl_header.php
index 7d9c88347..ee51cbd01 100644
--- a/lib/tpl/dokuwiki/tpl_header.php
+++ b/lib/tpl/dokuwiki/tpl_header.php
@@ -85,7 +85,7 @@ if (!defined('DOKU_INC')) die();
         </div>
     <?php endif ?>
 
-    <?php html_msgarea() ?>
+
 
     <hr class="a11y" />
 </div></div><!-- /header -->
-- 
GitLab