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"
#: 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"

View File

@ -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'))
]

View File

@ -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'

View File

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

View File

@ -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;

View File

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

View File

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

View File

@ -31,7 +31,7 @@ is just a bit different.
<div class="flex_item">
<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 %}
<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.
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)

View File

@ -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)