First product
This commit is contained in:
parent
778da9e2fc
commit
4433d7d2c4
157 changed files with 23975 additions and 0 deletions
99
app/templates/scholars.html
Normal file
99
app/templates/scholars.html
Normal file
|
|
@ -0,0 +1,99 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<section class="hero" data-test="scholars-page">
|
||||
<p class="eyebrow">Scholars</p>
|
||||
<h1>Your Scholars</h1>
|
||||
<p class="lede">Add, disable, or remove profiles scoped to your account.</p>
|
||||
</section>
|
||||
|
||||
<section class="sandbox" data-test="scholars-create-card">
|
||||
<h2>Add Scholar</h2>
|
||||
<form method="post" action="/scholars" class="stack-form">
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token }}">
|
||||
<label for="scholar_id">Scholar ID</label>
|
||||
<input
|
||||
id="scholar_id"
|
||||
name="scholar_id"
|
||||
type="text"
|
||||
value="{{ form_scholar_id | default('') }}"
|
||||
placeholder="abcDEF123456"
|
||||
pattern="[a-zA-Z0-9_-]{12}"
|
||||
required
|
||||
>
|
||||
<label for="display_name">Display Name (Optional)</label>
|
||||
<input
|
||||
id="display_name"
|
||||
name="display_name"
|
||||
type="text"
|
||||
value="{{ form_display_name | default('') }}"
|
||||
placeholder="Ada Lovelace"
|
||||
>
|
||||
<button type="submit" data-loading-text="Adding...">Add Scholar</button>
|
||||
</form>
|
||||
</section>
|
||||
|
||||
<section class="sandbox" data-test="scholars-list-card">
|
||||
<h2>Tracked Scholars</h2>
|
||||
{% if scholars %}
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Scholar ID</th>
|
||||
<th>Status</th>
|
||||
<th>Last Run</th>
|
||||
<th>Publications</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for scholar in scholars %}
|
||||
<tr>
|
||||
<td>{{ scholar.display_name }}</td>
|
||||
<td><code>{{ scholar.scholar_id }}</code></td>
|
||||
<td>
|
||||
{% if scholar.is_enabled %}
|
||||
<span class="badge ok">enabled</span>
|
||||
{% else %}
|
||||
<span class="badge warn">disabled</span>
|
||||
{% endif %}
|
||||
{% if scholar.baseline_completed %}
|
||||
<p class="helper-text">baseline complete</p>
|
||||
{% else %}
|
||||
<p class="helper-text">awaiting first run</p>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<span class="badge {% if scholar.last_run_status == 'success' %}ok{% elif scholar.last_run_status in ['failed', 'partial_failure'] %}danger{% else %}warn{% endif %}">
|
||||
{{ scholar.last_run_status }}
|
||||
</span>
|
||||
<p class="helper-text">{{ scholar.last_run_dt }}</p>
|
||||
</td>
|
||||
<td>
|
||||
<div class="inline-actions">
|
||||
<a class="link-button" href="/publications?mode=new&scholar_profile_id={{ scholar.id }}">New</a>
|
||||
<a class="link-button" href="/publications?mode=all&scholar_profile_id={{ scholar.id }}">All</a>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="inline-actions">
|
||||
<form method="post" action="/scholars/{{ scholar.id }}/toggle">
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token }}">
|
||||
<button type="submit" data-loading-text="Saving...">{% if scholar.is_enabled %}Disable{% else %}Enable{% endif %}</button>
|
||||
</form>
|
||||
<form method="post" action="/scholars/{{ scholar.id }}/delete">
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token }}">
|
||||
<button type="submit" class="danger-button" data-loading-text="Deleting...">Delete</button>
|
||||
</form>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% else %}
|
||||
<p>No scholars tracked yet.</p>
|
||||
{% endif %}
|
||||
</section>
|
||||
{% endblock %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue