Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
160 lines
7.1 KiB
HTML
160 lines
7.1 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% block title %}Local Content — Firmy dla PEJ - Norda Biznes Partner{% endblock %}
|
|
|
|
{% block extra_css %}
|
|
<style>
|
|
.lc-header {
|
|
display: flex; justify-content: space-between; align-items: center;
|
|
margin-bottom: var(--spacing-lg); flex-wrap: wrap; gap: var(--spacing-md);
|
|
}
|
|
.lc-header h1 { font-size: 1.5rem; color: #1a365d; }
|
|
.lc-export-btn {
|
|
display: inline-flex; align-items: center; gap: 6px;
|
|
padding: var(--spacing-sm) var(--spacing-md);
|
|
background: #1a365d; color: #fff; border-radius: var(--radius);
|
|
text-decoration: none; font-size: var(--font-size-sm); font-weight: 500;
|
|
}
|
|
.lc-export-btn:hover { background: #0f2440; }
|
|
|
|
.lc-filters {
|
|
display: flex; gap: var(--spacing-md); margin-bottom: var(--spacing-lg);
|
|
flex-wrap: wrap; align-items: center;
|
|
}
|
|
.lc-filters select, .lc-filters input {
|
|
padding: var(--spacing-sm) var(--spacing-md);
|
|
border: 1px solid var(--border); border-radius: var(--radius);
|
|
font-size: var(--font-size-sm);
|
|
}
|
|
.lc-filter-btn {
|
|
padding: var(--spacing-sm) var(--spacing-md);
|
|
background: #1a365d; color: #fff; border: none;
|
|
border-radius: var(--radius); cursor: pointer; font-size: var(--font-size-sm);
|
|
}
|
|
.lc-filter-btn:hover { background: #0f2440; }
|
|
.lc-count { font-size: var(--font-size-sm); color: var(--text-secondary); margin-bottom: var(--spacing-md); }
|
|
|
|
.lc-card {
|
|
background: var(--surface); border: 1px solid var(--border);
|
|
border-radius: var(--radius); padding: var(--spacing-md);
|
|
margin-bottom: var(--spacing-md); display: flex;
|
|
justify-content: space-between; align-items: flex-start;
|
|
gap: var(--spacing-md); transition: var(--transition);
|
|
}
|
|
.lc-card:hover { border-color: #1a365d; }
|
|
.lc-card-main { flex: 1; }
|
|
.lc-card-name { font-weight: 600; font-size: var(--font-size-md); margin-bottom: var(--spacing-xs); }
|
|
.lc-card-name a { color: var(--text-primary); text-decoration: none; }
|
|
.lc-card-name a:hover { color: #1a365d; }
|
|
.lc-card-meta { font-size: var(--font-size-sm); color: var(--text-secondary); margin-bottom: var(--spacing-xs); }
|
|
.lc-card-desc { font-size: var(--font-size-sm); color: var(--text-secondary); }
|
|
.lc-card-side { text-align: right; min-width: 100px; }
|
|
.lc-score {
|
|
font-size: 1.25rem; font-weight: 700; color: #1a365d;
|
|
}
|
|
.lc-type {
|
|
display: inline-block; background: #dbeafe; color: #1e40af;
|
|
padding: 2px 8px; border-radius: 10px; font-size: 0.75rem; margin-top: var(--spacing-xs);
|
|
}
|
|
|
|
.lc-pagination { display: flex; justify-content: center; gap: var(--spacing-sm); margin-top: var(--spacing-lg); }
|
|
.lc-pagination a {
|
|
padding: var(--spacing-sm) var(--spacing-md);
|
|
border: 1px solid var(--border); border-radius: var(--radius);
|
|
text-decoration: none; color: var(--text-primary); font-size: var(--font-size-sm);
|
|
}
|
|
.lc-pagination a:hover { border-color: #1a365d; color: #1a365d; }
|
|
.lc-pagination a.active { background: #1a365d; color: #fff; border-color: #1a365d; }
|
|
|
|
@media (max-width: 768px) {
|
|
.lc-card { flex-direction: column; }
|
|
.lc-card-side { text-align: left; }
|
|
}
|
|
</style>
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="lc-header">
|
|
<div>
|
|
<h1>Local Content — Firmy Izby Norda dla PEJ</h1>
|
|
<a href="{{ url_for('pej_index') }}" style="font-size: var(--font-size-sm); color: var(--text-secondary);">← Powrót do PEJ</a>
|
|
</div>
|
|
{% if current_user.can_access_admin_panel() %}
|
|
<a href="{{ url_for('admin.pej_export_csv') }}" class="lc-export-btn">
|
|
<svg width="14" height="14" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 10v6m0 0l-3-3m3 3l3-3m2 8H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"/></svg>
|
|
Eksportuj CSV
|
|
</a>
|
|
{% endif %}
|
|
</div>
|
|
|
|
<form class="lc-filters" method="get">
|
|
<select name="category">
|
|
<option value="">Wszystkie branże</option>
|
|
{% for cat in categories %}
|
|
<option value="{{ cat.id }}" {% if cat.id == category_filter %}selected{% endif %}>{{ cat.name }}</option>
|
|
{% endfor %}
|
|
</select>
|
|
<select name="link_type">
|
|
<option value="">Wszystkie typy</option>
|
|
{% for lt in link_types %}
|
|
<option value="{{ lt }}" {% if lt == link_type_filter %}selected{% endif %}>{{ link_type_labels.get(lt, lt) }}</option>
|
|
{% endfor %}
|
|
</select>
|
|
<input type="text" name="q" placeholder="Szukaj firmy..." value="{{ search_query }}">
|
|
<button type="submit" class="lc-filter-btn">Filtruj</button>
|
|
{% if category_filter or link_type_filter or search_query %}
|
|
<a href="{{ url_for('pej_local_content') }}" style="font-size: var(--font-size-sm); color: var(--text-secondary);">Wyczyść filtry</a>
|
|
{% endif %}
|
|
</form>
|
|
|
|
<div class="lc-count">Znaleziono {{ total }} firm</div>
|
|
|
|
{% for link, company in results %}
|
|
<div class="lc-card">
|
|
<div class="lc-card-main">
|
|
<div class="lc-card-name">
|
|
<a href="{{ url_for('company_detail_by_slug', slug=company.slug) }}">{{ company.name }}</a>
|
|
</div>
|
|
<div class="lc-card-meta">
|
|
{% if company.category %}{{ company.category.name }}{% endif %}
|
|
{% if company.address_city %} · {{ company.address_city }}{% endif %}
|
|
{% if company.email %} · {{ company.email }}{% endif %}
|
|
</div>
|
|
{% if link.collaboration_description %}
|
|
<div class="lc-card-desc">{{ link.collaboration_description }}</div>
|
|
{% endif %}
|
|
</div>
|
|
<div class="lc-card-side">
|
|
<div class="lc-score">{{ link.relevance_score }}<span style="font-size: 0.7em; color: var(--text-secondary);">/100</span></div>
|
|
{% if link.link_type %}
|
|
<div class="lc-type">{{ link_type_labels.get(link.link_type, link.link_type) }}</div>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
{% else %}
|
|
<div style="text-align: center; padding: var(--spacing-xl); color: var(--text-secondary);">
|
|
Brak firm spełniających kryteria.
|
|
</div>
|
|
{% endfor %}
|
|
|
|
{% if total_pages > 1 %}
|
|
<div class="lc-pagination">
|
|
{% if page > 1 %}
|
|
<a href="?page={{ page - 1 }}&category={{ category_filter }}&link_type={{ link_type_filter }}&q={{ search_query }}">« Poprzednia</a>
|
|
{% endif %}
|
|
{% for p in range(1, total_pages + 1) %}
|
|
{% if p == page %}
|
|
<a class="active">{{ p }}</a>
|
|
{% elif p <= 3 or p > total_pages - 2 or (p >= page - 1 and p <= page + 1) %}
|
|
<a href="?page={{ p }}&category={{ category_filter }}&link_type={{ link_type_filter }}&q={{ search_query }}">{{ p }}</a>
|
|
{% elif p == 4 or p == total_pages - 2 %}
|
|
<span style="padding: var(--spacing-sm);">...</span>
|
|
{% endif %}
|
|
{% endfor %}
|
|
{% if page < total_pages %}
|
|
<a href="?page={{ page + 1 }}&category={{ category_filter }}&link_type={{ link_type_filter }}&q={{ search_query }}">Następna »</a>
|
|
{% endif %}
|
|
</div>
|
|
{% endif %}
|
|
{% endblock %}
|