Add view button back to history revisions
This commit is contained in:
parent
15924df4e2
commit
687b0f5ced
|
@ -83,6 +83,7 @@ def history_data(name):
|
||||||
item['DT_RowId'] = item['sha']
|
item['DT_RowId'] = item['sha']
|
||||||
date = datetime.fromtimestamp(item['time'])
|
date = datetime.fromtimestamp(item['time'])
|
||||||
item['date'] = date.strftime(current_app.config.get('DATETIME_FORMAT', '%b %d, %Y %I:%M %p'))
|
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
|
total_records, hist_complete = page.history_cache
|
||||||
if not hist_complete:
|
if not hist_complete:
|
||||||
# Force datatables to fetch more data when it gets to the end
|
# Force datatables to fetch more data when it gets to the end
|
||||||
|
|
|
@ -58,12 +58,18 @@
|
||||||
ordering: false,
|
ordering: false,
|
||||||
bFilter: false,
|
bFilter: false,
|
||||||
columns: [
|
columns: [
|
||||||
{ "data": null,
|
{
|
||||||
"render": function(data) {
|
"data": null,
|
||||||
return '<img src="' + data.gravatar + '?s=20" class="avatar" /> ' + data.author
|
"render": function (data) {
|
||||||
|
return '<img src="' + data.gravatar + '?s=20" class="avatar" /> ' + data.author
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"data": null,
|
||||||
|
"render": function (data) {
|
||||||
|
return '<a href="' + data.link + '" class="label label-primary">View</a> ' + data.message
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ "data": "message" },
|
|
||||||
{ "data": "date" }
|
{ "data": "date" }
|
||||||
],
|
],
|
||||||
rowCallback: function( row, data, index ) {
|
rowCallback: function( row, data, index ) {
|
||||||
|
|
Loading…
Reference in a new issue