aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/config.py3
-rw-r--r--python/fatcat/templates/base.html8
-rw-r--r--python/fatcat/templates/editor_changelog.html22
-rw-r--r--python/fatcat/templates/release_view.html4
4 files changed, 25 insertions, 12 deletions
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 <i class="dropdown icon"></i>
<div class="menu">
<a class="item" href="/editgroup/current"><i class="edit icon"></i>Edits in Progress</a>
- <a class="item" href="/editor/demo-user/changelog"><i class="history icon"></i>History</a>
+ <a class="item" href="/editor/aaaaaaaaaaaabkvkaaaaaaaaae/changelog"><i class="history icon"></i>History</a>
<div class="divider"></div>
- <a class="item" href="/editor/demo-user"><i class="user icon"></i>Account</a>
+ <a class="item" href="/editor/aaaaaaaaaaaabkvkaaaaaaaaae"><i class="user icon"></i>Account</a>
<a class="item" href="/logout"><i class="sign out icon"></i>Logout</a>
</div>
</div>
@@ -61,12 +61,12 @@
<footer class="ui inverted vertical footer segment" style="margin-top: 2em; padding-top: 2em; padding-bottom:2em; position: absolute; bottom: 0px; width: 100%;">
<div class="ui center aligned container">
<div class="ui horizontal inverted small divided link list">
- <span class="item">fatcat!</span>
+ <a class="item" href="/">fatcat!</a>
<a class="item" href="/about">About</a>
<a class="item" href="#">Sources</a>
<a class="item" href="#">Status</a>
<a class="item" href="#">Datasets</a>
- <a class="item" href="https://git.bnewbold.net/fatcat/">Source Code</a>
+ <a class="item" href="https://git.bnewbold.net/fatcat/">Source Code (<code>{{ config.GIT_REVISION.decode() }}</code>)</a>
</div>
</div>
</footer>
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 @@
</h1>
<p>Changes accepted (aka, merged editgroups):
-<ul>
-{% for entry in changelog_entries %}
- <li><a href="/editgroup/{{ entry.editgroup }}">Edit Group #{{ entry.editgroup }}</a> (on {{ entry.timestamp }})
-{% else %}
-NONE
-{% endfor %}
-</ul>
+<table class="ui table">
+ <thead><tr><th>Changelog<br>Index
+ <th>Timestamp (UTC)
+ <th>Editgroup
+ <th>Editor
+ <th>Description
+ <tbody>
+ {% for entry in changelog_entries %}
+ <tr><td><a href="/changelog/{{ entry.index }}">{{ entry.index }}</a>
+ <td>{{ entry.timestamp }}
+ <td><code><a href="/editgroup/{{ entry.editgroup_id }}">{{ entry.editgroup_id }}</a></code>
+ <td><code><a href="/editor/{{ entry.editgroup.editor_id }}">{{ entry.editgroup.editor_id }}</a></code>
+ <td>{% if entry.editgroup.description != None %}{{ entry.editgroup.description }}{% endif %}
+ {% endfor %}
+</table>
{% 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 %}
<li>{% if ref.extra != None %}{{ ref.extra }}{% else %}<i>unknown</i>{% endif %}
{% if ref.target_release_id != None %}
- (<a href="/release/{{ ref.target_release_id }}">fatcat release</a>)
+ (<a href="/release/{{ ref.target_release_id }}">fatcat release</a>)
+ {% else if ref.extra.doi != None %}
+ (DOI: <a href="/release/lookup?doi={{ ref.exta.doi }}">{{ ref.extra.doi }}</a>)
{% endif %}
{% endfor %}
</ol>