Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added control to permit moving custom sotd #360

Merged
merged 1 commit into from Nov 25, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions js/w3c/templates/cgbg-sotd.html
Expand Up @@ -14,7 +14,9 @@
Learn more about
<a href="http://www.w3.org/community/">W3C Community and Business Groups</a>.
</p>
{{#unless sotdAfterWGinfo}}
{{{sotdCustomParagraph}}}
{{/unless}}
{{#if wgPublicList}}
<p>If you wish to make comments regarding this document, please send them to
<a href='mailto:{{wgPublicList}}@w3.org{{#if subjectPrefix}}?subject={{subjectPrefixEnc}}{{/if}}'>{{wgPublicList}}@w3.org</a>
Expand All @@ -24,4 +26,7 @@
with <code>{{subjectPrefix}}</code> at the start of your
email's subject{{/if}}.</p>
{{/if}}
{{#if sotdAfterWGinfo}}
{{{sotdCustomParagraph}}}
{{/if}}
</section>
5 changes: 5 additions & 0 deletions js/w3c/templates/sotd.html
Expand Up @@ -25,7 +25,9 @@
href='http://www.w3.org/TR/'>W3C technical reports index</a> at
http://www.w3.org/TR/.</em>
</p>
{{#unless sotdAfterWGinfo}}
{{{sotdCustomParagraph}}}
{{/unless}}
<p>
This document was published by the {{{wgHTML}}} as {{anOrA}} {{longStatus}}.
{{#if notYetRec}}
Expand Down Expand Up @@ -66,6 +68,9 @@
report</a>.
</p>
{{/if}}
{{#if sotdAfterWGinfo}}
{{{sotdCustomParagraph}}
{{/if}}
{{#if notRec}}
<p>
Publication as {{anOrA}} {{textStatus}} does not imply endorsement by the W3C
Expand Down
14 changes: 14 additions & 0 deletions tests/spec/w3c/headers-spec.js
Expand Up @@ -233,6 +233,20 @@ describe("W3C — Headers", function () {
});
});

// sotdAfterWGinfo
it("should relocate custom sotd", function () {
loadWithConfig({ sotdAfterWGinfo: true, wg: "WGNAME", wgURI: "WGURI", wgPublicList: "WGLIST", subjectPrefix: "[The Prefix]" }, function ($ifr) {
var $sotd = $("#sotd", $ifr[0].contentDocument);
console.log($sotd.text());
var $f = $($sotd.find("p:contains('CUSTOM PARAGRAPH')")) ;
expect($f.length).toEqual(1);
var $p = $f.prev() ;
expect($("a:contains('WGNAME')", $p).length).toEqual(1);
expect($("a:contains('WGNAME')", $p).attr("href")).toEqual("WGURI");
expect($("a:contains('WGLIST@w3.org')", $p).attr("href")).toEqual("mailto:WGLIST@w3.org?subject=%5BThe%20Prefix%5D");
});
});

// charterDisclosureURI
it("should take charterDisclosureURI into account", function () {
loadWithConfig({ specStatus: "IG-NOTE", charterDisclosureURI: "URI" }, function ($ifr) {
Expand Down