From 5ba2ecd38a15ee6439af9e493983d84815b02352 Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Tue, 13 Jun 2017 21:42:23 -0700 Subject: [PATCH] Add tag_object html macro to centralize that effort. Still needs work. --- .../etiquette_flask/templates/photo.html | 9 +-- .../etiquette_flask/templates/search.html | 10 ++- .../etiquette_flask/templates/tag_object.html | 71 +++++++++++++++++++ frontends/etiquette_flask/templates/tags.html | 7 +- 4 files changed, 86 insertions(+), 11 deletions(-) create mode 100644 frontends/etiquette_flask/templates/tag_object.html diff --git a/frontends/etiquette_flask/templates/photo.html b/frontends/etiquette_flask/templates/photo.html index 6aab491..3c9dbbc 100644 --- a/frontends/etiquette_flask/templates/photo.html +++ b/frontends/etiquette_flask/templates/photo.html @@ -2,6 +2,7 @@ {% import "header.html" as header %} + {% import "tag_object.html" as tag_object %} Photo {{photo.basename}} @@ -166,13 +167,7 @@ {% set tags = photo.sorted_tags() %} {% for tag in tags %}
  • - {% set qualified_name=tag.qualified_name() %} - {% set display_name=qualified_name %} - {% if display_name|length > 30 %} - {% set display_name = display_name[-30:] %} - {% set display_name = display_name.split(".", 1)[1] %} - {% endif %} - {{display_name}}
  • {% if include_synonyms %}