summaryrefslogtreecommitdiff
path: root/doc/_themes/odoodoc/sphinx_monkeypatch.py
diff options
context:
space:
mode:
authorXavier Morel <xmo@odoo.com>2015-02-16 09:44:19 +0100
committerXavier Morel <xmo@odoo.com>2015-02-16 09:44:33 +0100
commiteac831f45b5f27d8532ef0fb20e206a9fbad41bd (patch)
treee4d5dede0c2c8bbc7390fdeed98bd4e13d6c4c8b /doc/_themes/odoodoc/sphinx_monkeypatch.py
parent9ffa3a5c15fbb1c665fed78e9040ecc658a5082f (diff)
[IMP] doc: allow force-right sections, removing bootstrap class from tables
Diffstat (limited to 'doc/_themes/odoodoc/sphinx_monkeypatch.py')
-rw-r--r--doc/_themes/odoodoc/sphinx_monkeypatch.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/doc/_themes/odoodoc/sphinx_monkeypatch.py b/doc/_themes/odoodoc/sphinx_monkeypatch.py
index 182fef89c8d..5bce9c9a155 100644
--- a/doc/_themes/odoodoc/sphinx_monkeypatch.py
+++ b/doc/_themes/odoodoc/sphinx_monkeypatch.py
@@ -68,8 +68,13 @@ def visit_table(self, node):
self._table_row_index = 0
self.context.append(self.compact_p)
self.compact_p = True
- classes = ' '.join({'table', self.settings.table_style}).strip()
- self.body.append(self.starttag(node, 'table', CLASS=classes))
+
+ classes = {self.settings.table_style}
+ node_classes = node.get('classes', [])
+ if 'no-table' in node_classes: node_classes.remove('no-table')
+ else: classes.add('table')
+
+ self.body.append(self.starttag(node, 'table', CLASS=' '.join(classes).strip()))
def starttag_data(self, node, tagname, suffix='\n', empty=False, **attributes):
attributes.update(