From e7700a3896340efa3c82fd26c7e9219ad57a257f Mon Sep 17 00:00:00 2001 From: bkfox Date: Mon, 15 May 2017 16:52:58 +0200 Subject: [PATCH] rename summary to headline --- aircox_cms/locale/fr/LC_MESSAGES/django.mo | Bin 17718 -> 17718 bytes aircox_cms/locale/fr/LC_MESSAGES/django.po | 8 ++++---- aircox_cms/models.py | 8 ++++---- aircox_cms/sections.py | 4 ++-- aircox_cms/static/aircox_cms/css/layout.css | 2 +- aircox_cms/static/aircox_cms/css/theme.css | 6 +++--- .../aircox_cms/dynamic_list_page.html | 4 ++-- .../templates/aircox_cms/publication.html | 10 +++++----- .../aircox_cms/snippets/date_list_item.html | 2 +- .../aircox_cms/snippets/list_item.html | 2 +- aircox_cms/wagtail_hooks.py | 8 ++++---- 11 files changed, 27 insertions(+), 27 deletions(-) diff --git a/aircox_cms/locale/fr/LC_MESSAGES/django.mo b/aircox_cms/locale/fr/LC_MESSAGES/django.mo index 64fdbcff5616f1e256b048aaa5f25a03841989bc..cacd85691f0b0d10fa9e3d0eeb9e34861160db50 100644 GIT binary patch delta 3274 zcmY+`e^ky_0LStBjEH*rDOA!^v{Y)ejI;=4wu!Sd8S}?PAzDfKIXt3G^4lX5+2%(~ z&X7hN%sRvTwlQbsoY`!1=#OoOu{ql@dw+Vq&S~FsKE3Y!{<`;j@BMzC4prC=RoM0q zZ{_qf#vBMSCKQii8~hgA<4tUhO*jC5!yt_3@imm8s2fM4 z8csmncoec+%nH=?yHM91LrvKwe4h5rcNEl9J6FpfRENT_6UJj}%)s9GidCPFe$-1* z=dVMa#cV?@u2a|(A0V@7A{hUUI0)l#48BhLri_Ay`Z{{x9c+caq8hx1dh%}3?uHhi zI=T|ofl9oEJ5kq{vqH59SE1I%X4IOfLp{(@WIdXzm_YmHK7~;>ddLD8Mtv6Vlvd{n zR73xw7FQd(ts8`38%#tEWisl#bX3E`QEOtXwSO{d1Pf93DM77)a&)R^n3q1#HI0!zY1&E zp(m(9&CyoW&>coya0%6stEd})kDc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fe+N>-`wl z;s@ICzipBAb4a4!t5%dVCTgR7jA1vY$w#D~6j+(g2*(0Sn%+{f*~)V!W-g(mZIutR z5Vb&Nkzlfv{D1qH9dD6FqD6F)yhL_eSDY!1#gw!SCNElXt`1QaB`u~?PP7z@$P_Y^Y$8vSO46HbA^9Yk z>>=~?VL3t}o#;j5z4HDYZO1oA4#^_#l47!fB$8ONi&T+9t9NL8<};MExxK%>#rw8h zo{tB}IlCTU`!bf1S4aYRj%1K!Rz+yvq~(-cWF5JGtDw?w-;VV)fvxri)Le)j(=sGK zH#d9UVl&^Tb+Bz%P3MFNXU+5;8NnUqov7l#i7Ioi;GR0oJuBNiH-GZ1oGIB0a^}pg JsY);L{|}oCaNGa@ diff --git a/aircox_cms/locale/fr/LC_MESSAGES/django.po b/aircox_cms/locale/fr/LC_MESSAGES/django.po index 09577be..e2e4411 100755 --- a/aircox_cms/locale/fr/LC_MESSAGES/django.po +++ b/aircox_cms/locale/fr/LC_MESSAGES/django.po @@ -253,12 +253,12 @@ msgid "image to use as cover of the publication" msgstr "image à utiliser comme couverture de la publication" #: models.py:274 -msgid "summary" -msgstr "résumé" +msgid "headline" +msgstr "entête" #: models.py:276 -msgid "summary of the publication" -msgstr "résumé de la publication" +msgid "headline of the publication" +msgstr "entête de la publication" #: models.py:286 models.py:287 msgid "Publication" diff --git a/aircox_cms/models.py b/aircox_cms/models.py index 82d6bb0..0688338 100755 --- a/aircox_cms/models.py +++ b/aircox_cms/models.py @@ -275,10 +275,10 @@ class Publication(Page): related_name='+', help_text = _('image to use as cover of the publication'), ) - summary = models.TextField( - _('summary'), + headline = models.TextField( + _('headline'), blank = True, null = True, - help_text = _('summary of the publication'), + help_text = _('headline of the publication'), ) tags = ClusterTaggableManager( verbose_name = _('tags'), @@ -294,7 +294,7 @@ class Publication(Page): MultiFieldPanel([ FieldPanel('title'), ImageChooserPanel('cover'), - FieldPanel('summary'), + FieldPanel('headline'), FieldPanel('body', classname='full'), ], heading=_('Content')) ] diff --git a/aircox_cms/sections.py b/aircox_cms/sections.py index 74c0d87..ebc3f44 100755 --- a/aircox_cms/sections.py +++ b/aircox_cms/sections.py @@ -64,7 +64,7 @@ class ListItem: on Publication. """ title = '' - summary = '' + headline = '' url = '' cover = None date = None @@ -899,7 +899,7 @@ class SectionLogsList(SectionItem): artist = related.artist, title = related.title, ), - summary = related.info, + headline = related.info, date = log.date, info = '♫', css_class = 'track' diff --git a/aircox_cms/static/aircox_cms/css/layout.css b/aircox_cms/static/aircox_cms/css/layout.css index 3e095b1..5f66ad8 100755 --- a/aircox_cms/static/aircox_cms/css/layout.css +++ b/aircox_cms/static/aircox_cms/css/layout.css @@ -430,7 +430,7 @@ main .body ~ section:not(.comments) { display: inline-block; } -.meta .author .summary { +.meta .author .headline { display: none; } diff --git a/aircox_cms/static/aircox_cms/css/theme.css b/aircox_cms/static/aircox_cms/css/theme.css index dffced3..9b43acf 100755 --- a/aircox_cms/static/aircox_cms/css/theme.css +++ b/aircox_cms/static/aircox_cms/css/theme.css @@ -119,7 +119,7 @@ main.detail { } main.detail > header h1.title, - main.detail > header .summary { + main.detail > header .headline { display: block; padding: 0.4em; vertical-align: middle; @@ -127,7 +127,7 @@ main.detail { } main.detail > header:hover h1.title, - main.detail > header:hover .summary { + main.detail > header:hover .headline { opacity: 0.0; transition: opacity 1.5s 1s; } @@ -145,7 +145,7 @@ main.detail { margin-top: 2em; } - main.detail header .summary { + main.detail header .headline { display: inline-block; width: calc(100% - 0.8em); min-height: 1.2em; diff --git a/aircox_cms/templates/aircox_cms/dynamic_list_page.html b/aircox_cms/templates/aircox_cms/dynamic_list_page.html index 2364b79..fff1a25 100755 --- a/aircox_cms/templates/aircox_cms/dynamic_list_page.html +++ b/aircox_cms/templates/aircox_cms/dynamic_list_page.html @@ -29,9 +29,9 @@ {% block content %} {% with related=list_selector.filter_related %} {% if related %} -
+
{% image related.cover fill-128x128 class="cover item_cover" %} - {{ related.summary }} + {{ related.headline }} {% trans "More about it" %}
{% elif page.body %} diff --git a/aircox_cms/templates/aircox_cms/publication.html b/aircox_cms/templates/aircox_cms/publication.html index 85d6e87..bc7cf04 100755 --- a/aircox_cms/templates/aircox_cms/publication.html +++ b/aircox_cms/templates/aircox_cms/publication.html @@ -16,9 +16,9 @@ {% endif %} -
- {% if page.summary %} - {{ page.summary }} +
+ {% if page.headline %} + {{ page.headline }} {% else %} {{ page.body|truncatewords:24|richtext }} {% endif %} @@ -30,8 +30,8 @@ {% block content %} {% if object_list %} {# list view #} -
- {{ page.summary }} +
+ {{ page.headline }} {% trans "Go back to the publication" %}
diff --git a/aircox_cms/templates/aircox_cms/snippets/date_list_item.html b/aircox_cms/templates/aircox_cms/snippets/date_list_item.html index d7f2e64..7621501 100755 --- a/aircox_cms/templates/aircox_cms/snippets/date_list_item.html +++ b/aircox_cms/templates/aircox_cms/snippets/date_list_item.html @@ -31,7 +31,7 @@ is just a bit different.

{{ item.title }}

- {% if item.summary %}
{{ item.summary }}
{% endif %} + {% if item.headline %}
{{ item.headline }}
{% endif %} {% if item.info %} {{ item.info|safe }} diff --git a/aircox_cms/templates/aircox_cms/snippets/list_item.html b/aircox_cms/templates/aircox_cms/snippets/list_item.html index 97483bc..36a121d 100755 --- a/aircox_cms/templates/aircox_cms/snippets/list_item.html +++ b/aircox_cms/templates/aircox_cms/snippets/list_item.html @@ -3,7 +3,7 @@ Configurable item to be put in a list. Support standard Publication or ListItem instance. Options: -* item: item to render. Fields: title, summary, cover, url, date, info, css_class +* item: item to render. Fields: title, headline, cover, url, date, info, css_class * item_date_format: format passed to the date filter instead of default one. If it is an empty string, do not print the date. * item_big_cover: cover should is big instead of thumbnail (width: 600) diff --git a/aircox_cms/wagtail_hooks.py b/aircox_cms/wagtail_hooks.py index 3f7f537..de89a2f 100755 --- a/aircox_cms/wagtail_hooks.py +++ b/aircox_cms/wagtail_hooks.py @@ -175,11 +175,11 @@ class TodayMenu(GenericMenu): qs = PageRevision.objects.filter(page = item.page.first()) if qs.count(): - summary = qs.latest('created_at').content_json - summary = json.loads(summary).get('summary') - attrs['title'] = summary + headline = qs.latest('created_at').content_json + headline = json.loads(headline).get('headline') + attrs['title'] = headline else: - summary = '' + headline = '' return MenuItem(label, self.page_url(item), attrs = attrs)