Skip to content

Commit 4895855

Browse files
committed
Fix corpus table column headers and remove irrelevant CI columns
Changes: - Created addCorpusTableHeader() with correct column names: Documentation, Repository, License, Issues - Changed addCorpusTable() to use addCorpusTableHeader() instead of generic addTableHeader() - Removed Doc CI and Core CI columns from addCorpusTR() - Reduced table from 6 to 4 columns - Updated addEmptyRow() to addEmptyRow(4) to match column count
1 parent 93d11ff commit 4895855

1 file changed

Lines changed: 22 additions & 4 deletions

File tree

assets/js/corpustable.js

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,34 @@
44

55
// Corpus-specific functions
66

7+
function addCorpusTableHeader() {
8+
// Creating and adding data to first row of the table
9+
let row_1 = document.createElement('tr');
10+
let heading_1 = document.createElement('th');
11+
heading_1.innerHTML = 'Documen­tation';
12+
let heading_2 = document.createElement('th');
13+
heading_2.innerHTML = 'Reposi­tory';
14+
let heading_3 = document.createElement('th');
15+
heading_3.innerHTML = 'License';
16+
let heading_4 = document.createElement('th');
17+
heading_4.innerHTML = 'Issues';
18+
19+
row_1.appendChild(heading_1);
20+
row_1.appendChild(heading_2);
21+
row_1.appendChild(heading_3);
22+
row_1.appendChild(heading_4);
23+
24+
return row_1;
25+
}
26+
727
function addCorpusTable(repos, mainFilter, filters) {
828
let table = document.createElement('table');
929
let thead = document.createElement('thead');
1030
let tbody = document.createElement('tbody');
1131

1232
table.appendChild(thead);
1333
table.appendChild(tbody);
14-
thead.appendChild(addTableHeader());
34+
thead.appendChild(addCorpusTableHeader());
1535

1636
for (const repo of repos) {
1737
if (repo.name.startsWith(mainFilter)) {
@@ -26,7 +46,7 @@ function addCorpusTable(repos, mainFilter, filters) {
2646
}
2747
// If no repos found, inform the user:
2848
if (!tbody.firstChild) {
29-
tbody.appendChild(addEmptyRow());
49+
tbody.appendChild(addEmptyRow(4));
3050
}
3151
return table;
3252
}
@@ -41,8 +61,6 @@ function addCorpusTR(repo) {
4161
row.appendChild(addRepo(repo));
4262
row.appendChild(addRLicense(repo));
4363
row.appendChild(addIssues(repo));
44-
row.appendChild(addRDoc(repo));
45-
row.appendChild(addCI(repo));
4664

4765
return row;
4866
}

0 commit comments

Comments
 (0)