Enhance print layouts with branded headers and fix navigation consistency
- Replace plain print headers with full branded headers including logo - Add dynamic tournament-type styling (🎯 4-target, ⚡ 20-target, 💪 40-target) - Remove border lines and optimize spacing for clean print appearance - Fix emoji positioning in league championship headers - Standardize navigation with proper active button indicators - Add missing translation keys for calculator instructions - Update print media queries for professional document output Print improvements: - Logo and branding now appear on printed results - Consistent 20px spacing between header and table - Clean white background with subtle borders - Optimized typography for print readability Navigation fixes: - Added active button highlighting across all PC pages - Consistent navigation order: Dashboard → Tournament → Player Analysis → Archive → Draft → Calculator - Fixed draft page active indicator 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com> This commit message covers all the major improvements we made: - Print layout enhancements with branded headers - Navigation standardization and active indicators - Translation fixes - Visual styling improvements - Professional document output optimization
This commit is contained in:
+186
-114
@@ -2,7 +2,7 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>Tournament Management</title>
|
||||
<title data-i18n="tournament.tournament_management">Tournament Management</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<style>
|
||||
* {
|
||||
@@ -62,28 +62,17 @@
|
||||
color: #007bff;
|
||||
}
|
||||
|
||||
.nav-btn.primary {
|
||||
.nav-btn.active {
|
||||
background: #007bff;
|
||||
border-color: #0056b3;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.nav-btn.primary:hover {
|
||||
.nav-btn.active:hover {
|
||||
background: #0056b3;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.nav-btn.success {
|
||||
background: #28a745;
|
||||
border-color: #1e7e34;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.nav-btn.success:hover {
|
||||
background: #1e7e34;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.nav-btn.danger {
|
||||
background: #dc3545;
|
||||
border-color: #c82333;
|
||||
@@ -193,21 +182,85 @@
|
||||
.type-option {
|
||||
background: white;
|
||||
border: 2px solid #dee2e6;
|
||||
border-radius: 8px;
|
||||
padding: 20px;
|
||||
border-radius: 12px;
|
||||
padding: 25px;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s ease;
|
||||
transition: all 0.3s ease;
|
||||
text-align: center;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.type-option:hover {
|
||||
border-color: #007bff;
|
||||
box-shadow: 0 2px 8px rgba(0, 123, 255, 0.15);
|
||||
.type-option::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
height: 4px;
|
||||
border-radius: 12px 12px 0 0;
|
||||
background: #dee2e6;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.type-option.selected {
|
||||
border-color: #007bff;
|
||||
background: #f0f8ff;
|
||||
/* 4 Targets - Green theme */
|
||||
.type-option[data-type="4_targets"] {
|
||||
border-color: #11998e;
|
||||
}
|
||||
|
||||
.type-option[data-type="4_targets"]:hover {
|
||||
border-color: #0f766e;
|
||||
box-shadow: 0 4px 15px rgba(17, 153, 142, 0.25);
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
|
||||
.type-option[data-type="4_targets"].selected {
|
||||
border-color: #0f766e;
|
||||
background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
|
||||
}
|
||||
|
||||
.type-option[data-type="4_targets"]::before {
|
||||
background: linear-gradient(90deg, #11998e 0%, #38ef7d 100%);
|
||||
}
|
||||
|
||||
/* 20 Targets - Red theme */
|
||||
.type-option[data-type="20_targets"] {
|
||||
border-color: #ff6b6b;
|
||||
}
|
||||
|
||||
.type-option[data-type="20_targets"]:hover {
|
||||
border-color: #e53e3e;
|
||||
box-shadow: 0 4px 15px rgba(255, 107, 107, 0.25);
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
|
||||
.type-option[data-type="20_targets"].selected {
|
||||
border-color: #e53e3e;
|
||||
background: linear-gradient(135deg, #fff5f5 0%, #ffe8e8 100%);
|
||||
}
|
||||
|
||||
.type-option[data-type="20_targets"]::before {
|
||||
background: linear-gradient(90deg, #ff6b6b 0%, #ff8e53 100%);
|
||||
}
|
||||
|
||||
/* 40 Targets - Blue theme */
|
||||
.type-option[data-type="40_targets"] {
|
||||
border-color: #667eea;
|
||||
}
|
||||
|
||||
.type-option[data-type="40_targets"]:hover {
|
||||
border-color: #5a67d8;
|
||||
box-shadow: 0 4px 15px rgba(102, 126, 234, 0.25);
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
|
||||
.type-option[data-type="40_targets"].selected {
|
||||
border-color: #5a67d8;
|
||||
background: linear-gradient(135deg, #f8f9ff 0%, #e8ebff 100%);
|
||||
}
|
||||
|
||||
.type-option[data-type="40_targets"]::before {
|
||||
background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
|
||||
}
|
||||
|
||||
.type-option input[type="radio"] {
|
||||
@@ -294,11 +347,12 @@
|
||||
padding: 15px 30px;
|
||||
border-radius: 8px;
|
||||
cursor: pointer;
|
||||
font-size: 1.1rem;
|
||||
font-size: 0.9rem;
|
||||
font-weight: bold;
|
||||
transition: all 0.2s ease;
|
||||
min-width: 200px;
|
||||
text-decoration: none;
|
||||
font-family: Arial, sans-serif;
|
||||
}
|
||||
|
||||
.action-btn:hover {
|
||||
@@ -909,16 +963,19 @@
|
||||
</head>
|
||||
<body>
|
||||
<div class="navbar">
|
||||
<div class="navbar-title">🏆 Tournament Management</div>
|
||||
<div class="navbar-title">🏆 <span data-i18n="tournament.tournament_management">Tournament Management</span></div>
|
||||
<div class="navbar-controls">
|
||||
<a href="/" class="nav-btn">← Dashboard</a>
|
||||
<a href="/" class="nav-btn">📺 <span data-i18n="navigation.dashboard">Dashboard</span></a>
|
||||
<a href="/tournament" class="nav-btn active">🏆 <span data-i18n="navigation.tournament">Tournament</span></a>
|
||||
<a href="/archive/player-analysis" class="nav-btn">👤 <span data-i18n="players.player_analysis">Player Analysis</span></a>
|
||||
<a href="/archive" class="nav-btn">📚 <span data-i18n="navigation.archive">Archive</span></a>
|
||||
{% if league_state and not league_state.league_finished %}
|
||||
<a href="/results/calculator" class="nav-btn primary">🎯 Results Calculator</a>
|
||||
<button class="nav-btn danger" onclick="resetLeague()">🗑️ Reset League</button>
|
||||
<a href="/results/calculator" class="nav-btn">🎯 <span data-i18n="navigation.calculator">Results Calculator</span></a>
|
||||
<button class="nav-btn danger" onclick="resetLeague()"> <span data-i18n="league.reset_league">Reset League</span></button>
|
||||
{% elif tournament_state %}
|
||||
<a href="/tournament/draft" class="nav-btn">📋 View Draft</a>
|
||||
<a href="/results/calculator" class="nav-btn primary">🎯 Results Calculator</a>
|
||||
<button class="nav-btn danger" onclick="resetTournament()">🗑️ Reset Tournament</button>
|
||||
<a href="/tournament/draft" class="nav-btn">📋 <span data-i18n="tournament.view_draft">Draft</span></a>
|
||||
<a href="/results/calculator" class="nav-btn">🎯 <span data-i18n="navigation.calculator">Results Calculator</span></a>
|
||||
<button class="nav-btn danger" onclick="resetTournament()">🗑️ <span data-i18n="tournament.reset_tournament">Reset Tournament</span></button>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
@@ -927,12 +984,12 @@
|
||||
<!-- League/Tournament Management Section -->
|
||||
<div class="section">
|
||||
{% if league_state and not league_state.league_finished %}
|
||||
<h2 class="section-title">🏆 League Management</h2>
|
||||
<h2 class="section-title" data-i18n="league.league_management">🏆 Upravljanje Lige</h2>
|
||||
<div class="league-status">
|
||||
<div class="league-active">🏆 League Active</div>
|
||||
<div class="league-active" data-i18n="league.league_active">🏆 League Active</div>
|
||||
<div class="league-info">
|
||||
<div class="info-item">
|
||||
<div class="info-label">Tournament Type</div>
|
||||
<div class="info-label" data-i18n="tournament.tournament_type">Tip Turnirja</div>
|
||||
<div class="info-value">
|
||||
{% if league_state.tournament_type == '40_targets' %}
|
||||
40 Targets
|
||||
@@ -944,19 +1001,19 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<div class="info-label">Current Tournament</div>
|
||||
<div class="info-label" data-i18n="tournament.current_tournament">Trenutni Turnir</div>
|
||||
<div class="info-value">{{ league_state.current_tournament }} / {{ league_state.total_tournaments }}</div>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<div class="info-label">Participants</div>
|
||||
<div class="info-label" data-i18n="tournament.participants">Udeleženci</div>
|
||||
<div class="info-value">{{ league_state.participants|length }}</div>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<div class="info-label">Completed</div>
|
||||
<div class="info-label" data-i18n="tournament.completed">Zaključeno</div>
|
||||
<div class="info-value">{{ league_state.completed_tournaments|length }}</div>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<div class="info-label">Created</div>
|
||||
<div class="info-label" data-i18n="tournament.created">Ustvarjeno</div>
|
||||
<div class="info-value">{{ league_state.created_at[:10] }}</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -966,8 +1023,8 @@
|
||||
{% if league_state.current_tournament < league_state.total_tournaments %}
|
||||
<!-- Joker selection -->
|
||||
<div class="joker-section" id="jokerSection">
|
||||
<div class="joker-title">🃏 Joker Selection for Tournament {{ league_state.current_tournament + 1 }}</div>
|
||||
<p style="margin-bottom: 15px; color: #856404;">Select players who will use their joker (skip this tournament). Each player can only use their joker once per league.</p>
|
||||
<div class="joker-title">🃏 <span data-i18n="league.joker_selection_for_tournament">Izbira Jokerja za Turnir</span> {{ league_state.current_tournament + 1 }}</div>
|
||||
<p style="margin-bottom: 15px; color: #856404;" data-i18n="league.joker_instructions">Izberite igralce, ki bodo uporabili svojega Jokerja (preskočili ta turnir). Vsak igralec lahko uporabi svojega Žolna samo enkrat na ligo.</p>
|
||||
|
||||
<div class="joker-grid">
|
||||
{% for player_id, participant in league_state.participants.items() %}
|
||||
@@ -985,12 +1042,12 @@
|
||||
|
||||
<div class="action-buttons">
|
||||
<button class="action-btn success" onclick="startNextTournament()">
|
||||
🚀 Start Tournament {{ league_state.current_tournament + 1 }}
|
||||
🚀 <span data-i18n="league.start_tournament_number">Začni Turnir</span> {{ league_state.current_tournament + 1 }}
|
||||
</button>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="warning">
|
||||
<strong>League Complete!</strong> All tournaments scheduled. Finish current one to see final results.
|
||||
<strong data-i18n="league.league_complete">League Complete!</strong> <span data-i18n="league.league_complete_info">All tournaments planned. Finish current for final results.</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
@@ -1002,7 +1059,7 @@
|
||||
<div class="league-active">🏆 League Completed!</div>
|
||||
<div class="league-info">
|
||||
<div class="info-item">
|
||||
<div class="info-label">Tournament Type</div>
|
||||
<div class="info-label" data-i18n="tournament.tournament_type">Tip Turnirja</div>
|
||||
<div class="info-value">
|
||||
{% if league_state.tournament_type == '40_targets' %}
|
||||
40 Targets
|
||||
@@ -1014,32 +1071,32 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<div class="info-label">Participants</div>
|
||||
<div class="info-label" data-i18n="tournament.participants">Udeleženci</div>
|
||||
<div class="info-value">{{ league_state.participants|length }}</div>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<div class="info-label">Tournaments</div>
|
||||
<div class="info-label" data-i18n="tournament.tournaments">Turnirji</div>
|
||||
<div class="info-value">{{ league_state.total_tournaments }}</div>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<div class="info-label">Finished</div>
|
||||
<div class="info-label" data-i18n="tournament.finished">Zaključeno</div>
|
||||
<div class="info-value">{{ league_state.finished_at[:10] if league_state.finished_at else 'Today' }}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="action-buttons">
|
||||
<a href="/results" class="action-btn success">🏆 View League Results</a>
|
||||
<button class="action-btn danger" onclick="resetLeague()">🗑️ Reset League</button>
|
||||
<a href="/results" class="action-btn success">🏆 <span data-i18n="league.view_league_results">View League Results</span></a>
|
||||
<button class="action-btn danger" onclick="resetLeague()">🗑️ <span data-i18n="league.reset_league">Reset League</span></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% elif not league_state and tournament_state %}
|
||||
<h2 class="section-title">🎯 Single Tournament Management</h2>
|
||||
<h2 class="section-title" data-i18n="tournament.tournament_management">🎯 Upravljanje Turnirja</h2>
|
||||
<div class="tournament-status">
|
||||
<div class="tournament-active">🎯 Tournament Active</div>
|
||||
<div class="tournament-active" data-i18n="tournament.active_tournament">🎯 Aktiven Turnir</div>
|
||||
<div class="league-info">
|
||||
<div class="info-item">
|
||||
<div class="info-label">Tournament Type</div>
|
||||
<div class="info-label" data-i18n="tournament.tournament_type">Tip Turnirja</div>
|
||||
<div class="info-value">
|
||||
{% if tournament_state.tournament_type == '40_targets' %}
|
||||
40 Targets
|
||||
@@ -1051,53 +1108,53 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<div class="info-label">Players</div>
|
||||
<div class="info-label" data-i18n="players.players_label">Igralci</div>
|
||||
<div class="info-value">{{ tournament_state.total_players }}</div>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<div class="info-label">Rounds</div>
|
||||
<div class="info-label" data-i18n="tournament.total_rounds">Skupaj Krogov</div>
|
||||
<div class="info-value">{{ tournament_state.total_rounds }}</div>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<div class="info-label">Current Round</div>
|
||||
<div class="info-label" data-i18n="tournament.current_round">Trenutni Krog</div>
|
||||
<div class="info-value">{{ tournament_state.current_round }}</div>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<div class="info-label">Created</div>
|
||||
<div class="info-label" data-i18n="tournament.created">Ustvarjeno</div>
|
||||
<div class="info-value">{{ tournament_state.created_at[:10] if tournament_state.created_at else 'Today' }}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="action-buttons">
|
||||
<a href="/tournament/draft" class="action-btn">📋 View Draft</a>
|
||||
<a href="/results/calculator" class="action-btn success">🎯 Score Tournament</a>
|
||||
<a href="/" class="action-btn">📺 Dashboard</a>
|
||||
<button class="action-btn danger" onclick="resetTournament()">🗑️ Reset Tournament</button>
|
||||
<a href="/tournament/draft" class="action-btn">📋 <span data-i18n="navigation.draft">Žreb</span></a>
|
||||
<a href="/results/calculator" class="action-btn success">🎯 <span data-i18n="navigation.calculator">Results Calculator</span></a>
|
||||
<a href="/" class="action-btn">📺 <span data-i18n="navigation.dashboard">Nadzorna Plošča</span></a>
|
||||
<button class="action-btn danger" onclick="resetTournament()">🗑️ <span data-i18n="tournament.reset_tournament">Reset Tournament</span></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% else %}
|
||||
<h2 class="section-title">🏁 Setup</h2>
|
||||
<div class="league-inactive">No Active League or Tournament</div>
|
||||
<h2 class="section-title" data-i18n="league.setup">🏁 Nastavitev</h2>
|
||||
<div class="league-inactive" data-i18n="league.no_active_league_tournament">Ni Aktivne Lige ali Turnirja</div>
|
||||
|
||||
<!-- Tournament Type Selection -->
|
||||
<div class="tournament-type-selection">
|
||||
<div class="type-title">Select Tournament Type</div>
|
||||
<div class="type-title" data-i18n="league.select_tournament_type">Izberi Tip Turnirja</div>
|
||||
<div class="type-options">
|
||||
<div class="type-option" onclick="selectTournamentType('4_targets')">
|
||||
<div class="type-option" data-type="4_targets" onclick="selectTournamentType('4_targets')">
|
||||
<input type="radio" name="tournament_type" value="4_targets">
|
||||
<div class="type-name">🎯 4 Targets</div>
|
||||
<div class="type-description">Quick format with 4 targets, 5 shots each <br> (20 shots total)</div>
|
||||
<div class="type-description" data-i18n="tournament_types.4_targets_desc">Hitri format s 4 tarčami, 5 strelov na tarčo (20 strelov skupaj)</div>
|
||||
</div>
|
||||
<div class="type-option selected" onclick="selectTournamentType('20_targets')">
|
||||
<div class="type-option selected" data-type="20_targets" onclick="selectTournamentType('20_targets')">
|
||||
<input type="radio" name="tournament_type" value="20_targets" checked>
|
||||
<div class="type-name">⚡ 20 Targets</div>
|
||||
<div class="type-description">Standard format with 20 targets, 2 shots each (40 shots total)</div>
|
||||
<div class="type-description" data-i18n="tournament_types.20_targets_desc">Standardni format z 20 tarčami, 2 strela na tarčo (40 strelov skupaj)</div>
|
||||
</div>
|
||||
<div class="type-option" onclick="selectTournamentType('40_targets')">
|
||||
<div class="type-option" data-type="40_targets" onclick="selectTournamentType('40_targets')">
|
||||
<input type="radio" name="tournament_type" value="40_targets">
|
||||
<div class="type-name">💪 40 Targets</div>
|
||||
<div class="type-description">Extended format with 40 targets, 2 shots each (80 shots total)</div>
|
||||
<div class="type-description" data-i18n="tournament_types.40_targets_desc">Razširjeni format s 40 tarčami, 2 strela na tarčo (80 strelov skupaj)</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1107,8 +1164,8 @@
|
||||
</div>
|
||||
|
||||
<div class="action-buttons">
|
||||
<button class="action-btn success" id="startLeagueBtn" onclick="startLeague()">🏆 Start League (6 Tournaments)</button>
|
||||
<button class="action-btn" id="startSingleBtn" onclick="startSingleTournament()">🏅 Start Single Tournament</button>
|
||||
<button class="action-btn success" id="startLeagueBtn" onclick="startLeague()">🏆 <span data-i18n="league.start_league_5_tournaments">Začni Ligo (5 Turnirjev)</span></button>
|
||||
<button class="action-btn" id="startSingleBtn" onclick="startSingleTournament()">🏅 <span data-i18n="league.start_single_tournament">Začni Posamezen Turnir</span></button>
|
||||
</div>
|
||||
|
||||
<div class="warning" id="warningMessage" style="display: none;">
|
||||
@@ -1123,10 +1180,10 @@
|
||||
<h2 class="section-title">📋 Current Tournament</h2>
|
||||
|
||||
<div class="tournament-status">
|
||||
<div class="tournament-active">🎯 Tournament Active</div>
|
||||
<div class="tournament-active">🎯 <span data-i18n="tournament.active_tournament">Aktiven Turnir</span></div>
|
||||
<div class="tournament-info">
|
||||
<div class="info-item">
|
||||
<div class="info-label">Tournament Type</div>
|
||||
<div class="info-label" data-i18n="tournament.tournament_type">Tip Turnirja</div>
|
||||
<div class="info-value">
|
||||
{% if tournament_state.tournament_type == '40_targets' %}
|
||||
40 Targets
|
||||
@@ -1138,11 +1195,11 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<div class="info-label">Total Players</div>
|
||||
<div class="info-label" data-i18n="players.total_players">Skupaj Igralcev</div>
|
||||
<div class="info-value">{{ tournament_state.total_players }}</div>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<div class="info-label">Total Rounds</div>
|
||||
<div class="info-label" data-i18n="tournament.total_rounds">Skupaj Krogov</div>
|
||||
<div class="info-value">{{ tournament_state.total_rounds }}</div>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
@@ -1151,17 +1208,17 @@
|
||||
</div>
|
||||
{% if league_state %}
|
||||
<div class="info-item">
|
||||
<div class="info-label">League Tournament</div>
|
||||
<div class="info-label" data-i18n="tournament.league_tournament">League Tournament</div>
|
||||
<div class="info-value">{{ tournament_state.league_tournament_number or 'N/A' }}</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="action-buttons">
|
||||
<a href="/tournament/draft" class="action-btn">📋 View Draft</a>
|
||||
<a href="/results/calculator" class="action-btn success">🎯 Score Tournament</a>
|
||||
<a href="/" class="action-btn">📺 Dashboard</a>
|
||||
<button class="action-btn danger" onclick="resetTournament()">🗑️ Reset Tournament</button>
|
||||
<a href="/tournament/draft" class="action-btn">📋 <span data-i18n="navigation.draft">Žreb</span></a>
|
||||
<a href="/results/calculator" class="action-btn success">🎯 <span data-i18n="navigation.calculator">Results Calculator</span></a>
|
||||
<a href="/" class="action-btn">📺 <span data-i18n="navigation.dashboard">Nadzorna Plošča</span></a>
|
||||
<button class="action-btn danger" onclick="resetTournament()">🗑️ <span data-i18n="tournament.reset_tournament">Ponastavi Turnir</span></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1170,19 +1227,19 @@
|
||||
<!-- Player Management Section - NEW LIST FORMAT -->
|
||||
{% if not league_state and not tournament_state %}
|
||||
<div class="section">
|
||||
<h2 class="section-title">👥 Player Management</h2>
|
||||
<h2 class="section-title" data-i18n="players.player_management">👥 Upravljanje Igralcev</h2>
|
||||
|
||||
<!-- Add Player Section -->
|
||||
<div class="add-player-section">
|
||||
<h3 style="margin: 0 0 15px 0; color: #333;">Add New Player</h3>
|
||||
<h3 style="margin: 0 0 15px 0; color: #333;" data-i18n="league.add_new_player">Dodaj Novega Igralca</h3>
|
||||
<div class="add-player-form">
|
||||
<input type="text"
|
||||
id="newPlayerName"
|
||||
placeholder="Enter player name..."
|
||||
data-i18n="[placeholder]league.enter_player_name" placeholder="Vnesite ime igralca..."
|
||||
maxlength="50"
|
||||
onkeypress="handleAddPlayerKeypress(event)">
|
||||
<button class="add-btn" id="addPlayerBtn" onclick="addPlayer()">
|
||||
➕ Add Player
|
||||
<span data-i18n="players.add_player">➕ Dodaj Igralca</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1193,21 +1250,21 @@
|
||||
<input type="text"
|
||||
class="search-input"
|
||||
id="playerSearch"
|
||||
placeholder="Search players by name..."
|
||||
data-i18n="[placeholder]league.search_players_placeholder" placeholder="Išči igralce po imenu..."
|
||||
oninput="filterPlayers()">
|
||||
<span class="search-icon">🔍</span>
|
||||
</div>
|
||||
|
||||
<div class="player-controls">
|
||||
<button class="filter-btn active" data-filter="all" onclick="setFilter('all')">All</button>
|
||||
<button class="filter-btn" data-filter="enabled" onclick="setFilter('enabled')">Enabled</button>
|
||||
<button class="filter-btn" data-filter="disabled" onclick="setFilter('disabled')">Disabled</button>
|
||||
<button class="filter-btn active" data-filter="all" onclick="setFilter('all')" data-i18n="general.all">Vse</button>
|
||||
<button class="filter-btn" data-filter="enabled" onclick="setFilter('enabled')" data-i18n="players.enabled">Omogočen</button>
|
||||
<button class="filter-btn" data-filter="disabled" onclick="setFilter('disabled')" data-i18n="players.disabled">Onemogočen</button>
|
||||
</div>
|
||||
|
||||
<div class="bulk-actions">
|
||||
<button class="bulk-btn" onclick="selectAllVisible()">Select All</button>
|
||||
<button class="bulk-btn" onclick="enableSelected()">Enable Selected</button>
|
||||
<button class="bulk-btn danger" onclick="disableSelected()">Disable Selected</button>
|
||||
<button class="bulk-btn" onclick="selectAllVisible()" data-i18n="general.select_all">Izberi Vse</button>
|
||||
<button class="bulk-btn" onclick="enableSelected()" data-i18n="general.enable_selected">Omogoči Izbrane</button>
|
||||
<button class="bulk-btn danger" onclick="disableSelected()" data-i18n="general.disable_selected">Onemogoči Izbrane</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1215,19 +1272,19 @@
|
||||
<div class="stats-summary">
|
||||
<div class="stat-item">
|
||||
<span class="stat-number stat-total" id="totalPlayersCount">0</span>
|
||||
<span>Total Players</span>
|
||||
<span data-i18n="players.total_players">Skupaj Igralcev</span>
|
||||
</div>
|
||||
<div class="stat-item">
|
||||
<span class="stat-number stat-enabled" id="enabledPlayersCount">0</span>
|
||||
<span>Enabled</span>
|
||||
<span data-i18n="players.enabled">Omogočeni</span>
|
||||
</div>
|
||||
<div class="stat-item">
|
||||
<span class="stat-number stat-disabled" id="disabledPlayersCount">0</span>
|
||||
<span>Disabled</span>
|
||||
<span data-i18n="players.disabled">Onemogočeni</span>
|
||||
</div>
|
||||
<div class="stat-item">
|
||||
<span class="stat-number" id="visiblePlayersCount">0</span>
|
||||
<span>Visible</span>
|
||||
<span data-i18n="general.visible">Vidni</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1239,10 +1296,10 @@
|
||||
<th style="width: 40px;">
|
||||
<input type="checkbox" id="selectAllCheckbox" onchange="toggleSelectAll()">
|
||||
</th>
|
||||
<th style="width: 60px;">ID</th>
|
||||
<th>Name</th>
|
||||
<th class="status-col" style="width: 120px;">Status</th>
|
||||
<th class="actions-col" style="width: 200px;">Actions</th>
|
||||
<th style="width: 60px;" data-i18n="league.id">ID</th>
|
||||
<th data-i18n="league.name">Ime</th>
|
||||
<th class="status-col" style="width: 120px;" data-i18n="general.status">Status</th>
|
||||
<th class="actions-col" style="width: 200px;" data-i18n="general.actions">Dejanja</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="playerTableBody">
|
||||
@@ -1251,7 +1308,7 @@
|
||||
</table>
|
||||
|
||||
<div class="no-results" id="noResults" style="display: none;">
|
||||
No players found matching your search criteria.
|
||||
<span data-i18n="league.no_players_found">Ni najdenih igralcev, ki bi ustrezali kriterijem iskanja.</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1392,7 +1449,7 @@
|
||||
// Bulk actions
|
||||
function enableSelected() {
|
||||
if (selectedPlayers.size === 0) {
|
||||
alert('No players selected');
|
||||
alert(t('league.no_players_selected'));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1405,7 +1462,7 @@
|
||||
|
||||
function disableSelected() {
|
||||
if (selectedPlayers.size === 0) {
|
||||
alert('No players selected');
|
||||
alert(t('league.no_players_selected'));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1506,7 +1563,7 @@
|
||||
</td>
|
||||
<td class="player-status status-col">
|
||||
<span class="status-badge ${player.enabled ? 'status-enabled' : 'status-disabled'}">
|
||||
${player.enabled ? '✓ Enabled' : '✗ Disabled'}
|
||||
${player.enabled ? '✓' : '✗'}
|
||||
</span>
|
||||
</td>
|
||||
<td class="player-actions actions-col">
|
||||
@@ -1521,7 +1578,7 @@
|
||||
<button class="action-btn-small edit-btn-small"
|
||||
onclick="editPlayer(${player.id})"
|
||||
title="Edit Player Name">
|
||||
✏️ Edit
|
||||
✏️ <span data-i18n="league.edit">Uredi</span>
|
||||
</button>
|
||||
<button class="action-btn-small delete-btn-small"
|
||||
onclick="confirmDeletePlayer(${player.id})"
|
||||
@@ -1576,7 +1633,8 @@
|
||||
alert('Error adding player. Please try again.');
|
||||
} finally {
|
||||
addBtn.disabled = false;
|
||||
addBtn.textContent = '➕ Add Player';
|
||||
addBtn.innerHTML = '<span data-i18n="players.add_player">➕ Dodaj Igralca</span>';
|
||||
translatePage();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1737,11 +1795,11 @@
|
||||
return;
|
||||
}
|
||||
|
||||
const formatText = selectedTournamentType === '40_targets' ? '40 targets (80 shots)' :
|
||||
selectedTournamentType === '4_targets' ? '4 targets (20 shots)' :
|
||||
'20 targets (40 shots)';
|
||||
const formatText = selectedTournamentType === '40_targets' ? t('tournament_types.40_targets_full') :
|
||||
selectedTournamentType === '4_targets' ? t('tournament_types.4_targets_full') :
|
||||
t('tournament_types.20_targets_full');
|
||||
|
||||
if (!confirm(`Start league with ${enabledPlayers.length} players using ${formatText} format?`)) {
|
||||
if (!confirm(t('messages.confirm_start_league', { players: enabledPlayers.length, format: formatText }))) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1771,7 +1829,9 @@
|
||||
alert('Error starting league. Please try again.');
|
||||
} finally {
|
||||
startBtn.disabled = false;
|
||||
startBtn.textContent = '🏆 Start League (6 Tournaments)';
|
||||
startBtn.setAttribute('data-i18n', 'league.start_league_5_tournaments');
|
||||
startBtn.textContent = '🎖️ Začni Ligo (5 Turnirjev)';
|
||||
translatePage();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1784,11 +1844,11 @@
|
||||
return;
|
||||
}
|
||||
|
||||
const formatText = selectedTournamentType === '40_targets' ? '40 targets (80 shots)' :
|
||||
selectedTournamentType === '4_targets' ? '4 targets (20 shots)' :
|
||||
'20 targets (40 shots)';
|
||||
const formatText = selectedTournamentType === '40_targets' ? t('tournament_types.40_targets_full') :
|
||||
selectedTournamentType === '4_targets' ? t('tournament_types.4_targets_full') :
|
||||
t('tournament_types.20_targets_full');
|
||||
|
||||
if (!confirm(`Start single tournament with ${enabledPlayers.length} players using ${formatText} format?`)) {
|
||||
if (!confirm(t('messages.confirm_start_tournament', { players: enabledPlayers.length, format: formatText }))) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1828,7 +1888,10 @@
|
||||
const jokerCheckboxes = document.querySelectorAll('.joker-checkbox:checked:not(:disabled)');
|
||||
const jokerPlayers = Array.from(jokerCheckboxes).map(cb => parseInt(cb.dataset.playerId));
|
||||
|
||||
if (!confirm(`Start next tournament? ${jokerPlayers.length} players will use their joker.`)) {
|
||||
const confirmMessage = jokerPlayers.length === 1 ?
|
||||
t('league.start_tournament_confirm_single') :
|
||||
t('league.start_tournament_confirm_multiple').replace('{count}', jokerPlayers.length);
|
||||
if (!confirm(confirmMessage)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1948,5 +2011,14 @@
|
||||
console.log('Tournament active:', tournamentActive);
|
||||
});
|
||||
</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