diff --git a/pandora/app/config.py b/pandora/app/config.py index c34cca1c..b492a028 100644 --- a/pandora/app/config.py +++ b/pandora/app/config.py @@ -19,6 +19,16 @@ _win = (sys.platform == "win32") RUN_RELOADER = True +def get_version(): + info = os.path.join(os.path.dirname(__file__), '..', '..', '.bzr/branch/last-revision') + if os.path.exists(info): + f = open(info) + rev = int(f.read().split()[0]) + f.close() + if rev: + return u'%s' % rev + return u'unknown' + def load_config(): with open(settings.SITE_CONFIG) as f: try: @@ -33,6 +43,7 @@ def load_config(): settings.DEFAULT_FROM_EMAIL = config['site']['email']['system'] settings.SERVER_EMAIL = config['site']['email']['system'] config['site']['videoprefix'] = settings.VIDEO_PREFIX + config['site']['version'] = get_version() config['keys'] = {} for key in config['itemKeys']: diff --git a/static/js/pandora/siteDialog.0xdb.js b/static/js/pandora/siteDialog.0xdb.js index c9f2e7d9..86d1005e 100644 --- a/static/js/pandora/siteDialog.0xdb.js +++ b/static/js/pandora/siteDialog.0xdb.js @@ -28,6 +28,7 @@ pandora.ui.siteDialog = function(section) { + '

To learn more about pan.do/ra and OxJS, ' + 'please visit pan.do/ra ' + 'and oxjs.org.

' + + '' + pandora.site.site.name + ' is running pan.do/ra r'+ pandora.site.site.version ) .appendTo($content); } else { diff --git a/static/js/pandora/siteDialog.js b/static/js/pandora/siteDialog.js index de65a683..bb5a9cd5 100644 --- a/static/js/pandora/siteDialog.js +++ b/static/js/pandora/siteDialog.js @@ -28,6 +28,7 @@ pandora.ui.siteDialog = function(section) { + '

To learn more about pan.do/ra and OxJS, ' + 'please visit pan.do/ra ' + 'and oxjs.org.

' + + '' + pandora.site.site.name + ' is running pan.do/ra r'+ pandora.site.site.version ) .appendTo($content); } else {