projects
/
websub-hub
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
bump package version to 1.3.12
[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 a70c510633b810c2a7508d6ce80841b57d22c988..e239e72612aafe41dc901cda2d9c670d2fe9c52f 100644
(file)
--- a/
src/template/admin-topic-details-html.js
+++ b/
src/template/admin-topic-details-html.js
@@
-1,6
+1,7
@@
'use strict';
const th = require('./template-helper');
'use strict';
const th = require('./template-helper');
+const { sessionNavLinks } = require('@squeep/authentication-module');
/**
* Show a topic with all of its subscribers.
/**
* Show a topic with all of its subscribers.
@@
-13,6
+14,7
@@
const th = require('./template-helper');
* @returns {string} html
*/
module.exports = (ctx, options) => {
* @returns {string} html
*/
module.exports = (ctx, options) => {
+ const pagePathLevel = 2;
const pageTitle = `${options.manager.pageTitle} - Topic Details`;
const logoUrl = options.manager.logoUrl;
const navLinks = [
const pageTitle = `${options.manager.pageTitle} - Topic Details`;
const logoUrl = options.manager.logoUrl;
const navLinks = [
@@
-27,11
+29,14
@@
module.exports = (ctx, options) => {
}
const htmlOptions = {
}
const htmlOptions = {
+ pageIdentifier: 'admin',
pageTitle,
logoUrl,
navLinks,
footerEntries,
};
pageTitle,
logoUrl,
navLinks,
footerEntries,
};
+ th.navLinks(pagePathLevel, ctx, htmlOptions);
+ sessionNavLinks(pagePathLevel, ctx, htmlOptions);
const content = [
` <section class="topics">
const content = [
` <section class="topics">
@@
-46,7
+51,7
@@
module.exports = (ctx, options) => {
</section>`,
` <section class="history">
<p>Topic Publish History — ${ctx.publishCount} updates in the last ${ctx.publishSpan} days</p>
</section>`,
` <section class="history">
<p>Topic Publish History — ${ctx.publishCount} updates in the last ${ctx.publishSpan} days</p>
- <img title="Topic Publish History" src="${ctx.params.topicId}/history.svg">
+ <img title="Topic Publish History" src="${ctx.params.topicId}/history.svg"
alt="histogram of publish history"
>
</section>`,
` <section class="subscriptions">
<p>${ctx.subscriptions.length ? ctx.subscriptions.length : 'no'} subscription${(ctx.subscriptions.length === 1) ? '' : 's'}</p>`,
</section>`,
` <section class="subscriptions">
<p>${ctx.subscriptions.length ? ctx.subscriptions.length : 'no'} subscription${(ctx.subscriptions.length === 1) ? '' : 's'}</p>`,
@@
-68,5
+73,5
@@
module.exports = (ctx, options) => {
</section>`,
];
</section>`,
];
- return th.htmlPage(
2
, ctx, htmlOptions, content);
+ return th.htmlPage(
pagePathLevel
, ctx, htmlOptions, content);
};
\ No newline at end of file
};
\ No newline at end of file