Amélioration rendu à venir
This commit is contained in:
parent
fbed65adcc
commit
13111b2a60
@ -123,8 +123,9 @@ class DayInCalendar:
|
|||||||
result.append((c.name, self.events_by_category[c.name]))
|
result.append((c.name, self.events_by_category[c.name]))
|
||||||
return result
|
return result
|
||||||
|
|
||||||
def build_time_intervals(self, all_day_name, interval_names, interval_markers):
|
def build_time_intervals(self, all_day_name, all_day_short_name, interval_names, interval_short_names, interval_markers):
|
||||||
self.time_intervals = [IntervalInDay(self.date, i, n) for i, n in enumerate([all_day_name] + interval_names)]
|
self.time_intervals = [IntervalInDay(self.date, i, n[0], n[1]) for i, n in
|
||||||
|
enumerate(zip([all_day_name] + interval_names, [all_day_short_name] + interval_short_names))]
|
||||||
|
|
||||||
nm2 = datetime.now() + timedelta(hours=-2)
|
nm2 = datetime.now() + timedelta(hours=-2)
|
||||||
for e in self.events:
|
for e in self.events:
|
||||||
@ -155,16 +156,19 @@ class DayInCalendar:
|
|||||||
name = _date(self.date, "l")
|
name = _date(self.date, "l")
|
||||||
all_day_name = _('All day %s') % name
|
all_day_name = _('All day %s') % name
|
||||||
interval_names = [_('%s morning') % name, _('%s noon') % name, _('%s afternoon') % name, _('%s evening') % name]
|
interval_names = [_('%s morning') % name, _('%s noon') % name, _('%s afternoon') % name, _('%s evening') % name]
|
||||||
|
all_day_short_name = _('All day')
|
||||||
|
interval_short_names = [_('Morning'), _('Noon'), _('Afternoon'), _('Evening')]
|
||||||
interval_markers = [datetime.combine(self.date, time(h, m)) for h, m in [(11, 30), (13, 0), (18, 0)]]
|
interval_markers = [datetime.combine(self.date, time(h, m)) for h, m in [(11, 30), (13, 0), (18, 0)]]
|
||||||
self.build_time_intervals(all_day_name, interval_names, interval_markers)
|
self.build_time_intervals(all_day_name, all_day_short_name, interval_names, interval_short_names, interval_markers)
|
||||||
|
|
||||||
return self.time_intervals
|
return self.time_intervals
|
||||||
|
|
||||||
|
|
||||||
class IntervalInDay(DayInCalendar):
|
class IntervalInDay(DayInCalendar):
|
||||||
|
|
||||||
def __init__(self, d, id, name):
|
def __init__(self, d, id, name, short_name):
|
||||||
self.name = name
|
self.name = name
|
||||||
|
self.short_name = short_name
|
||||||
super().__init__(d)
|
super().__init__(d)
|
||||||
self.id = self.id + '-' + str(id)
|
self.id = self.id + '-' + str(id)
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: agenda_culturel\n"
|
"Project-Id-Version: agenda_culturel\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2024-10-05 15:12+0200\n"
|
"POT-Creation-Date: 2024-10-05 18:53+0200\n"
|
||||||
"PO-Revision-Date: 2023-10-29 14:16+0000\n"
|
"PO-Revision-Date: 2023-10-29 14:16+0000\n"
|
||||||
"Last-Translator: Jean-Marie Favreau <jeanmarie.favreau@free.fr>\n"
|
"Last-Translator: Jean-Marie Favreau <jeanmarie.favreau@free.fr>\n"
|
||||||
"Language-Team: Jean-Marie Favreau <jeanmarie.favreau@free.fr>\n"
|
"Language-Team: Jean-Marie Favreau <jeanmarie.favreau@free.fr>\n"
|
||||||
@ -17,59 +17,79 @@ msgstr ""
|
|||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
|
||||||
#: agenda_culturel/calendar.py:146
|
#: agenda_culturel/calendar.py:149
|
||||||
msgid "All day today"
|
msgid "All day today"
|
||||||
msgstr "Aujourd'hui toute la journée"
|
msgstr "Aujourd'hui toute la journée"
|
||||||
|
|
||||||
#: agenda_culturel/calendar.py:147
|
#: agenda_culturel/calendar.py:150
|
||||||
msgid "This morning"
|
msgid "This morning"
|
||||||
msgstr "Ce matin"
|
msgstr "Ce matin"
|
||||||
|
|
||||||
#: agenda_culturel/calendar.py:147
|
#: agenda_culturel/calendar.py:150
|
||||||
msgid "This noon"
|
msgid "This noon"
|
||||||
msgstr "Ce midi"
|
msgstr "Ce midi"
|
||||||
|
|
||||||
#: agenda_culturel/calendar.py:147
|
#: agenda_culturel/calendar.py:150
|
||||||
msgid "This afternoon"
|
msgid "This afternoon"
|
||||||
msgstr "Cet après-midi"
|
msgstr "Cet après-midi"
|
||||||
|
|
||||||
#: agenda_culturel/calendar.py:147
|
#: agenda_culturel/calendar.py:150
|
||||||
msgid "This evening"
|
msgid "This evening"
|
||||||
msgstr "Ce soir"
|
msgstr "Ce soir"
|
||||||
|
|
||||||
#: agenda_culturel/calendar.py:149
|
#: agenda_culturel/calendar.py:152
|
||||||
msgid "Tomorrow"
|
msgid "Tomorrow"
|
||||||
msgstr "Demain"
|
msgstr "Demain"
|
||||||
|
|
||||||
#: agenda_culturel/calendar.py:150
|
#: agenda_culturel/calendar.py:153
|
||||||
msgid "All day tomorrow"
|
msgid "All day tomorrow"
|
||||||
msgstr "Toute la journée de demain"
|
msgstr "Toute la journée de demain"
|
||||||
|
|
||||||
#: agenda_culturel/calendar.py:151 agenda_culturel/calendar.py:155
|
#: agenda_culturel/calendar.py:154 agenda_culturel/calendar.py:158
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "%s morning"
|
msgid "%s morning"
|
||||||
msgstr "%s matin"
|
msgstr "%s matin"
|
||||||
|
|
||||||
#: agenda_culturel/calendar.py:151 agenda_culturel/calendar.py:155
|
#: agenda_culturel/calendar.py:154 agenda_culturel/calendar.py:158
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "%s noon"
|
msgid "%s noon"
|
||||||
msgstr "%s midi"
|
msgstr "%s midi"
|
||||||
|
|
||||||
#: agenda_culturel/calendar.py:151 agenda_culturel/calendar.py:155
|
#: agenda_culturel/calendar.py:154 agenda_culturel/calendar.py:158
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "%s afternoon"
|
msgid "%s afternoon"
|
||||||
msgstr "%s après-midi"
|
msgstr "%s après-midi"
|
||||||
|
|
||||||
#: agenda_culturel/calendar.py:151 agenda_culturel/calendar.py:155
|
#: agenda_culturel/calendar.py:154 agenda_culturel/calendar.py:158
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "%s evening"
|
msgid "%s evening"
|
||||||
msgstr "%s soir"
|
msgstr "%s soir"
|
||||||
|
|
||||||
#: agenda_culturel/calendar.py:154
|
#: agenda_culturel/calendar.py:157
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "All day %s"
|
msgid "All day %s"
|
||||||
msgstr "Toute la journée de %s"
|
msgstr "Toute la journée de %s"
|
||||||
|
|
||||||
|
#: agenda_culturel/calendar.py:159
|
||||||
|
msgid "All day"
|
||||||
|
msgstr "Toute la journée"
|
||||||
|
|
||||||
|
#: agenda_culturel/calendar.py:160
|
||||||
|
msgid "Morning"
|
||||||
|
msgstr "Matin"
|
||||||
|
|
||||||
|
#: agenda_culturel/calendar.py:160
|
||||||
|
msgid "Noon"
|
||||||
|
msgstr "Midi"
|
||||||
|
|
||||||
|
#: agenda_culturel/calendar.py:160
|
||||||
|
msgid "Afternoon"
|
||||||
|
msgstr "Après-midi"
|
||||||
|
|
||||||
|
#: agenda_culturel/calendar.py:160
|
||||||
|
msgid "Evening"
|
||||||
|
msgstr "Soir"
|
||||||
|
|
||||||
#: agenda_culturel/forms.py:44 agenda_culturel/models.py:168
|
#: agenda_culturel/forms.py:44 agenda_culturel/models.py:168
|
||||||
#: agenda_culturel/models.py:336 agenda_culturel/models.py:1341
|
#: agenda_culturel/models.py:336 agenda_culturel/models.py:1341
|
||||||
#: agenda_culturel/models.py:1441
|
#: agenda_culturel/models.py:1441
|
||||||
|
@ -1223,6 +1223,8 @@ article {
|
|||||||
.description {
|
.description {
|
||||||
float: left;
|
float: left;
|
||||||
width: calc(70% - 16em);
|
width: calc(70% - 16em);
|
||||||
|
max-width: 42em;
|
||||||
|
margin-bottom: 1em;
|
||||||
}
|
}
|
||||||
.illustration {
|
.illustration {
|
||||||
width: 14em;
|
width: 14em;
|
||||||
|
@ -56,7 +56,7 @@
|
|||||||
<div class="resume">
|
<div class="resume">
|
||||||
{% for ti in cd.get_time_intervals %}
|
{% for ti in cd.get_time_intervals %}
|
||||||
{% if ti.events|length > 0 %}
|
{% if ti.events|length > 0 %}
|
||||||
<h3>{{ ti.name }} <a class="badge simple" href="#{{ ti.id }}" data-placement="left" data-tooltip="Aller à {{ ti.name }}">{% picto_from_name "chevron-down" %}</a></h3>
|
<h3>{{ ti.short_name }} <a class="badge simple" href="#{{ ti.id }}" data-tooltip="Aller à {{ ti.name }}">{% picto_from_name "chevrons-down" %}</a></h3>
|
||||||
<ul>
|
<ul>
|
||||||
{% for event in ti.events %}
|
{% for event in ti.events %}
|
||||||
<li>{{ event.category | circle_cat:event.has_recurrences }}
|
<li>{{ event.category | circle_cat:event.has_recurrences }}
|
||||||
|
Loading…
Reference in New Issue
Block a user