diff --git a/com/templates/com/news_list.jinja b/com/templates/com/news_list.jinja
index e077ca3d..8c8a21ce 100644
--- a/com/templates/com/news_list.jinja
+++ b/com/templates/com/news_list.jinja
@@ -36,6 +36,24 @@
{% endfor %}
+
+
+
{% trans %}Birthdays{% endtrans %}
+
+
+ {% for d in birthdays.dates('date_of_birth', 'year', 'DESC') %}
+ -
+ {% trans age=timezone.now().year - d.year %}{{ age }} year old{% endtrans %}
+
+
+ {% endfor %}
+
+
+
diff --git a/com/views.py b/com/views.py
index 77dea73e..34bd99d0 100644
--- a/com/views.py
+++ b/com/views.py
@@ -283,6 +283,10 @@ class NewsListView(CanViewMixin, ListView):
kwargs = super(NewsListView, self).get_context_data(**kwargs)
kwargs['NewsDate'] = NewsDate
kwargs['timedelta'] = timedelta
+ kwargs['birthdays'] = User.objects\
+ .filter(date_of_birth__month=timezone.now().month, date_of_birth__day=timezone.now().day)\
+ .filter(role__in=['STUDENT', 'FORMER_STUDENT'])\
+ .order_by('-date_of_birth')
return kwargs
diff --git a/core/static/core/style.scss b/core/static/core/style.scss
index 2c145458..50b4ef46 100644
--- a/core/static/core/style.scss
+++ b/core/static/core/style.scss
@@ -364,21 +364,22 @@ header {
text-transform: uppercase;
font-size: 1.1em;
border: solid 1px black;
- &:last-of-type {
+ &:not(:first-of-type) {
margin: 2em 0em 1em 0em;
}
}
}
-/* AGENDA */
- #agenda {
- box-shadow: grey 2px 2px 2px;
+/* AGENDA/BIRTHDAYS */
+ #agenda,#birthdays {
display: block;
width: 100%;
background: white;
+ box-shadow: grey 2px 2px 2px;
font-size: 70%;
border: solid 1px $black-color;
- #agenda_title {
+ margin-bottom: 1em;
+ #agenda_title,#birthdays_title {
margin: 0em;
padding: 0.5em;
font-weight: bold;
@@ -391,6 +392,8 @@ header {
#agenda_content {
overflow: auto;
height: 20em;
+ }
+ #agenda_content,#birthdays_content {
.agenda_item {
padding: 0.5em;
margin-bottom: 0.5em;
@@ -407,9 +410,27 @@ header {
}
}
}
+ ul.birthdays_year {
+ margin: 0em;
+ list-style-type: none;
+ font-weight: bold;
+ >li {
+ padding: 0.5em;
+ &:nth-child(even) {
+ background: $secondary-neutral-light-color;
+ }
+ }
+ ul {
+ margin: 0em;
+ margin-left: 1em;
+ list-style-type: square;
+ list-style-position: inside;
+ font-weight: normal;
+ }
+ }
}
}
-/* END AGENDA */
+/* END AGENDA/BIRTHDAYS */
/* EVENTS TODAY AND NEXT FEW DAYS */
.news_events_group {
diff --git a/locale/fr/LC_MESSAGES/django.po b/locale/fr/LC_MESSAGES/django.po
index f553478d..e1293ecd 100644
--- a/locale/fr/LC_MESSAGES/django.po
+++ b/locale/fr/LC_MESSAGES/django.po
@@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2017-09-25 18:37+0200\n"
+"POT-Creation-Date: 2017-09-26 13:32+0200\n"
"PO-Revision-Date: 2016-07-18\n"
"Last-Translator: Skia \n"
"Language-Team: AE info \n"
@@ -367,11 +367,12 @@ msgstr "Compte en banque : "
#: election/templates/election/election_detail.jinja:280
#: election/templates/election/election_detail.jinja:330
#: election/templates/election/election_detail.jinja:378
-#: forum/templates/forum/macros.jinja:21 forum/templates/forum/macros.jinja:123
+#: forum/templates/forum/macros.jinja:21
+#: forum/templates/forum/macros.jinja:123
#: launderette/templates/launderette/launderette_admin.jinja:16
#: launderette/views.py:182 sas/templates/sas/album.jinja:26
#: sas/templates/sas/moderation.jinja:18 sas/templates/sas/picture.jinja:74
-#: sas/templates/sas/picture.jinja.py:124
+#: sas/templates/sas/picture.jinja:124
#: stock/templates/stock/stock_shopping_list.jinja:43
#: stock/templates/stock/stock_shopping_list.jinja:69
#: trombi/templates/trombi/detail.jinja:35
@@ -966,7 +967,8 @@ msgstr "Cet email est déjà abonné à cette mailing"
msgid "Unregistered user"
msgstr "Désabonner un utilisateur"
-#: club/templates/club/club_list.jinja:4 club/templates/club/club_list.jinja:24
+#: club/templates/club/club_list.jinja:4
+#: club/templates/club/club_list.jinja:24
msgid "Club list"
msgstr "Liste des clubs"
@@ -1037,7 +1039,8 @@ msgstr "Au"
msgid "Sellings"
msgstr "Ventes"
-#: club/templates/club/club_sellings.jinja:9 club/templates/club/stats.jinja:19
+#: club/templates/club/club_sellings.jinja:9
+#: club/templates/club/stats.jinja:19
#: counter/templates/counter/cash_summary_list.jinja:15
msgid "Show"
msgstr "Montrer"
@@ -1372,8 +1375,8 @@ msgid "News admin"
msgstr "Administration des nouvelles"
#: com/templates/com/news_admin_list.jinja:9
-#: com/templates/com/news_detail.jinja:5 com/templates/com/news_detail.jinja:11
-#: com/templates/com/news_list.jinja:4
+#: com/templates/com/news_detail.jinja:5
+#: com/templates/com/news_detail.jinja:11 com/templates/com/news_list.jinja:4
msgid "News"
msgstr "Nouvelles"
@@ -1560,15 +1563,24 @@ msgstr "Administrer les news"
msgid "Agenda"
msgstr "Agenda"
-#: com/templates/com/news_list.jinja:63
+#: com/templates/com/news_list.jinja:41
+msgid "Birthdays"
+msgstr "Anniversaires"
+
+#: com/templates/com/news_list.jinja:46
+#, python-format
+msgid "%(age)s year old"
+msgstr "%(age)s ans"
+
+#: com/templates/com/news_list.jinja:85
msgid "Events today and the next few days"
msgstr "Événements aujourd'hui et dans les prochains jours"
-#: com/templates/com/news_list.jinja:96
+#: com/templates/com/news_list.jinja:123
msgid "Nothing to come..."
msgstr "Rien à venir..."
-#: com/templates/com/news_list.jinja:102
+#: com/templates/com/news_list.jinja:130
msgid "Coming soon... don't miss!"
msgstr "Prochainement... à ne pas rater!"
@@ -1700,15 +1712,15 @@ msgstr "Ce champ est obligatoire."
msgid "You crazy? You can not finish an event before starting it."
msgstr "T'es fou? Un événement ne peut pas finir avant même de commencer."
-#: com/views.py:326
+#: com/views.py:329
msgid "Delete and save to regenerate"
msgstr "Supprimer et sauver pour regénérer"
-#: com/views.py:334
+#: com/views.py:337
msgid "Weekmail of the "
msgstr "Weekmail du "
-#: com/views.py:414
+#: com/views.py:417
msgid ""
"You must be a board member of the selected club to post in the Weekmail."
msgstr ""
@@ -2184,7 +2196,7 @@ msgstr "SAS"
#: core/templates/core/base.jinja:149 forum/templates/forum/forum.jinja:10
#: forum/templates/forum/last_unread.jinja:13
-#: forum/templates/forum/main.jinja:6 forum/templates/forum/main.jinja.py:11
+#: forum/templates/forum/main.jinja:6 forum/templates/forum/main.jinja:11
#: forum/templates/forum/main.jinja:14 forum/templates/forum/reply.jinja:15
#: forum/templates/forum/topic.jinja:30
msgid "Forum"
@@ -2446,11 +2458,13 @@ msgstr "Partager sur Facebook"
msgid "Tweet"
msgstr "Tweeter"
-#: core/templates/core/macros.jinja:39 core/templates/core/user_detail.jinja:27
+#: core/templates/core/macros.jinja:39
+#: core/templates/core/user_detail.jinja:27
msgid "Born: "
msgstr "Né le : "
-#: core/templates/core/macros.jinja:43 core/templates/core/user_detail.jinja:48
+#: core/templates/core/macros.jinja:43
+#: core/templates/core/user_detail.jinja:48
msgid "Promo: "
msgstr "Promo : "