ii-assistent/hunter/templates/competitors.html

6 lines
1.7 KiB
HTML

{% extends 'base.html' %}{% from 'macros.html' import page_header,empty with context %}
{% block content %}{{ page_header(t('competitors'),t('competitors_hint')) }}
{% if user.role in ['admin','analyst'] %}<form class="filter-panel panel" method="post"><input type="hidden" name="csrf" value="{{ csrf }}"><label>{{ t('company') }}<input name="name" required maxlength="100"></label><label class="search-label">{{ t('website') }}<input name="url" type="url" required placeholder="{{ t('website_hint') }}"></label><button class="button primary">+ {{ t('add') }}</button></form>{% endif %}
<div class="company-grid">{% for company in companies %}<article class="panel company-card"><div class="company-icon">{{ company.name[0] }}</div><h2>{{ company.name }}</h2><a href="{{ company.url }}" target="_blank" rel="noopener noreferrer">{{ t('website') }} ↗</a><p><span class="status-dot {{ company.status }}"></span>{{ t(company.status) }}</p><small>{{ t('last_update') }}: {{ company.updated[:16]|replace('T',' ') if company.updated else t('date_unknown') }} UTC</small></article>{% else %}{{ empty() }}{% endfor %}</div><h2>{{ t('alerts') }}</h2>
{% for item in changes %}<article class="panel change-card"><div class="section-heading"><h2>{{ item.name }}</h2><span>{{ day(item.created) }}</span></div><h3>{{ t('change') }}</h3><p>{{ t('change_hint') }}</p><h3>{{ t('why_important') }}</h3><p>{{ t('hypothesis') }}</p><h3>{{ t('reaction') }}</h3><p>{{ t('reaction_hint') }}</p><a href="{{ item.url }}" target="_blank" rel="noopener noreferrer">{{ t('original') }} ↗</a><details><summary>{{ t('details') }}</summary><h4>{{ t('previous') }}</h4><p>{{ item.previous }}</p><h4>{{ t('current') }}</h4><p>{{ item.current }}</p></details></article>{% else %}{{ empty() }}{% endfor %}{% endblock %}