From 3f985921a29bc2b58f7af915021501677d2f68de Mon Sep 17 00:00:00 2001 From: FSMPI Admin-Team <admin@fsmpi.rwth-aachen.de> Date: Mon, 6 Mar 2017 21:28:22 +0100 Subject: [PATCH] Do not show metadata in public version for unpublished protocols --- templates/protocol-show.html | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/templates/protocol-show.html b/templates/protocol-show.html index 8e13265..47d116b 100644 --- a/templates/protocol-show.html +++ b/templates/protocol-show.html @@ -60,9 +60,11 @@ {% if protocol.start_time is not none and protocol.end_time is not none %} <p><strong>Zeit:</strong> von {{protocol.start_time|timify}} bis {{protocol.end_time|timify}}</p> {% endif %} - {% for meta in protocol.metas %} - <p><strong>{{meta.name}}:</strong> {{meta.value}}</p> - {% endfor %} + {% if has_public_view_right %} + {% for meta in protocol.metas %} + <p><strong>{{meta.name}}:</strong> {{meta.value}}</p> + {% endfor %} + {% endif %} {% else %} {% if protocol.date is not none %}<p><strong>Geplant:</strong> {{protocol.date|datify_long}}{% endif %}</p> {% endif %} -- GitLab