Logo: a Lanna gable whose crossed kalae horns stand over a desk, gold on navy, with "Lanna Desk" and "Visas · stays · contracts" in Sarabun drawn as outlines. static/brand/ has the mark, the logo for light and for dark backgrounds and a one-color version; scripts/gen_logo.py makes them, the favicon and the header's mark from forms/fonts/Sarabun-Bold/SemiBold (SIL Open Font License, next to the Regular already there). `/` is now lannadesk.com's public page (templates/landing.html, static/landing.css): what Lanna Desk takes care of, how a client starts (write, open the link, sign first, we keep the dates), how the data is kept, contact@lannadesk.com and "Staff sign-in". It needs no session and shows no records. The back office's first page, the deadlines, moves to `/desk` (web::HOME): the header, the nav, the filter, the login's default target and the messages' links follow. Signing out now ends the session at id.cnx.network too. Kanidm names no end_session_endpoint, but its GET /ui/logout ends the session and clears its cookies (SameSite=Lax, so they come along on a top-level navigation). The logout form may only lead to this site (CSP form-action 'self'), so /signed-out sends the browser on with a refresh and offers the link as well; providers that are not Kanidm keep the old page. Checks: fmt, clippy, 109 unit and 57 integration tests (the public page open and free of records, /desk behind the sign-in, the sign-out page leading to the provider); the page at 1280 and 390 px; the header's mark in both themes; the style check on the README, PLAN and the page.
55 lines
2.9 KiB
HTML
55 lines
2.9 KiB
HTML
{% extends "base.html" %}
|
|
{% block main %}
|
|
<div class="pagehead">
|
|
<h1>Deadlines</h1>
|
|
<div class="actions"><a class="btn" href="/people">People</a></div>
|
|
</div>
|
|
<div class="summary">
|
|
<span class="chip {% if overdue %}bad{% else %}ok{% endif %}">{{ overdue }} overdue or urgent</span>
|
|
<span class="chip {% if soon %}warn{% else %}ok{% endif %}">{{ soon }} need attention</span>
|
|
<span class="muted small">For {{ n_people }} {% if n_people == 1 %}person{% else %}people{% endif %}{% if not all %}: the next {{ horizon_days }} days, and anything urgent{% endif %}.</span>
|
|
</div>
|
|
<form method="get" action="/desk" class="toolbar" id="dash-filter">
|
|
{% if rows %}<input type="search" id="q" class="filter" placeholder="Filter by name, company or deadline ( / )" aria-label="Filter the list" autocomplete="off">{% endif %}
|
|
{% if companies %}
|
|
<label class="sel"><span class="small muted">Employer</span>
|
|
<select name="company" data-autosubmit>
|
|
<option value="">Any</option>
|
|
{%- for c in companies %}
|
|
<option value="{{ c[0] }}"{% if c[0] == company %} selected{% endif %}>{{ c[1] }}</option>
|
|
{%- endfor %}
|
|
</select></label>
|
|
<noscript><button type="submit" class="btn sm">Show</button></noscript>
|
|
{% endif %}
|
|
{% if all %}<input type="hidden" name="all" value="1"><a href="/desk{% if company %}?company={{ company }}{% endif %}">Only the next {{ horizon_days }} days</a>{% else %}<a href="/desk?all=1{% if company %}&company={{ company }}{% endif %}">Show everything</a>{% endif %}
|
|
</form>
|
|
{% if rows %}
|
|
<div class="card flush">
|
|
<div class="tblwrap">
|
|
<table class="tbl" id="deadline-list">
|
|
<thead><tr><th>Due</th><th>Person</th><th>Deadline</th><th>Status</th><th class="hs">What to do</th></tr></thead>
|
|
<tbody>
|
|
{% for r in rows %}
|
|
<tr data-q="{{ r.q }}">
|
|
<td class="nowrap">{{ r.d.due_text }}<div class="sub">{{ r.d.when }}{% if r.d.estimate %}, estimate{% endif %}</div></td>
|
|
<td class="nowrap"><a class="strong" href="/people/{{ r.person_id }}">{{ r.person }}</a>{% if r.employer %}<div class="sub">{{ r.employer }}</div>{% endif %}</td>
|
|
<td class="nowrap">{{ r.d.title }}</td>
|
|
<td><span class="chip {{ r.d.level }}">{{ r.d.label }}</span></td>
|
|
<td class="hs small note">{{ r.d.note }}{% if r.d.key == "extension" and r.employer %} <a href="/people/{{ r.person_id }}/pack">Prepare the pack</a>{% endif %}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p class="filter-empty" data-filter-empty hidden>No deadline matches the filter.</p>
|
|
</div>
|
|
{% elif n_people %}
|
|
<div class="card"><p class="empty-inline">Nothing is due{% if not all %} in the next {{ horizon_days }} days{% endif %}.</p></div>
|
|
{% else %}
|
|
<div class="card">
|
|
<h2>No people yet</h2>
|
|
<p>The deadlines appear here once people and their arrivals are recorded. Start under <a href="/people">People</a>.</p>
|
|
</div>
|
|
{% endif %}
|
|
{% endblock %}
|