summaryrefslogtreecommitdiffstats
path: root/python/fatcat_web/templates/entity_base.html
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2019-06-30 03:48:09 -0700
committerBryan Newbold <bnewbold@robocracy.org>2019-06-30 03:48:09 -0700
commitd1806d43a9d14e27346a0f7a1c36411dead19738 (patch)
tree42eb4f806d422d33d62fa3a6da7d92acf57e1968 /python/fatcat_web/templates/entity_base.html
parent361e7fa6d3cd9fe355bd26d85ef92e4b134d853d (diff)
downloadfatcat-d1806d43a9d14e27346a0f7a1c36411dead19738.tar.gz
fatcat-d1806d43a9d14e27346a0f7a1c36411dead19738.zip
more descriptive HTML titles
Diffstat (limited to 'python/fatcat_web/templates/entity_base.html')
-rw-r--r--python/fatcat_web/templates/entity_base.html13
1 files changed, 13 insertions, 0 deletions
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) %}
<a href ="{% if editgroup %}/editgroup/{{ editgroup.editgroup_id }}{% endif %}/{{ entity_type }}/{% if entity.ident %}{{ entity.ident }}{% elif entity.revision %}rev/{{ entity.revision }}{% endif %}{{ url_suffix }}" class="{% if entity_view == name %}active{% endif %} item" style="padding: 0em 1.2em;">{{ text }}{% if count != None %} ({{ count }}){% endif %}</a>
{% endmacro %}