initial moment time formatting commit.

pull/477/head
William Kim 11 years ago
parent a72ba6d98b
commit ba7e791985

@ -117,7 +117,12 @@ var ApprovedSiteView = Backbone.View.extend({
},
render: function() {
var json = {grant: this.model.toJSON(), client: this.options.client.toJSON()};
var formattedDate = {creationDate: moment(this.model.creationDate).format("ddd, hA"),
accessDate: moment(this.model.accessDate),
timeoutDate: moment(this.model.timeoutDate)};
var json = {grant: this.model.toJSON(), client: this.options.client.toJSON(), formattedDate: formattedDate};
this.$el.html(this.template(json));

@ -96,15 +96,15 @@
<!-- TODO: make these dates collapsable/expandable -->
<td>
<%= grant.creationDate %>
<%= formattedDate.creationDate %>
</td>
<td>
<%= grant.accessDate %>
<%= formattedDate.accessDate %>
</td>
<td>
<%= grant.timeoutDate %>
<%= formattedDate.timeoutDate %>
</td>
<td>

Loading…
Cancel
Save