mirror of
				https://github.com/ae-utbm/sith.git
				synced 2025-11-04 02:53:06 +00:00 
			
		
		
		
	Reworked election list view with datetime ranges and a description.
This commit is contained in:
		@@ -10,18 +10,34 @@
 | 
			
		||||
  small {
 | 
			
		||||
    font-size: smaller;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  time {
 | 
			
		||||
    font-weight: bolder;
 | 
			
		||||
  }
 | 
			
		||||
</style>
 | 
			
		||||
{%- endblock %}
 | 
			
		||||
 | 
			
		||||
{% block content %}
 | 
			
		||||
  <h3>{% trans %}Current elections{% endtrans %}</h3>
 | 
			
		||||
  <hr>
 | 
			
		||||
  <ul>
 | 
			
		||||
  {%- for election in object_list %}
 | 
			
		||||
  <hr>
 | 
			
		||||
  <section>
 | 
			
		||||
    <h4>
 | 
			
		||||
      <a href="{{ url('election:detail', election_id=election.id) }}">{{ election }}</a>
 | 
			
		||||
    </h4>
 | 
			
		||||
    <p>
 | 
			
		||||
      <a href="{{ url('election:detail', election_id=election.id) }}">{{election}}</a>
 | 
			
		||||
      <small>{% trans %}From{% endtrans %} {{ election.start_date|date("l d F Y") }} {% trans %}to{% endtrans %} {{ election.end_date|date("l d F Y") }}</small>
 | 
			
		||||
      {% 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>
 | 
			
		||||
       {% 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>
 | 
			
		||||
    </p>
 | 
			
		||||
    <p>
 | 
			
		||||
      {% 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>
 | 
			
		||||
       {% 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>
 | 
			
		||||
    </p>
 | 
			
		||||
    <p>{{ election.description }}</p>
 | 
			
		||||
  </section>
 | 
			
		||||
  {%- endfor %}
 | 
			
		||||
  </ul>
 | 
			
		||||
{%- endblock %}
 | 
			
		||||
		Reference in New Issue
	
	Block a user