From d1806d43a9d14e27346a0f7a1c36411dead19738 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Sun, 30 Jun 2019 03:48:09 -0700 Subject: more descriptive HTML titles --- python/fatcat_web/templates/entity_base.html | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'python/fatcat_web/templates/entity_base.html') diff --git a/python/fatcat_web/templates/entity_base.html b/python/fatcat_web/templates/entity_base.html index b846614d..7442e737 100644 --- a/python/fatcat_web/templates/entity_base.html +++ b/python/fatcat_web/templates/entity_base.html @@ -1,5 +1,18 @@ {% extends "base.html" %} +{# TODO: more specific titles #} +{% block title %} +{% if entity_type == "container" and entity.name %} + {{ entity.name }} +{% elif entity_type == "creator" and entity.display_name %} + {{ entity.display_name }} +{% elif entity_type == "release" and entity.title %} + {{ entity.title }} +{% else %} + {{ entity_type }}_{{ entity.ident or entity.revision }} +{% endif %} +{% endblock %} + {% macro entity_tab(name, text, url_suffix, count=None) %} {{ text }}{% if count != None %} ({{ count }}){% endif %} {% endmacro %} -- cgit v1.2.3