Commit 380ed96f10e727f13241e9dbe4e963a9efae7367

In footer, show timestamp of last update and branch name if other than master
timApp/defaultconfig.py
(4 / 0)
  
11import logging
22import os
3import subprocess
34from datetime import timedelta
45
56ALLOWED_DOCUMENT_UPLOAD_MIMETYPES = ['text/plain']
5656GLOBAL_NOTIFICATION_FILE = '/tmp/global_notification.html'
5757
5858QST_PLUGIN_PORT = 5000
59GIT_LATEST_COMMIT_TIMESTAMP = subprocess.run(["git", "log", "-1", "--date=format:%d.%m.%Y %H:%M:%S", "--format=%cd"],
60 stdout=subprocess.PIPE).stdout.decode().strip()
61GIT_BRANCH = subprocess.run(["git", "rev-parse", "--abbrev-ref", "HEAD"], stdout=subprocess.PIPE).stdout.decode().strip()
timApp/templates/base.html
(6 / 1)
  
200200 col-sm-{{ col_2_sm }} col-sm-offset-{{ col_1_sm }}">
201201 {% block footer %}
202202 <div class="row">
203 <div class="col-xs-12 text-right">
203 <div class="col-xs-6">
204 <p class="smallNote">TIM last updated: {{config.GIT_LATEST_COMMIT_TIMESTAMP}}
205 {% if config.GIT_BRANCH != 'master' %}(branch: {{config.GIT_BRANCH}}){% endif %}
206 </p>
207 </div>
208 <div class="col-xs-6 text-right">
204209 {% if not hide_links %}
205210 <a href="/view/tim/Rekisteriseloste">Rekisteriseloste</a>
206211 {% endif %}