Browse Source

Add view button back to history revisions

master
Chase Sterling 7 years ago
parent
commit
687b0f5ced
2 changed files with 11 additions and 4 deletions
  1. +1
    -0
      realms/modules/wiki/views.py
  2. +10
    -4
      realms/templates/wiki/history.html

+ 1
- 0
realms/modules/wiki/views.py 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


+ 10
- 4
realms/templates/wiki/history.html View File

@@ -58,12 +58,18 @@
ordering: false,
bFilter: false,
columns: [
{ "data": null,
"render": function(data) {
return '<img src="' + data.gravatar + '?s=20" class="avatar" /> ' + data.author
{
"data": null,
"render": function (data) {
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 ) {


Loading…
Cancel
Save