Added 'created' column for subscribers lists table
This commit is contained in:
parent
435de82819
commit
bd6ba90eca
3 changed files with 6 additions and 4 deletions
|
@ -4,7 +4,6 @@ let config = require('config');
|
||||||
let express = require('express');
|
let express = require('express');
|
||||||
let router = new express.Router();
|
let router = new express.Router();
|
||||||
let lists = require('../lib/models/lists');
|
let lists = require('../lib/models/lists');
|
||||||
let fields = require('../lib/models/fields');
|
|
||||||
let templates = require('../lib/models/templates');
|
let templates = require('../lib/models/templates');
|
||||||
let campaigns = require('../lib/models/campaigns');
|
let campaigns = require('../lib/models/campaigns');
|
||||||
let subscriptions = require('../lib/models/subscriptions');
|
let subscriptions = require('../lib/models/subscriptions');
|
||||||
|
|
|
@ -151,7 +151,7 @@ router.post('/ajax/:id', (req, res) => {
|
||||||
fieldList = [];
|
fieldList = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
let columns = ['#', 'email', 'first_name', 'last_name'].concat(fieldList.filter(field => field.visible).map(field => field.column)).concat('status');
|
let columns = ['#', 'email', 'first_name', 'last_name'].concat(fieldList.filter(field => field.visible).map(field => field.column)).concat(['status', 'created']);
|
||||||
|
|
||||||
subscriptions.filter(list.id, req.body, columns, req.query.segment, (err, data, total, filteredTotal) => {
|
subscriptions.filter(list.id, req.body, columns, req.query.segment, (err, data, total, filteredTotal) => {
|
||||||
if (err) {
|
if (err) {
|
||||||
|
@ -217,7 +217,7 @@ router.post('/ajax/:id', (req, res) => {
|
||||||
} else {
|
} else {
|
||||||
return htmlescape(cRow.value || '');
|
return htmlescape(cRow.value || '');
|
||||||
}
|
}
|
||||||
})).concat(statuses[row.status]).concat('<span class="glyphicon glyphicon-wrench" aria-hidden="true"></span><a href="/lists/subscription/' + list.id + '/edit/' + row.cid + '">Edit</a>'))
|
})).concat(statuses[row.status]).concat(row.created && row.created.toISOString ? '<span class="datestring" data-date="' + row.created.toISOString() + '" title="' + row.created.toISOString() + '">' + row.created.toISOString() + '</span>' : 'N/A').concat('<span class="glyphicon glyphicon-wrench" aria-hidden="true"></span><a href="/lists/subscription/' + list.id + '/edit/' + row.cid + '">Edit</a>'))
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -72,7 +72,7 @@
|
||||||
<p></p>
|
<p></p>
|
||||||
|
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
<table data-topic-url="/lists" data-topic-id="{{id}}" data-sort-column="1" data-sort-order="asc" {{#if useSegment}} data-topic-args="segment={{useSegment}}" {{/if}} class="table table-bordered table-hover data-table-ajax display nowrap" width="100%" data-row-sort="0,1,1,1{{customSort}},1,0">
|
<table data-topic-url="/lists" data-topic-id="{{id}}" data-sort-column="1" data-sort-order="asc" {{#if useSegment}} data-topic-args="segment={{useSegment}}" {{/if}} class="table table-bordered table-hover data-table-ajax display nowrap" width="100%" data-row-sort="0,1,1,1{{customSort}},1,1,0">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="col-md-1">
|
<th class="col-md-1">
|
||||||
|
@ -95,6 +95,9 @@
|
||||||
<th>
|
<th>
|
||||||
Status
|
Status
|
||||||
</th>
|
</th>
|
||||||
|
<th>
|
||||||
|
Created
|
||||||
|
</th>
|
||||||
<th></th>
|
<th></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue