From 3d8f50f484fad214834ed402d5d6d4aaa49396b1 Mon Sep 17 00:00:00 2001
From: Christian Boos <cboos@bct-technology.com>
Date: Sun, 27 Jul 2014 16:14:29 +0200
Subject: [PATCH] Wiki: rework layout for creating new page

---
 trac/htdocs/css/wiki.css           |  4 +++-
 trac/wiki/templates/wiki_view.html | 19 ++++++++++---------
 2 files changed, 13 insertions(+), 10 deletions(-)

diff --git a/trac/htdocs/css/wiki.css b/trac/htdocs/css/wiki.css
index bf33683..b9c4a26 100644
--- a/trac/htdocs/css/wiki.css
+++ b/trac/htdocs/css/wiki.css
@@ -30,6 +30,9 @@
 #pagepath .sep { color: #666; padding: 0 .1em }
 #pagepath .pathentry { float: left }
 
+/* Styles for the page creation form */
+.create #modifypage input { margin: 2px /* trac.css' input {} */ }
+
 /* Styles for the page editing form */
 .preview-right {
  float: right;
@@ -70,7 +73,6 @@
  margin: 1em 0 2em;
  overflow: auto;
 }
-#template { vertical-align: middle; padding-top: 1em; }
 
 /* Diff view */
 #overview .multi { color: #999 }
diff --git a/trac/wiki/templates/wiki_view.html b/trac/wiki/templates/wiki_view.html
index 17405df..96c63eb 100644
--- a/trac/wiki/templates/wiki_view.html
+++ b/trac/wiki/templates/wiki_view.html
@@ -38,7 +38,7 @@
   </head>
 
   <body>
-    <div id="content" class="wiki">
+    <div id="content" class="${classes('wiki', create=not page.exists)}">
 
       <py:if test="version">
         <br />
@@ -72,13 +72,7 @@
           </div>
         </py:when>
         <py:otherwise>
-          <p i18n:msg="name">The page ${name_of(page.resource)} does not exist. You can create it here.</p>
-          <py:if test="higher">
-            <p>You could also create the same page higher in the hierarchy:</p>
-            <ul>
-              <li py:for="markup in higher">${markup}</li>
-            </ul>
-          </py:if>
+          <p i18n:msg="name">The page <strong>${name_of(page.resource)}</strong> does not exist. You can create it here.</p>
         </py:otherwise>
       </div>
 
@@ -104,7 +98,7 @@
                     <py:when test="not page.exists and create_perm">
                       <input type="submit" value="${_('Create this page')}" accesskey="e" />
                       <div py:if="templates" id="template">
-                        <label for="template">Using the template:</label>
+                        <label for="template">using the template:</label>
                         <select name="template">
                           <option selected="${not default_template in templates or None}"
                                   value="">(blank page)</option>
@@ -140,6 +134,13 @@
         </py:if>
       </py:with>
 
+      <div class="wikipage searchable" py:if="not page.exists and higher">
+        <p>You could also create the same page higher in the hierarchy:</p>
+        <ul>
+          <li py:for="markup in higher">${markup}</li>
+        </ul>
+      </div>
+
       <div class="wikipage searchable" py:if="not page.exists and related">
         <p>The following pages have a name similar to this page, and may be related:</p>
         <ul>
-- 
1.8.4.5

