Skip to content

Commit

Permalink
db-tabulator: support footer_template
Browse files Browse the repository at this point in the history
  • Loading branch information
siddharthvp committed Nov 23, 2023
1 parent a42b52f commit 6173e94
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions db-tabulator/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,7 @@ export class Query {

const row_template = this.getTemplateValue('row_template');
const header_template = this.getTemplateValue('header_template');
const footer_template = this.getTemplateValue('footer_template');
const skip_table = this.getTemplateValue('skip_table');

let table: InstanceType<typeof Mwn.table>;
Expand Down Expand Up @@ -501,6 +502,10 @@ export class Query {
// but module does show a warning
}

if (skip_table && footer_template) {
tableText += '{{' + footer_template + '}}\n';
}

// Get DB replag, but no need to do this any more than once in 6 hours (when triggered via
// webservice or eventstream-router).
if (
Expand Down Expand Up @@ -613,6 +618,7 @@ export class Query {
}
let textToReplace = text.slice(
beginTemplateEndIdx,
// TODO: If end template not found, mention that in edit summary
endTemplateStartIdx === -1 ? undefined : endTemplateStartIdx
);
return text.slice(0, beginTemplateEndIdx) +
Expand Down

0 comments on commit 6173e94

Please sign in to comment.