Templates: - mission_timeline_preview: client-side rendering with lane stacking, wheel zoom, drag pan, percentage-based layout, event dedup, scale labels - asset_detail: dock/undock modals with time selection, future event warning, Mission Label column replacing Location/State - asset_entry_form: all_locations expanded to 72 items (draft board hierarchy), all_states dynamic from DB, event point dropdown uses same list - Remove sim_time from all template url_for links - base.html: remove Today button JS: - app.js: sim_time controls use POST /api/v1/sim-time API instead of URL param Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
69 lines
2.3 KiB
HTML
69 lines
2.3 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% block content %}
|
|
<div class="ph-row fi">
|
|
<div class="ph">
|
|
<div class="ey">Mission Operations</div>
|
|
<h1>任务资产</h1>
|
|
</div>
|
|
<a class="b ac" href="{{ url_for('web.asset_new'
|
|
) }}">+ New Asset</a>
|
|
</div>
|
|
|
|
<div class="fb fi">
|
|
<form method="get" action="{{ url_for('web.asset_list') }}" style="display:flex;gap:8px;align-items:center;flex-wrap:wrap">
|
|
<input type="hidden" name="sim_time" value="{{ simulation_time_input }}">
|
|
<input type="text" name="q" value="{{ search_term }}" placeholder="Search assets...">
|
|
<select name="asset_type" onchange="this.form.submit()">
|
|
<option value="">All Types</option>
|
|
{% for t in asset_type_options %}<option value="{{ t }}" {% if t == asset_type_filter %}selected{% endif %}>{{ t }}</option>{% endfor %}
|
|
</select>
|
|
<select name="sort" onchange="this.form.submit()">
|
|
{% for s in sort_options %}<option value="{{ s.value }}" {% if s.value == sort_option %}selected{% endif %}>{{ s.label }}</option>{% endfor %}
|
|
</select>
|
|
<button class="b" type="submit">Filter</button>
|
|
</form>
|
|
</div>
|
|
|
|
<table class="fi">
|
|
<thead><tr>
|
|
<th>Name</th>
|
|
<th>Type</th>
|
|
<th>Location</th>
|
|
<th>Current Event</th>
|
|
<th>Entries</th>
|
|
<th>Action</th>
|
|
</tr></thead>
|
|
<tbody>
|
|
{% for row in rows %}
|
|
<tr>
|
|
<td><a href="{{ url_for('web.asset_detail', asset_id=row.asset.id
|
|
) }}">{{ row.asset.name }}</a></td>
|
|
<td>{{ row.asset.asset_type or '—' }}</td>
|
|
<td class="mt">{{ row.current_location or '—' }}</td>
|
|
<td>{{ row.current_event or '—' }}</td>
|
|
<td>{{ row.entry_count }}</td>
|
|
<td><div class="act-btn">
|
|
<a href="{{ url_for('web.asset_edit', asset_id=row.asset.id
|
|
) }}">Edit</a>
|
|
<a href="{{ url_for('web.asset_entry_new', asset_id=row.asset.id
|
|
) }}">+Entry</a>
|
|
</div></td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
|
|
{% if total_pages > 1 %}
|
|
<div class="pg-bar fi">
|
|
{% if has_prev %}<a href="{{ prev_url }}">← Prev</a>{% endif %}
|
|
{% for link in page_links %}
|
|
{% if link.is_current %}<span class="cur">{{ link.page }}</span>
|
|
{% elif link.is_ellipsis %}<span>...</span>
|
|
{% else %}<a href="{{ link.url }}">{{ link.page }}</a>{% endif %}
|
|
{% endfor %}
|
|
{% if has_next %}<a href="{{ next_url }}">Next →</a>{% endif %}
|
|
</div>
|
|
{% endif %}
|
|
{% endblock %}
|