Fixes #36 Update status to match core
This commit is contained in:
parent
2941a5903f
commit
e0d62ccc4f
@ -6,13 +6,13 @@ block content
|
|||||||
-
|
-
|
||||||
- let list = []
|
- let list = []
|
||||||
- for(let i = 0; i < content.length; i++) {
|
- for(let i = 0; i < content.length; i++) {
|
||||||
- list.push({ "name": content[i].name, "path": content[i].name, "status": content[i].status, "display": (content[i].hasOwnProperty("display") && content[i].display != "" ? content[i].display : content[i].name.toSentenceCase().toContent()) } )
|
- list.push({ "name": content[i].name, "core": (typeof content[i].core != 'undefined' && content[i].core ? 'true' : 'false'), "path": content[i].name, "status": content[i].status, "display": (content[i].hasOwnProperty("display") && content[i].display != "" ? content[i].display : content[i].name.toSentenceCase().toContent()) } )
|
||||||
- if (content[i].files != undefined) {
|
- if (content[i].files != undefined) {
|
||||||
- for (let ii = 0; ii < content[i].files.length; ii++) {
|
- for (let ii = 0; ii < content[i].files.length; ii++) {
|
||||||
- list.push({ "name": content[i].files[ii].name, "path": content[i].name +"."+ content[i].files[ii].name, "status": content[i].files[ii].status, "display": (content[i].files[ii].hasOwnProperty("display") && content[i].files[ii].display != "" ? content[i].files[ii].display : content[i].files[ii].name.toSentenceCase().toContent()) } )
|
- list.push({ "name": content[i].files[ii].name, "core": (typeof content[i].files[ii].core != 'undefined' && content[i].files[ii].core ? 'true' : 'false'), "path": content[i].name +"."+ content[i].files[ii].name, "status": content[i].files[ii].status, "display": (content[i].files[ii].hasOwnProperty("display") && content[i].files[ii].display != "" ? content[i].files[ii].display : content[i].files[ii].name.toSentenceCase().toContent()) } )
|
||||||
- if (content[i].files[ii].files != undefined) {
|
- if (content[i].files[ii].files != undefined) {
|
||||||
- for (let iii = 0; iii < content[i].files[ii].files.length; iii++) {
|
- for (let iii = 0; iii < content[i].files[ii].files.length; iii++) {
|
||||||
- list.push({ "name": content[i].files[ii].files[iii].name, "path": content[i].name +"."+ content[i].files[ii].name + "." + content[i].files[ii].files[iii].name, "status": content[i].files[ii].files[iii].status, "display": (content[i].files[ii].files[iii].hasOwnProperty("display") && content[i].files[ii].files[iii].display != "" ? content[i].files[ii].files[iii].display : content[i].files[ii].files[iii].name.toSentenceCase().toContent()) } )
|
- list.push({ "name": content[i].files[ii].files[iii].name, "core": (typeof content[i].files[ii].files[iii].core != 'undefined' && content[i].files[ii].files[iii].core ? 'true' : 'false'), "path": content[i].name +"."+ content[i].files[ii].name + "." + content[i].files[ii].files[iii].name, "status": content[i].files[ii].files[iii].status, "display": (content[i].files[ii].files[iii].hasOwnProperty("display") && content[i].files[ii].files[iii].display != "" ? content[i].files[ii].files[iii].display : content[i].files[ii].files[iii].name.toSentenceCase().toContent()) } )
|
||||||
- }
|
- }
|
||||||
- }
|
- }
|
||||||
- }
|
- }
|
||||||
@ -64,7 +64,10 @@ block content
|
|||||||
else
|
else
|
||||||
| !{category.name.toContent().toSentenceCase()}
|
| !{category.name.toContent().toSentenceCase()}
|
||||||
td
|
td
|
||||||
span(class="status-" + category.status)= category.status.toContent().toSentenceCase()
|
if typeof category.core && category.core
|
||||||
|
span.status-complete Complete (Core)
|
||||||
|
else
|
||||||
|
span(class="status-" + category.status)= category.status.toContent().toSentenceCase()
|
||||||
|
|
||||||
|
|
||||||
if category.files
|
if category.files
|
||||||
@ -77,7 +80,10 @@ block content
|
|||||||
else
|
else
|
||||||
| !{pattern.name.toContent().toSentenceCase()}
|
| !{pattern.name.toContent().toSentenceCase()}
|
||||||
td
|
td
|
||||||
span(class="status-" + pattern.status)= pattern.status.toContent().toSentenceCase()
|
if typeof pattern.core && pattern.core
|
||||||
|
span.status-complete Complete (Core)
|
||||||
|
else
|
||||||
|
span(class="status-" + pattern.status)= pattern.status.toContent().toSentenceCase()
|
||||||
|
|
||||||
if pattern.files
|
if pattern.files
|
||||||
|
|
||||||
@ -90,14 +96,22 @@ block content
|
|||||||
else
|
else
|
||||||
| !{sub.name.toContent().toSentenceCase()}
|
| !{sub.name.toContent().toSentenceCase()}
|
||||||
td
|
td
|
||||||
span(class="status-" + sub.status)= sub.status.toContent().toSentenceCase()
|
if typeof sub.core && sub.core
|
||||||
|
span.status-complete Complete (Core)
|
||||||
|
else
|
||||||
|
span(class="status-" + sub.status)= sub.status.toContent().toSentenceCase()
|
||||||
|
|
||||||
div.status-report.status-report-status(data-tab="by status")
|
div.status-report.status-report-status(data-tab="by status")
|
||||||
table(role="presentation")
|
table(role="presentation")
|
||||||
|
|
||||||
tbody
|
tbody
|
||||||
|
- bystatus = list;
|
||||||
|
- for(i=0; i < bystatus.length; i++) {
|
||||||
|
- if (bystatus[i].core == "true") {
|
||||||
|
- bystatus[i].status = "complete"
|
||||||
|
- }
|
||||||
|
- }
|
||||||
each status in statuses || []
|
each status in statuses || []
|
||||||
- out = list.filter(list => list.status === status.name)
|
- out = bystatus.filter(list => list.status === status.name)
|
||||||
tr
|
tr
|
||||||
td(colspan="2")
|
td(colspan="2")
|
||||||
span(class="status-" + status.name)= status.name.toContent().toSentenceCase() + " (" + out.length + ")"
|
span(class="status-" + status.name)= status.name.toContent().toSentenceCase() + " (" + out.length + ")"
|
||||||
@ -110,6 +124,9 @@ block content
|
|||||||
| !{item.display}
|
| !{item.display}
|
||||||
else
|
else
|
||||||
| !{item.name.toContent().toSentenceCase()}
|
| !{item.name.toContent().toSentenceCase()}
|
||||||
|
td
|
||||||
|
if item.core == "true"
|
||||||
|
span (core)
|
||||||
td= getCategory(item.path)
|
td= getCategory(item.path)
|
||||||
|
|
||||||
div.status-report.status-report-alpha(data-tab="alphabetical")
|
div.status-report.status-report-alpha(data-tab="alphabetical")
|
||||||
@ -125,6 +142,9 @@ block content
|
|||||||
| !{item.name.toContent().toSentenceCase()}
|
| !{item.name.toContent().toSentenceCase()}
|
||||||
td
|
td
|
||||||
span
|
span
|
||||||
span(class="status-" + item.status)= item.status.toContent().toTitleCase()
|
if item.core == "true"
|
||||||
|
span.status-complete Complete (Core)
|
||||||
|
else
|
||||||
|
span(class="status-" + item.status)= item.status.toContent().toTitleCase()
|
||||||
td= getCategory(item.path)
|
td= getCategory(item.path)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user