diff options
author | Martin Fischer <martin@push-f.com> | 2022-07-12 12:57:26 +0200 |
---|---|---|
committer | Martin Fischer <martin@push-f.com> | 2022-07-12 12:57:26 +0200 |
commit | bbe6d4740723315fc91b0298ab8a0a6292fa4ac7 (patch) | |
tree | 0802dcf068a218c1cbe43f6add1bbc11112a8fb3 | |
parent | 850ec09bdcf55b5cbbf9539fcb7355ed7161935a (diff) |
merge date columns
-rw-r--r-- | index.html | 4 | ||||
-rw-r--r-- | script.js | 14 |
2 files changed, 12 insertions, 6 deletions
@@ -6,10 +6,8 @@ <table border=1> <thead> <th>Status</th> + <th>Date</th> <th>Name</th> - <th>Draft start</th> - <th>RFC start</th> - <th>Vote start</th> <th>Authors</th> </thead> <tbody id=tbody> @@ -17,12 +17,20 @@ function newEl(tagname, content) { const statusCell = newEl('td', proposal.status); statusCell.className = 'status-' + proposal.status; row.appendChild(statusCell); + + let date = '???'; + if (proposal.status == 'voting' || proposal.status == 'approved' || proposal.status == 'rejected') { + date = proposal.vote_start; + } else if (proposal.status == 'proposed') { + date = proposal.rfc_start; + } else { + date = proposal.draft_start; + } + row.appendChild(newEl('td', date)); + const link = newEl('a', proposal.name); link.href = 'https://wiki.openstreetmap.org/wiki/' + proposal.page_title.replaceAll(' ', '_'); row.appendChild(newEl('td', link)); - row.appendChild(newEl('td', proposal.draft_start)); - row.appendChild(newEl('td', proposal.rfc_start)); - row.appendChild(newEl('td', proposal.vote_start)); row.appendChild(newEl('td', proposal.authors)); tbody.appendChild(row); |