Files
BD-Core-FHIR-IG/input/pagecontent/history.xml
Dr. B. M. Riazul Islam 3b48bd79e2
All checks were successful
FHIR IG CI/CD Pipeline with Version Persistence / build-ig (push) Successful in 6m30s
FHIR IG CI/CD Pipeline with Version Persistence / deploy (push) Successful in 9s
updated template
2026-03-07 03:49:23 +06:00

96 lines
3.4 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<div xmlns="http://www.w3.org/1999/xhtml">
<p><b>Version History</b></p>
<p>This page provides the version history for the Bangladesh Core FHIR Implementation Guide.</p>
<p>For a machine-readable version history, see <a href="package-list.json">package-list.json</a>.</p>
<div id="version-history-loading">
<p><i>Loading version history...</i></p>
</div>
<div id="version-history-content" style="display:none;">
<p><b>Published Versions</b></p>
<table class="grid" id="versions-table">
<thead>
<tr>
<th>Version</th>
<th>Date</th>
<th>Status</th>
<th>Description</th>
</tr>
</thead>
<tbody id="versions-tbody">
</tbody>
</table>
<p><b>Continuous Integration Build</b></p>
<div id="ci-build-info"></div>
</div>
<div id="version-history-error" style="display:none;">
<p><i>Version history not available.</i></p>
</div>
<script>
(async function() {
const loadingDiv = document.getElementById('version-history-loading');
const contentDiv = document.getElementById('version-history-content');
const errorDiv = document.getElementById('version-history-error');
const tbody = document.getElementById('versions-tbody');
const ciDiv = document.getElementById('ci-build-info');
// We try multiple paths to ensure we find the JSON whether we are at root or in a version folder
const pathsToTry = [
'package-list.json', // Current folder
'../package-list.json', // Parent folder
'/core/package-list.json' // Absolute web root
];
let data = null;
for (const path of pathsToTry) {
try {
console.log('Attempting to fetch history from:', path);
const response = await fetch(path);
if (response.ok) {
data = await response.json();
console.log('Successfully loaded version history from:', path);
break;
}
} catch (e) {
console.warn('Failed to fetch from:', path, e);
}
}
if (!data || !data.list) {
loadingDiv.style.display = 'none';
errorDiv.style.display = 'block';
return;
}
// Sort list to show newest first (optional, but recommended)
data.list.forEach(entry => {
if (entry.version !== 'current') {
const row = tbody.insertRow();
// Use entry.path from JSON to ensure links always point to the right place
row.insertCell(0).innerHTML = `<a href="${entry.path}"><b>${entry.version}</b></a>`;
row.insertCell(1).textContent = entry.date || 'N/A';
row.insertCell(2).innerHTML = `<span class="badge">${entry.status || 'unknown'}</span>`;
row.insertCell(3).textContent = entry.desc || '';
} else {
// Continuous Integration Build info
ciDiv.innerHTML = `
<div style="background-color: #f8f9fa; padding: 10px; border-left: 5px solid #007bff;">
<p>The latest development build is available at: <a href="${entry.path}">${entry.path}</a></p>
<p><small>Note: This is a continuous integration build and may be unstable.</small></p>
</div>`;
}
});
loadingDiv.style.display = 'none';
contentDiv.style.display = 'block';
})();
</script>
</div>