-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeliverables.html
64 lines (59 loc) · 2.48 KB
/
deliverables.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
---
title: Deliverables
---
<div class="box">
<p><a href='#sdate'>See the deliverables list sorted by delivery date</a></p>
</div>
<div class="box">
<p><a href='#sid'>See the deliverables list sorted by WP</a></p>
</div>
<div class="box">
<p><a href='#spartner'>See the deliverables list sorted by partner</a></p>
</div>
<p><i>Note: you can click on the finalised deliverables (in green) to display a short description, the DOI, etc.</i></p>
{% assign date_today = "today" | date: "%Y-%m-%d" %}
{% capture date_upcoming %}{{ date_today | date: '%s' | plus: 2634544 | date: "%Y-%m-%d" }}{% endcapture %} <!-- 1. convert to Unix timestamp 2. add 1 month + 1 week in Epoch time (epochconvert.com) to the date_upcoming 3. convert date into a string -->
{% assign sort_type = "date, id, partner" | split: ", " %}
{% for stype in sort_type %}
<h1 id="s{{ stype }}">Sorted by {{ stype }}</h1>
<table class="del">
<tr>
<th colspan="2">Deliverables</th>
<th>Partner</th>
<th>Date</th>
</tr>
{% assign sorted_del = site.data.deliverables | sort: stype %}
{% for del in sorted_del %}
{% assign date = del.date | date: "%Y-%m-%d" %}
{% if date <= date_today %}
{% if del.status == 'delivered' or
del.status == 'accepted' %}
<tr class='delivered clickable'>
{% else %}
<tr class='late'>
{% endif %}
{% elsif date <= date_upcoming %}
<tr class='upcoming'>
{% else %}
<tr>
{% endif %}
<td>{{ del.id }}</td>
<td>{{ del.name }}</td>
<td>{{ del.partner }}</td>
<td class='date'>{{ del.date | date_to_string }}</td>
</tr>
<tr class='toggled-row'>
<td colspan="4">
<strong>Dissemination level:</strong> {% if del.level %} {{ del.level }} {% else %} Public {% endif %} <br>
{% if del.doi %}
<strong>DOI:</strong> <a href="https://doi.org/{{ del.doi }}">{{ del.doi }}</a><br>
{% else %}
{% if del.link %}<strong>DOI:</strong> <a href="{{ del.link }}">{{ del.link | replace:'https://doi.org/', '' }}</a><br>{% endif %}
{% endif %}
{% if del.description %}<strong>Description:</strong> {{ del.description }}<br>{% endif %}
<strong>Status:</strong> Delivered <strong>{% if del.status == 'delivered' %}but not yet{% else %}and{% endif %} approved</strong> by the European Commission
</td>
</tr>
{% endfor %}
</table>
{% endfor %}