Add view button back to history revisions

This commit is contained in:
Chase Sterling 2016-07-09 20:48:21 -04:00
parent 15924df4e2
commit 687b0f5ced
2 changed files with 11 additions and 4 deletions

View file

@ -83,6 +83,7 @@ def history_data(name):
item['DT_RowId'] = item['sha']
date = datetime.fromtimestamp(item['time'])
item['date'] = date.strftime(current_app.config.get('DATETIME_FORMAT', '%b %d, %Y %I:%M %p'))
item['link'] = url_for('.commit', name=name, sha=item['sha'])
total_records, hist_complete = page.history_cache
if not hist_complete:
# Force datatables to fetch more data when it gets to the end

View file

@ -58,12 +58,18 @@
ordering: false,
bFilter: false,
columns: [
{ "data": null,
{
"data": null,
"render": function (data) {
return '<img src="' + data.gravatar + '?s=20" class="avatar" /> ' + data.author
return '<img src="' + data.gravatar + '?s=20" class="avatar" />&nbsp;&nbsp;' + data.author
}
},
{
"data": null,
"render": function (data) {
return '<a href="' + data.link + '" class="label label-primary">View</a>&nbsp;&nbsp;' + data.message
}
},
{ "data": "message" },
{ "data": "date" }
],
rowCallback: function( row, data, index ) {