From ee21dd1345383e9264176365a778720f3bc849a6 Mon Sep 17 00:00:00 2001 From: Damjan Velickovski Date: Tue, 20 Sep 2016 11:14:48 +0200 Subject: [PATCH] Gdrive links (#40) * Add link to the parent of the document * Open drive links in new tab/window * Use target on correct anchor --- views/index_embed.html | 14 ++++++++++++++ views/status_embed.html | 14 ++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/views/index_embed.html b/views/index_embed.html index f10bf3b..37791cd 100644 --- a/views/index_embed.html +++ b/views/index_embed.html @@ -75,10 +75,24 @@ {% endif %} {% endfor %} {% if cell %} + {% set parentId = "" %} + {% if cell.uploads %} + {% for upload in cell.uploads %} + {% if upload.parentId %} + {% set parentId = upload.parentId %} + {% endif %} + {% endfor %} + {% endif %} + {% if parentId %} + + {% endif %} {{ h.state(cell.state) }} + {% if parentId %} + + {% endif %} {% else %} diff --git a/views/status_embed.html b/views/status_embed.html index 1ac8006..e71b14f 100644 --- a/views/status_embed.html +++ b/views/status_embed.html @@ -88,10 +88,24 @@

{{ gettext("Current Status") }}

{{ date_format({'year':fiscal_year}, 'YYYY') }} {% if cell %} + {% set parentId = "" %} + {% if cell.uploads %} + {% for upload in cell.uploads %} + {% if upload.parentId %} + {% set parentId = upload.parentId %} + {% endif %} + {% endfor %} + {% endif %} + {% if parentId %} + + {% endif %} {{ h.state(cell.state) }} {{ h.state(cell.state) }} + {% if parentId %} + + {% endif %} {% else %} {{ h.state("not produced") }}