Some date fix

This commit is contained in:
Antoine Bartuccio 2016-12-25 23:36:34 +01:00
parent 772a3b5827
commit cd97901db1
4 changed files with 25 additions and 15 deletions

View File

@ -239,10 +239,10 @@ th {
{% trans %}Polls closed {% endtrans %} {% trans %}Polls closed {% endtrans %}
{%- else %} {%- else %}
{% trans %}Polls will open {% endtrans %} {% trans %}Polls will open {% endtrans %}
<time datetime="{{ election.start_date }}">{{ election.start_date|date("l d F Y") }}</time> at <time>{{ election.start_date|time("G:i") }}</time> <time datetime="{{ election.start_date }}">{{ election.start_date|localtime|date("l d F Y")}}</time>{% trans %} at {% endtrans %}<time>{{ election.start_date|localtime|time("G:i")}}</time>
{% trans %}and will close {% endtrans %} {% trans %}and will close {% endtrans %}
{%- endif %} {%- endif %}
<time datetime="{{ election.end_date }}">{{ election.end_date|date("l d F Y") }}</time> at <time>{{ election.end_date|time("G:i") }}</time> <time datetime="{{ election.end_date }}">{{ election.end_date|localtime|date("l d F Y")}}</time>{% trans %} at {% endtrans %}<time>{{ election.end_date|localtime|time("G:i")}}</time>
</p> </p>
{%- if election.has_voted(user) %} {%- if election.has_voted(user) %}
<p class="election__elector-infos"> <p class="election__elector-infos">

View File

@ -27,15 +27,15 @@
</h4> </h4>
<p> <p>
{% trans %}Applications open from{% endtrans %} {% trans %}Applications open from{% endtrans %}
<time datetime="{{ election.start_candidature }}">{{ election.start_candidature|date("l d F Y") }}</time> at <time>{{ election.start_candidature|time("G:i") }}</time> <time datetime="{{ election.start_candidature }}">{{ election.start_candidature|localtime|date("l d F Y") }}</time>{% trans %} at {% endtrans %}<time>{{ election.start_candidature|localtime|time("G:i") }}</time>
{% trans %}to{% endtrans %} {% trans %}to{% endtrans %}
<time datetime="{{ election.end_candidature }}">{{ election.end_candidature|date("l d F Y") }}</time> at <time>{{ election.end_candidature|time("G:i") }}</time> <time datetime="{{ election.end_candidature }}">{{ election.end_candidature|localtime|date("l d F Y") }}</time>{% trans %} at {% endtrans %}<time>{{ election.end_candidature|time("G:i") }}</time>
</p> </p>
<p> <p>
{% trans %}Polls open from{% endtrans %} {% trans %}Polls open from{% endtrans %}
<time datetime="{{ election.start_date }}">{{ election.start_date|date("l d F Y") }}</time> at <time>{{ election.start_date|time("G:i") }}</time> <time datetime="{{ election.start_date }}">{{ election.start_date|localtime|date("l d F Y") }}</time>{% trans %} at {% endtrans %}<time>{{ election.start_date|localtime|time("G:i") }}</time>
{% trans %}to{% endtrans %} {% trans %}to{% endtrans %}
<time datetime="{{ election.end_date }}">{{ election.end_date|date("l d F Y") }}</time> at <time>{{ election.end_date|time("G:i") }}</time> <time datetime="{{ election.end_date }}">{{ election.end_date|localtime|date("l d F Y") }}</time>{% trans %} at {% endtrans %}<time>{{ election.end_date|localtime|time("G:i") }}</time>
</p> </p>
<p>{{ election.description }}</p> <p>{{ election.description }}</p>
</section> </section>

View File

@ -123,13 +123,14 @@ class ElectionForm(forms.ModelForm):
'view_groups': CheckboxSelectMultiple, 'view_groups': CheckboxSelectMultiple,
'edit_groups': CheckboxSelectMultiple, 'edit_groups': CheckboxSelectMultiple,
'vote_groups': CheckboxSelectMultiple, 'vote_groups': CheckboxSelectMultiple,
'candidature_groups': CheckboxSelectMultiple, 'candidature_groups': CheckboxSelectMultiple
'start_date': SelectDateTime,
'end_date': SelectDateTime,
'start_candidature': SelectDateTime,
'end_candidature': SelectDateTime,
} }
start_date = forms.DateTimeField(['%Y-%m-%d %H:%M:%S'], label=_("Start date"), widget=SelectDateTime, required=True)
end_date = forms.DateTimeField(['%Y-%m-%d %H:%M:%S'], label=_("End date"), widget=SelectDateTime, required=True)
start_candidature = forms.DateTimeField(['%Y-%m-%d %H:%M:%S'], label=_("Start candidature"), widget=SelectDateTime, required=True)
end_candidature = forms.DateTimeField(['%Y-%m-%d %H:%M:%S'], label=_("End candidature"), widget=SelectDateTime, required=True)
# Display elections # Display elections

View File

@ -6,7 +6,7 @@
msgid "" msgid ""
msgstr "" msgstr ""
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-12-25 19:56+0100\n" "POT-Creation-Date: 2016-12-25 23:30+0100\n"
"PO-Revision-Date: 2016-07-18\n" "PO-Revision-Date: 2016-07-18\n"
"Last-Translator: Skia <skia@libskia.so>\n" "Last-Translator: Skia <skia@libskia.so>\n"
"Language-Team: AE info <ae.info@utbm.fr>\n" "Language-Team: AE info <ae.info@utbm.fr>\n"
@ -362,7 +362,7 @@ msgstr "Nouveau compte club"
#: counter/templates/counter/counter_list.jinja:47 #: counter/templates/counter/counter_list.jinja:47
#: election/templates/election/election_detail.jinja:277 #: election/templates/election/election_detail.jinja:277
#: election/templates/election/election_detail.jinja:322 #: election/templates/election/election_detail.jinja:322
#: election/templates/election/election_detail.jinja:366 #: election/templates/election/election_detail.jinja:368
#: election/templates/election/update_template.jinja:4 #: election/templates/election/update_template.jinja:4
#: election/templates/election/update_template.jinja:8 #: election/templates/election/update_template.jinja:8
#: launderette/templates/launderette/launderette_list.jinja:16 #: launderette/templates/launderette/launderette_list.jinja:16
@ -3190,6 +3190,15 @@ msgstr "Votes fermés"
msgid "Polls will open " msgid "Polls will open "
msgstr "Les votes ouvriront" msgstr "Les votes ouvriront"
#: election/templates/election/election_detail.jinja:242
#: election/templates/election/election_detail.jinja:245
#: election/templates/election/election_list.jinja:30
#: election/templates/election/election_list.jinja:32
#: election/templates/election/election_list.jinja:36
#: election/templates/election/election_list.jinja:38
msgid " at "
msgstr " à "
#: election/templates/election/election_detail.jinja:243 #: election/templates/election/election_detail.jinja:243
msgid "and will close " msgid "and will close "
msgstr "et fermeront" msgstr "et fermeront"
@ -3236,7 +3245,7 @@ msgstr "Envoyer le vote !"
msgid "Add a new list" msgid "Add a new list"
msgstr "Ajouter une nouvelle liste" msgstr "Ajouter une nouvelle liste"
#: election/templates/election/election_detail.jinja:365 #: election/templates/election/election_detail.jinja:366
msgid "Add a new role" msgid "Add a new role"
msgstr "Ajouter un nouveau rôle" msgstr "Ajouter un nouveau rôle"