new translation fix and some overall imrpovement to how the tournament and league workflow works.
This commit is contained in:
@@ -4,7 +4,13 @@
|
||||
<meta charset="UTF-8" />
|
||||
<title data-i18n="tournament.tournament_results">Tournament Results</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="stylesheet" href="/static/css/base.css">
|
||||
<link rel="stylesheet" href="/static/css/navbar.css">
|
||||
<link rel="stylesheet" href="/static/css/buttons.css">
|
||||
<link rel="stylesheet" href="/static/css/components.css">
|
||||
<link rel="stylesheet" href="/static/css/responsive.css">
|
||||
<style>
|
||||
/* Results display specific styles */
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
@@ -642,6 +648,7 @@
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<script src="/static/js/i18n.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="navbar">
|
||||
@@ -649,7 +656,7 @@
|
||||
<div class="navbar-title">🏆 <span data-i18n="tournament.tournament_results">Tournament Results</span></div>
|
||||
</div>
|
||||
<div class="navbar-controls">
|
||||
<a href="/" class="nav-btn"> <span data-i18n="navigation.dashboard">Dashboard</span></a>
|
||||
<a href="/" class="nav-btn">📺 <span data-i18n="navigation.dashboard">Dashboard</span></a>
|
||||
<button class="nav-btn" onclick="printResults()">🖨️ <span data-i18n="general.print">Print</span></button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -888,9 +895,20 @@
|
||||
const mostTens = count > 0 ? Math.max(...processedParticipants.map(p => p.tens_count)) : 0;
|
||||
const averageScore = count > 0 ? Math.round(processedParticipants.reduce((sum, p) => sum + p.total_score, 0) / count) : 0;
|
||||
|
||||
const currentDate = results && results.created_at ?
|
||||
results.created_at.substring(0, 10) :
|
||||
new Date().toISOString().substring(0, 10);
|
||||
// Format date from YYYY-MM-DD to DD-MM-YY
|
||||
function formatFooterDate(dateString) {
|
||||
if (!dateString) return '';
|
||||
const parts = dateString.split('-');
|
||||
if (parts.length !== 3) return dateString;
|
||||
const year = parts[0].slice(-2);
|
||||
const month = parts[1];
|
||||
const day = parts[2];
|
||||
return `${day}-${month}-${year}`;
|
||||
}
|
||||
|
||||
const currentDate = results && results.created_at ?
|
||||
formatFooterDate(results.created_at.substring(0, 10)) :
|
||||
formatFooterDate(new Date().toISOString().substring(0, 10));
|
||||
|
||||
// Update header stats
|
||||
document.getElementById('participantCount').textContent = count;
|
||||
@@ -958,14 +976,5 @@
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<!-- Include i18n support -->
|
||||
<script src="/static/js/i18n.js"></script>
|
||||
<script>
|
||||
// Initialize language selector and i18n
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
translatePage();
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user