From 7d73b712d455d605372e2490b6eaeff15468042a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Mon, 12 Mar 2018 12:07:31 +0100 Subject: [PATCH] misc: adapt sidebar to native gadjo sidebar (#22440) --- combo/manager/static/css/combo.manager.css | 13 ++----------- combo/manager/templates/combo/page_view.html | 12 +++++++----- data/themes/gadjo/static/css/agent-portal.css | 11 ----------- .../templates/combo/page_template_sidebar.html | 8 +++----- tests/test_manager.py | 4 ++-- 5 files changed, 14 insertions(+), 34 deletions(-) diff --git a/combo/manager/static/css/combo.manager.css b/combo/manager/static/css/combo.manager.css index ebd6987..abb6162 100644 --- a/combo/manager/static/css/combo.manager.css +++ b/combo/manager/static/css/combo.manager.css @@ -2,18 +2,9 @@ div#meta { margin-bottom: 1em; } -div#sidebar { - width: 20em; - float: left; -} - -div#page-content { - padding-left: 22em; - min-height: 5em; -} - div.page-options label { display: block; + font-weight: bold; } div.placeholder { @@ -372,5 +363,5 @@ span.extra-info { } img.page-picture { - max-width: 95%; + max-width: 100%; } diff --git a/combo/manager/templates/combo/page_view.html b/combo/manager/templates/combo/page_view.html index 7b4eb44..7369d37 100644 --- a/combo/manager/templates/combo/page_view.html +++ b/combo/manager/templates/combo/page_view.html @@ -15,12 +15,11 @@ {% trans 'Page' %} - {{object.title }} {% endblock %} -{% block content %} - - + +{% endblock %} {# sidebar #} + +{% block content %}
diff --git a/data/themes/gadjo/static/css/agent-portal.css b/data/themes/gadjo/static/css/agent-portal.css index 8d6ebd2..f45f8d8 100644 --- a/data/themes/gadjo/static/css/agent-portal.css +++ b/data/themes/gadjo/static/css/agent-portal.css @@ -1,14 +1,3 @@ -body.with-sidebar div#main-content { - width: 70%; -} - -body.with-sidebar div#sidebar { - float: right; - width: 23%; - margin-right: 2%; - color: #666; -} - div.welcome { border: 1px solid #e4e4e4; background: #fcfcfc; diff --git a/data/themes/gadjo/templates/combo/page_template_sidebar.html b/data/themes/gadjo/templates/combo/page_template_sidebar.html index 9cba816..3a7631c 100644 --- a/data/themes/gadjo/templates/combo/page_template_sidebar.html +++ b/data/themes/gadjo/templates/combo/page_template_sidebar.html @@ -1,8 +1,6 @@ {% extends "combo/page_template.html" %} {% load combo i18n %} -{% block bodyargs %}{{ block.super }} class="with-sidebar"{% endblock %} - {% block combo-content %}
{% trans "Content" as name %} @@ -10,9 +8,9 @@
{% endblock %} -{% block after-main-content %} - + {% endblock %} diff --git a/tests/test_manager.py b/tests/test_manager.py index 94b4f3c..dff1b33 100644 --- a/tests/test_manager.py +++ b/tests/test_manager.py @@ -690,7 +690,7 @@ def test_page_cell_placeholder(app, admin_user): resp = app.get('/manage/pages/%s/' % page.id) assert re.findall('data-placeholder-key="(.*)">', resp.body) == ['content', 'foobar', 'footer'] assert re.findall('

(.*)

', resp.body) == [ - 'Page - One', 'Parameters', 'Content', 'JSON Feed / Foobar', 'Footer'] + 'Page - One', 'Content', 'JSON Feed / Foobar', 'Footer'] def test_page_familycell_placeholder(app, admin_user): page = Page(title='My family', slug='my-family', template_name='standard') @@ -702,7 +702,7 @@ def test_page_familycell_placeholder(app, admin_user): resp = app.get('/manage/pages/%s/' % page.id) assert re.findall('data-placeholder-key="(.*)">', resp.body) == ['content', "family_unlinked_user", "footer"] assert re.findall('

(.*)

', resp.body) == [ - 'Page - My family', 'Parameters', 'Content', + 'Page - My family', 'Content', 'Family Information Cell / Top content for unlinked users', 'Footer'] def test_page_discover_placeholder_with_error_cells(app, admin_user): -- 2.17.0