From 8f784edce131def7694be3b79e99ad3937c8580d Mon Sep 17 00:00:00 2001
From: Xavier Morel <xmo@openerp.com>
Date: Mon, 17 Nov 2014 16:10:06 +0100
Subject: [PATCH] [IMP] doc: rename WS page, lift to top-level

---
 doc/_themes/odoodoc/sphinx_monkeypatch.py |  4 +++
 doc/_themes/odoodoc/static/style.css      |  4 +--
 doc/_themes/odoodoc/static/style.less     | 30 ++++++++++++-----------
 doc/{modules => }/api_integration.rst     |  2 +-
 doc/index.rst                             |  2 +-
 doc/modules.rst                           |  8 ------
 6 files changed, 24 insertions(+), 26 deletions(-)
 rename doc/{modules => }/api_integration.rst (99%)
 delete mode 100644 doc/modules.rst

diff --git a/doc/_themes/odoodoc/sphinx_monkeypatch.py b/doc/_themes/odoodoc/sphinx_monkeypatch.py
index 94e063e1f44b..182fef89c8d0 100644
--- a/doc/_themes/odoodoc/sphinx_monkeypatch.py
+++ b/doc/_themes/odoodoc/sphinx_monkeypatch.py
@@ -48,6 +48,10 @@ def navbarify(node, navbar=None):
             #             list_item
             #                 compact_paragraph
             #                     reference
+            # no bullet_list.list_item -> don't dropdownify
+            if not list_item.children[1].children:
+                return
+
             list_item['classes'].append('dropdown')
             # list_item.compact_paragraph.reference
             link = list_item.children[0].children[0]
diff --git a/doc/_themes/odoodoc/static/style.css b/doc/_themes/odoodoc/static/style.css
index 2a1ffc31f842..9e4fdf007645 100644
--- a/doc/_themes/odoodoc/static/style.css
+++ b/doc/_themes/odoodoc/static/style.css
@@ -6296,7 +6296,7 @@ body {
   -o-transition: all 0.3s ease-out;
   transition: all 0.3s ease-out;
 }
-.docs-nav .navbar-nav > li > a:after {
+.docs-nav .navbar-nav > li.dropdown > a:after {
   content: " ";
   display: inline-block;
   width: 0;
@@ -6307,7 +6307,7 @@ body {
   border-right: 4px solid transparent;
   border-left: 4px solid transparent;
 }
-.docs-nav .navbar-nav > li .dropdown-menu > li.current > a.current {
+.docs-nav .navbar-nav > li.dropdown .dropdown-menu > li.current > a.current {
   background-color: #a24689;
   color: white;
 }
diff --git a/doc/_themes/odoodoc/static/style.less b/doc/_themes/odoodoc/static/style.less
index 1b71b6aaebc2..0804506a3dec 100644
--- a/doc/_themes/odoodoc/static/style.less
+++ b/doc/_themes/odoodoc/static/style.less
@@ -89,20 +89,22 @@ body {
       opacity: 0;
       .transition(all 0.3s ease-out);
     }
-    > a:after {
-      content: " ";
-      display: inline-block;
-      width: 0;
-      height: 0;
-      margin-left: 5px;
-      vertical-align: middle;
-      border-top: 4px solid @gray-light;
-      border-right: 4px solid transparent;
-      border-left: 4px solid transparent;
-    }
-    .dropdown-menu > li.current > a.current {
-      background-color: @brand-primary;
-      color: white;
+    &.dropdown {
+      > a:after {
+        content: " ";
+        display: inline-block;
+        width: 0;
+        height: 0;
+        margin-left: 5px;
+        vertical-align: middle;
+        border-top: 4px solid @gray-light;
+        border-right: 4px solid transparent;
+        border-left: 4px solid transparent;
+      }
+      .dropdown-menu > li.current > a.current {
+        background-color: @brand-primary;
+        color: white;
+      }
     }
   }
   /* version switcher */
diff --git a/doc/modules/api_integration.rst b/doc/api_integration.rst
similarity index 99%
rename from doc/modules/api_integration.rst
rename to doc/api_integration.rst
index 21d0163ba469..725c69c6bb42 100644
--- a/doc/modules/api_integration.rst
+++ b/doc/api_integration.rst
@@ -1,7 +1,7 @@
 :classes: stripe
 
 ===========
-Odoo as API
+Web Service
 ===========
 
 Odoo is mostly extended internally via modules, but much of its features and
diff --git a/doc/index.rst b/doc/index.rst
index 2f26c3abaa56..56f58b6aa0d4 100644
--- a/doc/index.rst
+++ b/doc/index.rst
@@ -14,7 +14,7 @@ Welcome to the Odoo developer documentation.
 
     tutorials
     reference
-    modules
+    api_integration
 
 .. ifconfig:: todo_include_todos
 
diff --git a/doc/modules.rst b/doc/modules.rst
deleted file mode 100644
index cb5ed8d6ca15..000000000000
--- a/doc/modules.rst
+++ /dev/null
@@ -1,8 +0,0 @@
-==============
-Module Objects
-==============
-
-.. toctree::
-    :titlesonly:
-
-    modules/api_integration
-- 
GitLab