rename summary to headline

This commit is contained in:
bkfox 2017-05-15 16:52:58 +02:00
parent 8cc3caa16b
commit e7700a3896
11 changed files with 27 additions and 27 deletions

View File

@ -253,12 +253,12 @@ msgid "image to use as cover of the publication"
msgstr "image à utiliser comme couverture de la publication" msgstr "image à utiliser comme couverture de la publication"
#: models.py:274 #: models.py:274
msgid "summary" msgid "headline"
msgstr "résumé" msgstr "entête"
#: models.py:276 #: models.py:276
msgid "summary of the publication" msgid "headline of the publication"
msgstr "résumé de la publication" msgstr "entête de la publication"
#: models.py:286 models.py:287 #: models.py:286 models.py:287
msgid "Publication" msgid "Publication"

View File

@ -275,10 +275,10 @@ class Publication(Page):
related_name='+', related_name='+',
help_text = _('image to use as cover of the publication'), help_text = _('image to use as cover of the publication'),
) )
summary = models.TextField( headline = models.TextField(
_('summary'), _('headline'),
blank = True, null = True, blank = True, null = True,
help_text = _('summary of the publication'), help_text = _('headline of the publication'),
) )
tags = ClusterTaggableManager( tags = ClusterTaggableManager(
verbose_name = _('tags'), verbose_name = _('tags'),
@ -294,7 +294,7 @@ class Publication(Page):
MultiFieldPanel([ MultiFieldPanel([
FieldPanel('title'), FieldPanel('title'),
ImageChooserPanel('cover'), ImageChooserPanel('cover'),
FieldPanel('summary'), FieldPanel('headline'),
FieldPanel('body', classname='full'), FieldPanel('body', classname='full'),
], heading=_('Content')) ], heading=_('Content'))
] ]

View File

@ -64,7 +64,7 @@ class ListItem:
on Publication. on Publication.
""" """
title = '' title = ''
summary = '' headline = ''
url = '' url = ''
cover = None cover = None
date = None date = None
@ -899,7 +899,7 @@ class SectionLogsList(SectionItem):
artist = related.artist, artist = related.artist,
title = related.title, title = related.title,
), ),
summary = related.info, headline = related.info,
date = log.date, date = log.date,
info = '', info = '',
css_class = 'track' css_class = 'track'

View File

@ -430,7 +430,7 @@ main .body ~ section:not(.comments) {
display: inline-block; display: inline-block;
} }
.meta .author .summary { .meta .author .headline {
display: none; display: none;
} }

View File

@ -119,7 +119,7 @@ main.detail {
} }
main.detail > header h1.title, main.detail > header h1.title,
main.detail > header .summary { main.detail > header .headline {
display: block; display: block;
padding: 0.4em; padding: 0.4em;
vertical-align: middle; vertical-align: middle;
@ -127,7 +127,7 @@ main.detail {
} }
main.detail > header:hover h1.title, main.detail > header:hover h1.title,
main.detail > header:hover .summary { main.detail > header:hover .headline {
opacity: 0.0; opacity: 0.0;
transition: opacity 1.5s 1s; transition: opacity 1.5s 1s;
} }
@ -145,7 +145,7 @@ main.detail {
margin-top: 2em; margin-top: 2em;
} }
main.detail header .summary { main.detail header .headline {
display: inline-block; display: inline-block;
width: calc(100% - 0.8em); width: calc(100% - 0.8em);
min-height: 1.2em; min-height: 1.2em;

View File

@ -29,9 +29,9 @@
{% block content %} {% block content %}
{% with related=list_selector.filter_related %} {% with related=list_selector.filter_related %}
{% if related %} {% if related %}
<div class="body summary"> <div class="body headline">
{% image related.cover fill-128x128 class="cover item_cover" %} {% image related.cover fill-128x128 class="cover item_cover" %}
{{ related.summary }} {{ related.headline }}
<a href="{{ related.url }}">{% trans "More about it" %}</a> <a href="{{ related.url }}">{% trans "More about it" %}</a>
</div> </div>
{% elif page.body %} {% elif page.body %}

View File

@ -16,9 +16,9 @@
</span> </span>
{% endif %} {% endif %}
<section class="summary"> <section class="headline">
{% if page.summary %} {% if page.headline %}
{{ page.summary }} {{ page.headline }}
{% else %} {% else %}
{{ page.body|truncatewords:24|richtext }} {{ page.body|truncatewords:24|richtext }}
{% endif %} {% endif %}
@ -30,8 +30,8 @@
{% block content %} {% block content %}
{% if object_list %} {% if object_list %}
{# list view #} {# list view #}
<section class="body summary"> <section class="body headline">
{{ page.summary }} {{ page.headline }}
<a href="?" class="go_back float_right">{% trans "Go back to the publication" %}</a> <a href="?" class="go_back float_right">{% trans "Go back to the publication" %}</a>
</section> </section>

View File

@ -31,7 +31,7 @@ is just a bit different.
<div class="flex_item"> <div class="flex_item">
<h3 class="title">{{ item.title }}</h3> <h3 class="title">{{ item.title }}</h3>
{% if item.summary %}<div class="summary">{{ item.summary }}</div>{% endif %} {% if item.headline %}<div class="headline">{{ item.headline }}</div>{% endif %}
{% if item.info %} {% if item.info %}
<span class="info">{{ item.info|safe }}</span> <span class="info">{{ item.info|safe }}</span>

View File

@ -3,7 +3,7 @@ Configurable item to be put in a list. Support standard Publication or
ListItem instance. ListItem instance.
Options: 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 * item_date_format: format passed to the date filter instead of default one. If
it is an empty string, do not print the date. it is an empty string, do not print the date.
* item_big_cover: cover should is big instead of thumbnail (width: 600) * item_big_cover: cover should is big instead of thumbnail (width: 600)

View File

@ -175,11 +175,11 @@ class TodayMenu(GenericMenu):
qs = PageRevision.objects.filter(page = item.page.first()) qs = PageRevision.objects.filter(page = item.page.first())
if qs.count(): if qs.count():
summary = qs.latest('created_at').content_json headline = qs.latest('created_at').content_json
summary = json.loads(summary).get('summary') headline = json.loads(headline).get('headline')
attrs['title'] = summary attrs['title'] = headline
else: else:
summary = '' headline = ''
return MenuItem(label, self.page_url(item), attrs = attrs) return MenuItem(label, self.page_url(item), attrs = attrs)