From: Radek Czajka Date: Wed, 29 Aug 2012 10:36:21 +0000 (+0200) Subject: admin preview, X-Git-Url: https://git.mdrn.pl/prawokultury.git/commitdiff_plain/fdc3961121619b598c7782e857362fc4e6a14164?ds=sidebyside admin preview, style: blockquotes and bigger font --- diff --git a/migdal/templates/migdal/entry/entry_detail.html b/migdal/templates/migdal/entry/entry_detail.html index 990d7f4..1f322be 100755 --- a/migdal/templates/migdal/entry/entry_detail.html +++ b/migdal/templates/migdal/entry/entry_detail.html @@ -10,6 +10,10 @@ {% block "body" %} +{% if not entry.published %} +

{% trans "This entry hasn't been published yet." %}

+{% endif %} +
diff --git a/migdal/views.py b/migdal/views.py index 1ece4cc..84cd6fe 100644 --- a/migdal/views.py +++ b/migdal/views.py @@ -45,8 +45,9 @@ def entry_list(request, type_db=None, category_slug=None): def entry(request, type_db, slug): lang = request.LANGUAGE_CODE - args = {'type': type_db, 'slug_%s' % lang: slug, 'published_%s' % lang: True} - # TODO: preview for admins + args = {'type': type_db, 'slug_%s' % lang: slug} + if not request.user.has_perm('migdal.change_entry'): + args['published_%s' % lang] = True entry = get_object_or_404(Entry, **args) templates = ["migdal/entry/entry_detail.html"] diff --git a/prawokultury/static/css/base.css b/prawokultury/static/css/base.css index d52e8eb..615e005 100644 --- a/prawokultury/static/css/base.css +++ b/prawokultury/static/css/base.css @@ -22,3 +22,9 @@ h1 { margin: 0 0 .5em 0; color: #01519a; font-size: 2em; } + +.warning { + border: 1px solid #ddd; + padding: 1em; + background: #ffd; + font-size: 1.3em; } diff --git a/prawokultury/static/css/base.scss b/prawokultury/static/css/base.scss index 9fd624e..01723b1 100644 --- a/prawokultury/static/css/base.scss +++ b/prawokultury/static/css/base.scss @@ -28,3 +28,11 @@ h1 { color: #01519a; font-size: 2em; } + + +.warning { + border: 1px solid #ddd; + padding: 1em; + background: #ffd; + font-size: 1.3em; +} diff --git a/prawokultury/static/css/entry.css b/prawokultury/static/css/entry.css index 6c19bf1..d3a9a5e 100644 --- a/prawokultury/static/css/entry.css +++ b/prawokultury/static/css/entry.css @@ -13,13 +13,13 @@ .entry-wrapped h1, .entry-wrapped h2 { margin: 0; color: #01519a; - font-size: 1.2em; } + font-size: 1.3em; } .entry-wrapped h1 a, .entry-wrapped h2 a { color: #01519a; } .entry-wrapped h2.section { margin: 2em 0; } .entry-wrapped .entry-data { - font-size: 1.2em; + font-size: 1.3em; margin-top: 1.4em; margin-bottom: 1.4em; } .entry-wrapped .entry-data .date { @@ -31,13 +31,13 @@ .entry-wrapped .entry-data .categories a { color: black; } .entry-wrapped .lead { - font-size: 1.2em; } + font-size: 1.3em; } .entry-wrapped .body { - font-size: 1.2em; } + font-size: 1.3em; } .entry-wrapped .more { clear: both; float: right; - font-size: 1.2em; + font-size: 1.3em; font-style: italic; margin-top: .6em; margin-bottom: 1.8em; } @@ -70,7 +70,7 @@ border-bottom: 1px solid #8b8b87; } .submit-link a { color: black; - font-size: 1.2em; } + font-size: 1.3em; } .submit-link a:before { content: url("/static/img/plus.png"); vertical-align: top; @@ -81,7 +81,7 @@ .comments .comment-form { border-top: 1px solid #494948; } .comments .comment-data { - font-size: 1.2em; + font-size: 1.3em; margin-top: 1.4em; margin-bottom: 1.4em; } .comments .comment-data .comment-date { @@ -89,4 +89,4 @@ .comments .comment-data .comment-author { font-weight: bold; } .comments .body { - font-size: 1.2em; } + font-size: 1.3em; } diff --git a/prawokultury/static/css/entry.scss b/prawokultury/static/css/entry.scss index e6b5056..5ce77cb 100644 --- a/prawokultury/static/css/entry.scss +++ b/prawokultury/static/css/entry.scss @@ -18,7 +18,7 @@ h1, h2 { margin: 0; color: #01519a; - font-size: 1.2em; + font-size: 1.3em; a { color: #01519a; @@ -30,7 +30,7 @@ } .entry-data { - font-size: 1.2em; + font-size: 1.3em; margin-top: 1.4em; margin-bottom: 1.4em; .date { @@ -48,17 +48,24 @@ } .lead { - font-size: 1.2em; + font-size: 1.3em; } .body { - font-size: 1.2em; + font-size: 1.3em; + } + + blockquote { + position:relative; + left:1em; + font-style:italic; + margin-left: 1em; } .more { clear: both; float: right; - font-size: 1.2em; + font-size: 1.3em; font-style: italic; margin-top: .6em; margin-bottom: 1.8em; @@ -101,7 +108,7 @@ a { color: black; - font-size: 1.2em; + font-size: 1.3em; } a:before { content: url("/static/img/plus.png"); @@ -119,7 +126,7 @@ } .comment-data { - font-size: 1.2em; + font-size: 1.3em; margin-top: 1.4em; margin-bottom: 1.4em; .comment-date { @@ -131,6 +138,6 @@ } .body { - font-size: 1.2em; + font-size: 1.3em; } }