- Create organized directory structure (src/, docs/, data/, static/, templates/) - Add comprehensive .gitignore for Python projects - Move Python source files to src/ - Move documentation files to docs/ with project/ and user/ subdirectories - Move database files to data/ - Update all database path references in Python code - Maintain Flask static/ and templates/ directories 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
283 lines
13 KiB
HTML
283 lines
13 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="ro">
|
||
<head>
|
||
<meta charset="UTF-8">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
<title>Rezultate căutare - INDEX-SISTEM-JOCURI</title>
|
||
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
|
||
</head>
|
||
<body>
|
||
<div class="container">
|
||
<!-- Header with dropdown filters - same as index page -->
|
||
<div class="filters-header">
|
||
<form method="POST" action="{{ url_for('search') }}" id="searchForm">
|
||
<div class="filters-row">
|
||
<!-- Row 1: Valori, Durată, Tematică, Domeniu -->
|
||
<select name="valori" class="filter-select">
|
||
<option value="">– Valori –</option>
|
||
{% for option in filters.get('valori', []) %}
|
||
<option value="{{ option }}" {% if applied_filters.get('valori') == option %}selected{% endif %}>
|
||
{{ option }}
|
||
</option>
|
||
{% endfor %}
|
||
</select>
|
||
|
||
<select name="durata" class="filter-select">
|
||
<option value="">– Durată –</option>
|
||
{% for option in filters.get('durata', []) %}
|
||
<option value="{{ option }}" {% if applied_filters.get('durata') == option %}selected{% endif %}>
|
||
{{ option }}
|
||
</option>
|
||
{% endfor %}
|
||
</select>
|
||
|
||
<select name="tematica" class="filter-select">
|
||
<option value="">– Tematică –</option>
|
||
{% for option in filters.get('tematica', []) %}
|
||
<option value="{{ option }}" {% if applied_filters.get('tematica') == option %}selected{% endif %}>
|
||
{{ option }}
|
||
</option>
|
||
{% endfor %}
|
||
</select>
|
||
|
||
<select name="domeniu" class="filter-select">
|
||
<option value="">– Domeniu –</option>
|
||
{% for option in filters.get('domeniu', []) %}
|
||
<option value="{{ option }}" {% if applied_filters.get('domeniu') == option %}selected{% endif %}>
|
||
{{ option }}
|
||
</option>
|
||
{% endfor %}
|
||
</select>
|
||
</div>
|
||
|
||
<div class="filters-row">
|
||
<!-- Row 2: Metodă, Materiale necesare, Numărul de participanți -->
|
||
<select name="metoda" class="filter-select">
|
||
<option value="">– Metodă –</option>
|
||
{% for option in filters.get('metoda', []) %}
|
||
<option value="{{ option }}" {% if applied_filters.get('metoda') == option %}selected{% endif %}>
|
||
{{ option }}
|
||
</option>
|
||
{% endfor %}
|
||
</select>
|
||
|
||
<select name="materiale" class="filter-select">
|
||
<option value="">– Materiale necesare –</option>
|
||
{% for option in filters.get('materiale', []) %}
|
||
<option value="{{ option }}" {% if applied_filters.get('materiale') == option %}selected{% endif %}>
|
||
{{ option }}
|
||
</option>
|
||
{% endfor %}
|
||
</select>
|
||
|
||
<select name="participanti" class="filter-select">
|
||
<option value="">– Numărul de participanți –</option>
|
||
{% for option in filters.get('participanti', []) %}
|
||
<option value="{{ option }}" {% if applied_filters.get('participanti') == option %}selected{% endif %}>
|
||
{{ option }}
|
||
</option>
|
||
{% endfor %}
|
||
</select>
|
||
</div>
|
||
|
||
<div class="filters-row">
|
||
<!-- Row 3: Competențe Europene, Competențe Impactate, Vârsta -->
|
||
<select name="competente_fizice" class="filter-select">
|
||
<option value="">– Competențe Europene –</option>
|
||
{% for option in filters.get('competente_fizice', []) %}
|
||
<option value="{{ option }}" {% if applied_filters.get('competente_fizice') == option %}selected{% endif %}>
|
||
{{ option }}
|
||
</option>
|
||
{% endfor %}
|
||
</select>
|
||
|
||
<select name="competente_impactate" class="filter-select">
|
||
<option value="">– Competențe Impactate –</option>
|
||
{% for option in filters.get('competente_impactate', []) %}
|
||
<option value="{{ option }}" {% if applied_filters.get('competente_impactate') == option %}selected{% endif %}>
|
||
{{ option }}
|
||
</option>
|
||
{% endfor %}
|
||
</select>
|
||
|
||
<select name="varsta" class="filter-select">
|
||
<option value="">– Vârsta –</option>
|
||
{% for option in filters.get('varsta', []) %}
|
||
<option value="{{ option }}" {% if applied_filters.get('varsta') == option %}selected{% endif %}>
|
||
{{ option }}
|
||
</option>
|
||
{% endfor %}
|
||
</select>
|
||
</div>
|
||
|
||
<!-- Search box and buttons section -->
|
||
<div class="search-section">
|
||
<input type="text" name="search_query" class="search-input"
|
||
placeholder="cuvinte cheie" value="{{ search_query }}">
|
||
|
||
<button type="submit" class="btn-aplica">Aplică</button>
|
||
<button type="button" class="btn-reseteaza" onclick="resetForm()">Resetează</button>
|
||
</div>
|
||
</form>
|
||
</div>
|
||
|
||
<!-- Results section -->
|
||
<div class="results-section">
|
||
<div class="results-header">
|
||
<h2>Resurse educaționale</h2>
|
||
{% if search_query or applied_filters %}
|
||
<div class="search-summary">
|
||
{% if search_query %}
|
||
<p><strong>Căutare:</strong> "{{ search_query }}"</p>
|
||
{% endif %}
|
||
{% if applied_filters %}
|
||
<p><strong>Filtre aplicate:</strong>
|
||
{% for key, value in applied_filters.items() %}
|
||
{{ key.replace('_', ' ').title() }}: {{ value }}{% if not loop.last %}, {% endif %}
|
||
{% endfor %}
|
||
</p>
|
||
{% endif %}
|
||
</div>
|
||
{% endif %}
|
||
<p class="results-count">
|
||
<strong>{{ results_count }} rezultate găsite</strong>
|
||
</p>
|
||
</div>
|
||
|
||
{% if activities %}
|
||
<!-- Results table matching mockup -->
|
||
<div class="results-table">
|
||
<table>
|
||
<thead>
|
||
<tr>
|
||
<th>TITLU</th>
|
||
<th>DETALII</th>
|
||
<th>METODĂ</th>
|
||
<th>TEMĂ</th>
|
||
<th>VALORI</th>
|
||
<th>ACȚIUNI</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
{% for activity in activities %}
|
||
<tr>
|
||
<td class="title-cell">
|
||
<strong>{{ activity.title }}</strong>
|
||
{% if activity.duration %}
|
||
<div class="duration">{{ activity.duration }}</div>
|
||
{% endif %}
|
||
</td>
|
||
<td class="details-cell">
|
||
{% if activity.materials %}
|
||
<p><strong>Materiale utilizare:</strong> {{ activity.materials }}</p>
|
||
{% endif %}
|
||
{% if activity.duration %}
|
||
<p><strong>Durata activității:</strong> {{ activity.duration }}</p>
|
||
{% endif %}
|
||
{% if activity.participants %}
|
||
<p><strong>Participanți:</strong> {{ activity.participants }}</p>
|
||
{% endif %}
|
||
</td>
|
||
<td class="method-cell">
|
||
{{ activity.category or 'Nedefinit' }}
|
||
</td>
|
||
<td class="theme-cell">
|
||
{% if activity.tags %}
|
||
{% for tag in activity.tags[:2] %}
|
||
{{ tag.title() }}{% if not loop.last %}, {% endif %}
|
||
{% endfor %}
|
||
{% else %}
|
||
{{ activity.age_group or 'General' }}
|
||
{% endif %}
|
||
</td>
|
||
<td class="values-cell">
|
||
{% if activity.tags and activity.tags|length > 2 %}
|
||
{{ activity.tags[2:4]|join(', ') }}
|
||
{% else %}
|
||
Educație și dezvoltare
|
||
{% endif %}
|
||
</td>
|
||
<td class="actions-cell">
|
||
<a href="{{ url_for('generate_sheet', activity_id=activity.id) }}"
|
||
class="btn-generate" target="_blank">
|
||
📄 Generează fișă
|
||
</a>
|
||
{% if activity.file_path %}
|
||
<a href="{{ url_for('view_file', filename=activity.file_path.replace('/mnt/d/GoogleDrive/Cercetasi/carti-camp-jocuri/', '')) }}"
|
||
class="btn-source" target="_blank">
|
||
📁 Vezi sursa
|
||
</a>
|
||
{% endif %}
|
||
</td>
|
||
</tr>
|
||
{% endfor %}
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
{% else %}
|
||
<!-- No results found -->
|
||
<div class="no-results">
|
||
<h3>🔍 Nu au fost găsite rezultate</h3>
|
||
<p>Încercați să:</p>
|
||
<ul>
|
||
<li>Modificați criteriile de căutare</li>
|
||
<li>Eliminați unele filtre</li>
|
||
<li>Folosiți cuvinte cheie mai generale</li>
|
||
<li>Verificați ortografia</li>
|
||
</ul>
|
||
<div class="suggestions">
|
||
<h4>Sugestii populare:</h4>
|
||
<div class="suggestion-buttons">
|
||
<button onclick="quickSearch('team building')" class="quick-btn">Team Building</button>
|
||
<button onclick="quickSearch('jocuri')" class="quick-btn">Jocuri</button>
|
||
<button onclick="quickSearch('copii')" class="quick-btn">Activități copii</button>
|
||
<button onclick="quickSearch('grup')" class="quick-btn">Activități grup</button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
{% endif %}
|
||
</div>
|
||
|
||
<!-- Back to search -->
|
||
<div class="back-section">
|
||
<a href="{{ url_for('index') }}" class="btn-back">
|
||
← Înapoi la căutare
|
||
</a>
|
||
</div>
|
||
|
||
<!-- Footer -->
|
||
<footer class="footer">
|
||
<p>
|
||
🎮 <strong>INDEX-SISTEM-JOCURI v1.0</strong> |
|
||
Rezultate pentru {{ results_count }} activități |
|
||
<a href="/api/statistics" target="_blank">📊 Statistici</a>
|
||
</p>
|
||
</footer>
|
||
</div>
|
||
|
||
<script>
|
||
function resetForm() {
|
||
// Clear all form fields
|
||
document.getElementById('searchForm').reset();
|
||
// Submit to get fresh results
|
||
document.getElementById('searchForm').submit();
|
||
}
|
||
|
||
function quickSearch(query) {
|
||
document.querySelector('input[name="search_query"]').value = query;
|
||
document.getElementById('searchForm').submit();
|
||
}
|
||
|
||
// Auto-submit form when filters change
|
||
document.addEventListener('DOMContentLoaded', function() {
|
||
const selects = document.querySelectorAll('.filter-select');
|
||
selects.forEach(select => {
|
||
select.addEventListener('change', function() {
|
||
// Optional: auto-submit on filter change
|
||
// document.getElementById('searchForm').submit();
|
||
});
|
||
});
|
||
});
|
||
</script>
|
||
</body>
|
||
</html> |