From 818c1d0e8bb535558725da5856591c5d567e35aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Mon, 30 Nov 2015 10:28:48 +0100 Subject: [PATCH] kb: style warning notice on old revisions --- welco/kb/templates/kb/page_version.html | 2 ++ welco/static/css/style.css | 28 +++++++++++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/welco/kb/templates/kb/page_version.html b/welco/kb/templates/kb/page_version.html index 82317ca..106745c 100644 --- a/welco/kb/templates/kb/page_version.html +++ b/welco/kb/templates/kb/page_version.html @@ -9,6 +9,7 @@ {% block content %} +

{% trans 'Warning: this is an old version of this page.' %}

@@ -17,6 +18,7 @@ {% csrf_token %} +
{{block.super}} diff --git a/welco/static/css/style.css b/welco/static/css/style.css index 48fa401..aa8006b 100644 --- a/welco/static/css/style.css +++ b/welco/static/css/style.css @@ -534,3 +534,31 @@ div.counter a.button { div.useful-links { margin-top: 2em; } + +div.warning-notice { + background: #F9DEDE; + margin: 1em 0; + padding: 1em; + padding-left: 4em; + position: relative; + position: relative; +} + +div.warning-notice p { + margin: 0.5ex 0; +} + +div.warning-notice::before { + content: "\f06a"; + font-family: FontAwesome; + font-size: 2em; + position: absolute; + left: 1ex; + top: 0.5ex; +} + +div.old-version.warning-notice form { + position: absolute; + right: 1ex; + top: 1ex; +}