projects
/
websub-hub
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
refactor of authentication and html-templates into separate modules
[websub-hub]
/
src
/
template
/
admin-topic-details-html.js
diff --git
a/src/template/admin-topic-details-html.js
b/src/template/admin-topic-details-html.js
index 448de09efdb369a346deff79cffbaa5f307c11c7..0c281e48086ef4514ea75996ec62577b0823d66d 100644
(file)
--- a/
src/template/admin-topic-details-html.js
+++ b/
src/template/admin-topic-details-html.js
@@
-14,24
+14,34
@@
const th = require('./template-helper');
*/
module.exports = (ctx, options) => {
const pageTitle = `${options.manager.pageTitle} - Topic Details`;
*/
module.exports = (ctx, options) => {
const pageTitle = `${options.manager.pageTitle} - Topic Details`;
- const
headElements = []
;
+ const
logoUrl = options.manager.logoUrl
;
const navLinks = [
{
href: '..',
text: '↑ All Topics',
},
];
const navLinks = [
{
href: '..',
text: '↑ All Topics',
},
];
+ const footerEntries = options.manager.footerEntries;
if (!ctx.subscriptions) {
ctx.subscriptions = [];
}
if (!ctx.subscriptions) {
ctx.subscriptions = [];
}
- return th.htmlTemplate(2, pageTitle, headElements, navLinks, [
+
+ const htmlOptions = {
+ pageTitle,
+ logoUrl,
+ navLinks,
+ footerEntries,
+ };
+
+ const content = [
+ '<script>0</script>', // This fixes a layout rendering flash on load in FF; do not know why this works but it does.
` <section class="topics">
<table>
<thead>`,
th.renderTopicRowHeader(),
` </thead>
<tbody>`,
` <section class="topics">
<table>
<thead>`,
th.renderTopicRowHeader(),
` </thead>
<tbody>`,
- ...(ctx.topic && [ th.renderTopicRow(ctx.topic, ctx.subscriptions, false) ]),
+ ...(ctx.topic && [ th.renderTopicRow(ctx.topic, ctx.subscriptions, false) ]
|| []
),
` </tbody>
</table>
</section>`,
` </tbody>
</table>
</section>`,
@@
-46,5
+56,7
@@
module.exports = (ctx, options) => {
` </tbody>
</table>
</section>`,
` </tbody>
</table>
</section>`,
- ]);
+ ];
+
+ return th.htmlPage(2, htmlOptions, content);
};
\ No newline at end of file
};
\ No newline at end of file