taler-www

Main taler.net website
Log | Files | Refs | Submodules | README | LICENSE

commit 629a6f12fc50c2dc300ecb003478ae9053b29de8
parent bf00c30d0752390cf5fb97bf120ee3118d2bf76f
Author: Andreas HABEGGER <andreas.habegger@bfh.ch>
Date:   Sun,  9 Nov 2025 23:29:54 +0100

Reworked section 'Deliverables'; Fixed issue with unused item 'page'

Diffstat:
Mtemplate/ngi-taler.html.j2 | 64+++++++++++++++++++++++++++++++++++++++++++---------------------
1 file changed, 43 insertions(+), 21 deletions(-)

diff --git a/template/ngi-taler.html.j2 b/template/ngi-taler.html.j2 @@ -253,28 +253,50 @@ <h4 class="font-weight-bold pb-2 mb-4">Deliverables</h4> </div> <div class="list-group"> - {% for item in conf['deliverables'] %} - {% set ns = namespace(symbol='images/file-cancel.svg') %} - {% if item['url_pdf'] is defined and item['url_pdf'] and item['url_pdf'] != "" %} - <a href="{{ url(item['url_pdf']) }}" class="list-group-item list-group-item-action"> - {% set ns.symbol = 'images/pdf.svg' %} - {% elif item['page'] is defined and item['page'] and item['page'] != "" %} - <a href="{{ url(item['page']) }}" class="list-group-item list-group-item-action"> - {% set ns.symbol = 'images/html.svg' %} - {% else %} - <a href="#" class="list-group-item list-group-item-action"> + {% for item in conf['deliverables'] %} + {% set ns = namespace(symbol='images/file-cancel.svg') %} + + {% if item.url_pdf is defined and item.url_pdf %} + {% set ns.symbol = 'images/pdf.svg' %} + {% set target_url = url(item.url_pdf) %} + {% else %} + {% set target_url = "#" %} + {% endif %} + + <a href="{{ target_url }}" class="list-group-item list-group-item-action py-3 text-decoration-none"> + + <div class="d-flex align-items-center"> + <img src="{{ url_static(ns.symbol) }}" + alt="" + width="32" height="32" + class="me-3 opacity-75" + > + + <div class="flex-grow-1"> + <div class="d-flex justify-content-between"> + <h5 class="mb-1 text-dark">{{ item.title }}</h5> + <small class="text-muted">{{ item.workpackage }}</small> + </div> + + {% if item.comment %} + <p class="mb-1 text-secondary small fst-italic">{{ item.comment }}</p> + {% endif %} + + {% if item.page is defined and item.page and item.page != "" %} + </div></div></a><div> + <div class="small text-muted"> + <i class="fa fa-link me-1"></i> + Further reading: + <a href="{{ item.page }}" class="text-muted text-decoration-none">{{ item.page }}</a> + </div> {% endif %} - <div class="d-flex w-100 justify-content-between"> - <h5 class="mb-1"><img border=0 alt="" width=24 height=24 src="{{ url_static(ns.symbol) }}"> - &nbsp;{{ item['title'] }}</h5> - <small>{{ item['workpackage'] }}</small> - </div> - {% if item['comment'] is defined and item['comment'] and item['comment'] != "" %} - <p class="mb-1">{{ item['comment'] }}</p> - {% endif %} - </a> - {% endfor %} - </div> + </div> + </div> + </a> + {% endfor %} + +</div> + </article> <article>