2
0
Fork 0
tcrud/lib/plugin/format/format-csv.js

22 lines
568 B
JavaScript
Raw Normal View History

2017-06-10 14:53:29 +00:00
module.exports = (function () {
return function FormatCsvPlugin() {
this.configPlugin = function (ctx) {
ctx.key = 'formatCSV';
ctx.description = 'Export tentity list/read api in csv format.';
ctx.localDir = __dirname;
ctx.localConfigTemplate = 'format-csv.json';
};
this.configApiTListExport = function (ctx) {
return ctx.renderTemplateDataList(ctx.tview.tmeta.tplugin.formatCSV.tmime);
};
this.configApiTReadExport = function (ctx) {
return ctx.renderTemplateDataRead(ctx.tview.tmeta.tplugin.formatCSV.tmime);
};
};
})();