Added build date to footer

This commit is contained in:
Mark McDowall 2013-06-15 15:18:41 -07:00
commit d3d937afcc
6 changed files with 18 additions and 6 deletions

View file

@ -3,7 +3,16 @@ define(['app'], function () {
NzbDrone.Shared.Footer.Model = Backbone.Model.extend({
defaults: {
'version' : '0.0.0.0'
'version' : '0.0.0.0',
'buildDate' : Date.create()
},
mutators: {
humanizedBuildDate: function () {
var date = Date.create(this.get('buildDate'));
return date.short();
}
}
});

View file

@ -1,2 +1,2 @@
<p>&copy; Copyright 2013 NzbDrone</p>
<p>v{{version}}</p>
<p>v{{version}} ({{humanizedBuildDate}})</p>

View file

@ -8,6 +8,7 @@ define(['app',
initialize: function () {
this.model = new NzbDrone.Shared.Footer.Model();
this.model.set('version', NzbDrone.Constants.Version);
this.model.set('buildDate', NzbDrone.Constants.BuildDate);
}
});

View file

@ -1,3 +0,0 @@
footer {
font-size: 12.6px;
}

View file

@ -172,7 +172,8 @@ define([
window.NzbDrone.Constants = {
ApiRoot: '/api',
Version: '0.0.0.0'
Version: '0.0.0.0',
BuildDate: '2013-01-01T00:00:00Z'
};
window.NzbDrone.addInitializer(function () {