You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
159 lines
5.9 KiB
159 lines
5.9 KiB
{% extends "portal_base.html" %} |
|
|
|
{% block title %}Archive Workspace - OTB Cloud{% endblock %} |
|
|
|
{% block portal_content %} |
|
<div class="portal-page-header"> |
|
<div> |
|
<h1 class="portal-page-title">Archive Workspace</h1> |
|
<p class="portal-client-name">{{ user_email }}</p> |
|
<p class="portal-page-subtitle"> |
|
Stage selected files here, then create an archive in your exports area. |
|
</p> |
|
</div> |
|
|
|
<div class="portal-toolbar" style="display:flex;flex-direction:column;align-items:flex-end;gap:10px;"> |
|
<div style="display:flex;gap:10px;justify-content:flex-end;flex-wrap:wrap;"> |
|
<a class="portal-btn" href="/workspace/pdf-report">Open PDF Report Workshop</a> |
|
<a class="portal-btn" href="{{ url_for('main.dashboard') }}">Back to Dashboard</a> |
|
<a class="portal-btn" href="{{ url_for('main.lts_view') }}">View LTS</a> |
|
</div> |
|
</div> |
|
</div> |
|
|
|
{% with messages = get_flashed_messages(with_categories=true) %} |
|
{% if messages %} |
|
<section style="margin-bottom:22px;"> |
|
{% for category, message in messages %} |
|
<div class="service-card" style="padding:14px 18px; margin-bottom:10px;"> |
|
<strong>{{ category|capitalize }}:</strong> {{ message }} |
|
</div> |
|
{% endfor %} |
|
</section> |
|
{% endif %} |
|
{% endwith %} |
|
|
|
<section class="services-grid"> |
|
<article class="service-card status-beta"> |
|
<div class="service-card-header"> |
|
<div> |
|
<h2>Staged Files</h2> |
|
<p>These are temporary working copies only.</p> |
|
</div> |
|
<div> |
|
<span class="service-badge service-badge-beta">{{ staged_files|length }} staged</span> |
|
</div> |
|
</div> |
|
|
|
<div class="service-card-actions"> |
|
{% if staged_files %} |
|
<form method="post" action="{{ url_for('main.create_zip_from_workspace') }}" style="margin-bottom:14px;display:flex;flex-direction:column;gap:10px;max-width:420px;"> |
|
<label>Archive Name</label> |
|
<input type="text" name="archive_name" placeholder="my-backup" class="portal-input"> |
|
|
|
<label>Format</label> |
|
|
|
<div style="display:flex;flex-direction:column;gap:6px;"> |
|
<label> |
|
<input type="radio" name="format" value="zip" checked> |
|
ZIP — best Windows compatibility |
|
</label> |
|
|
|
<label> |
|
<input type="radio" name="format" value="tar"> |
|
TAR — fastest (no compression) |
|
</label> |
|
|
|
<label> |
|
<input type="radio" name="format" value="targz"> |
|
TAR.GZ — good compression, faster than ZIP |
|
</label> |
|
|
|
<label> |
|
<input type="radio" name="format" value="pdf"> |
|
PDF — Job Report (images only) |
|
</label> |
|
|
|
</div> |
|
|
|
<div style="display:flex;gap:10px;flex-wrap:wrap;"> |
|
<button class="portal-btn primary" type="submit">Create Archive</button> |
|
<button class="portal-btn" type="submit" formaction="{{ url_for('main.flush_zip_workspace') }}" formmethod="post" onclick="return confirm('Flush all staged files from Archive Workspace? This does not delete originals.');">Flush Workspace</button> |
|
</div> |
|
</form> |
|
|
|
<form method="post" action="{{ url_for('main.delete_export', filename=item.name) }}" style="display:inline;"> |
|
<button class="portal-btn" type="submit" onclick="return confirm('Delete this export?');">Delete</button> |
|
</form> |
|
|
|
|
|
<ul style="padding-left:18px; margin:0;"> |
|
{% for item in staged_files %} |
|
<li style="margin-bottom:8px;"> |
|
<strong>{{ item.name }}</strong><br> |
|
<span style="opacity:0.75;">{{ "{:,}".format(item.size_bytes) }} bytes • {{ item.path }}</span> |
|
</li> |
|
{% endfor %} |
|
</ul> |
|
{% else %} |
|
<p style="margin:0;">No files are currently staged.</p> |
|
{% endif %} |
|
</div> |
|
</article> |
|
|
|
<article class="service-card status-beta"> |
|
<div class="service-card-header"> |
|
<div> |
|
<h2>Exports</h2> |
|
<p>Completed archive files are stored here for download or transfer to LTS.</p> |
|
</div> |
|
<div> |
|
<span class="service-badge service-badge-beta">{{ export_files|length }} exports</span> |
|
</div> |
|
</div> |
|
|
|
<div class="service-card-actions"> |
|
{% if export_files %} |
|
<ul style="padding-left:18px; margin:0;"> |
|
{% for item in export_files %} |
|
<li style="margin-bottom:14px;"> |
|
<strong>{{ item.name }}</strong><br> |
|
<span style="opacity:0.75;">{{ "{:,}".format(item.size_bytes) }} bytes • {{ item.path }}</span><br> |
|
|
|
<div style="margin-top:8px;display:flex;gap:8px;flex-wrap:wrap;"> |
|
<a class="portal-btn" href="{{ url_for('main.download_export', filename=item.name) }}">Download Archive</a> |
|
|
|
<a class="portal-btn" href="{{ url_for('main.download_and_remove_export', filename=item.name) }}">Download + Remove</a> |
|
|
|
<form method="post" action="{{ url_for('main.move_export_to_lts', filename=item.name) }}" style="display:inline;"> |
|
<button class="portal-btn" type="submit">Move to LTS</button> |
|
</form> |
|
|
|
<form method="post" action="{{ url_for('main.delete_export', filename=item.name) }}" style="display:inline;"> |
|
<button class="portal-btn" type="submit" onclick="return confirm('Delete this export?');">Delete</button> |
|
</form> |
|
|
|
</div> |
|
</li> |
|
{% endfor %} |
|
</ul> |
|
{% else %} |
|
<p style="margin:0;">No export archive files yet.</p> |
|
{% endif %} |
|
</div> |
|
</article> |
|
|
|
<article class="service-card status-beta"> |
|
<div class="service-card-header"> |
|
<div> |
|
<h2>LTS Storage</h2> |
|
<p>Long-term stored archives.</p> |
|
</div> |
|
</div> |
|
|
|
<div class="service-card-actions"> |
|
<a class="portal-btn" href="{{ url_for('main.lts_view') }}">View LTS</a> |
|
</div> |
|
</article> |
|
</section> |
|
{% endblock %}
|
|
|