Files

60 lines
2.8 KiB
HTML

{% extends "base.html" %}
{% block title %}Watchlist — roledesk{% endblock %}
{# The form is a `<template>` for the reason the Job boards one on Sources
is: one company is edited at a time, so its ids stay unique. watchlist.js
puts it in place of a row on Edit, and on top of the list on New. The
reason's options are `HAND_REASONS` of app/models.py, in the words a row's
badge uses; watchlist.js reads the words off them. #}
{% block content %}
<h1>Watchlist</h1>
<p class="lede">The companies roledesk knows but cannot read a board of, so their roles are not in Roles. Mark the ones worth checking by hand and open their careers page from here.</p>
<form class="filters" autocomplete="off" onsubmit="return false">
<input type="search" id="w-q" placeholder="Filter by name, host, country code, reason or note" aria-label="Filter companies">
{# The options and their counts are drawn by watchlist.js, which also
remembers the choice. #}
<select id="w-filter" aria-label="Show"></select>
</form>
<div class="agents-head">
<p id="watchlist-count" class="count" role="status"></p>
<button type="button" id="w-add">New company</button>
</div>
<p id="watchlist-answer" class="count" role="status"></p>
<div id="watchlist-list" class="crows"></div>
<template id="company-form-template">
<form id="company-form" class="agent-form source-form" autocomplete="off">
<h3 id="company-form-title">New company</h3>
<div class="form-row">
<label>Name <input type="text" id="cf-name" required placeholder="Acme">
<span class="hint" id="cf-name-hint" hidden>Kept while it has a board, which is found by its name.</span></label>
<label>Reason
<select id="cf-reason">
<option value="unread">No reader yet</option>
<option value="robots">Site disallows reading</option>
<option value="blocked">Site blocks programs</option>
<option value="key">Needs a key</option>
<option value="group">Inside another company's board</option>
<option value="gone">No careers page</option>
<option value="added">Added by hand</option>
<option value="">Not given</option>
</select></label>
</div>
<label>Careers page
<input type="url" id="cf-url" pattern="https?://.+" placeholder="https://acme.com/careers" spellcheck="false">
<span class="hint">The page with its roles, which the row links to.</span></label>
<label>Note <textarea id="cf-notes" rows="3" placeholder="Where the roles are, what to search for"></textarea></label>
<div class="agent-actions">
<button type="submit">Save</button>
<button type="button" id="cf-cancel" class="secondary">Cancel</button>
</div>
</form>
</template>
{% endblock %}
{% block scripts %}
<script src="{{ asset('watchlist.js') }}"></script>
{% endblock %}