From 7014a2196837235226b077dd53ca28e117f0b2c2 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Wed, 25 Jul 2018 18:18:02 -0700 Subject: include git revision in footer --- python/config.py | 3 +++ python/fatcat/templates/base.html | 8 ++++---- python/fatcat/templates/editor_changelog.html | 22 +++++++++++++++------- python/fatcat/templates/release_view.html | 4 +++- 4 files changed, 25 insertions(+), 12 deletions(-) (limited to 'python') diff --git a/python/config.py b/python/config.py index 21c1e148..684734f0 100644 --- a/python/config.py +++ b/python/config.py @@ -1,5 +1,7 @@ import os +import subprocess + basedir = os.path.abspath(os.path.dirname(__file__)) class Config(object): @@ -8,6 +10,7 @@ class Config(object): SQLALCHEMY_TRACK_MODIFICATIONS = False ELASTIC_BACKEND = "http://search.qa.fatcat.wiki:8088" ELASTIC_INDEX = "crossref-works" + GIT_REVISION = subprocess.check_output(["git", "describe", "--always"]).strip() # "Event more verbose" debug options. SECRET_KEY is bogus. #SQLALCHEMY_ECHO = True diff --git a/python/fatcat/templates/base.html b/python/fatcat/templates/base.html index f2de58e7..63f18c47 100644 --- a/python/fatcat/templates/base.html +++ b/python/fatcat/templates/base.html @@ -37,9 +37,9 @@ demo-user @@ -61,12 +61,12 @@ diff --git a/python/fatcat/templates/editor_changelog.html b/python/fatcat/templates/editor_changelog.html index 543d6bac..79127312 100644 --- a/python/fatcat/templates/editor_changelog.html +++ b/python/fatcat/templates/editor_changelog.html @@ -10,12 +10,20 @@

Changes accepted (aka, merged editgroups): -

+ + + {% for entry in changelog_entries %} +
Changelog
Index +
Timestamp (UTC) + Editgroup + Editor + Description +
{{ entry.index }} + {{ entry.timestamp }} + {{ entry.editgroup_id }} + {{ entry.editgroup.editor_id }} + {% if entry.editgroup.description != None %}{{ entry.editgroup.description }}{% endif %} + {% endfor %} +
{% endblock %} diff --git a/python/fatcat/templates/release_view.html b/python/fatcat/templates/release_view.html index d60df826..d7da7080 100644 --- a/python/fatcat/templates/release_view.html +++ b/python/fatcat/templates/release_view.html @@ -149,7 +149,9 @@ This release citing other releases. {% for ref in release.refs %}
  • {% if ref.extra != None %}{{ ref.extra }}{% else %}unknown{% endif %} {% if ref.target_release_id != None %} - (fatcat release) + (fatcat release) + {% else if ref.extra.doi != None %} + (DOI: {{ ref.extra.doi }}) {% endif %} {% endfor %} -- cgit v1.2.3