| 1 |
{% extends "base.html" %} |
| 2 |
|
| 3 |
{% block title %}{{ item.title }} - Item Dashboard{% endblock %} |
| 4 |
{% block body_attrs %} class="padded-page dashboard-page dashboard-item-page"{% endblock %} |
| 5 |
|
| 6 |
{% block head %} |
| 7 |
{% endblock %} |
| 8 |
|
| 9 |
{% block content %} |
| 10 |
{% include "partials/site_header.html" %} |
| 11 |
|
| 12 |
{% if let Some(su) = session_user %}{% if su.is_sandbox %} |
| 13 |
<div class="banner banner--info" role="status"> |
| 14 |
Sandbox mode — your data will be deleted when the session expires. |
| 15 |
<a href="/join">Create an account</a> to keep your work. |
| 16 |
</div> |
| 17 |
{% endif %}{% endif %} |
| 18 |
|
| 19 |
<div class="container"> |
| 20 |
<header> |
| 21 |
<div class="breadcrumb"> |
| 22 |
<a href="/dashboard#tab-projects">Dashboard</a> / <a href="/dashboard#tab-projects">Projects</a> / <a href="/dashboard/project/{{ project_slug }}">{{ project_title }}</a> / {{ item.title }} |
| 23 |
</div> |
| 24 |
<h1 class="page-title">{{ item.title }}</h1> |
| 25 |
<div class="item-meta"> |
| 26 |
{% if item.is_public && item.publish_at.is_none() %} |
| 27 |
<span class="badge active">Active</span> |
| 28 |
{% else if !item.is_public && item.publish_at.is_some() %} |
| 29 |
<span class="badge pending">Scheduled</span> |
| 30 |
{% else %} |
| 31 |
<span class="badge inactive">Draft</span> |
| 32 |
{% endif %} |
| 33 |
<span>{{ item.sales_count }} sales</span> |
| 34 |
<button class="btn-secondary small dashboard-item-share-btn" |
| 35 |
title="Copy item ID for use in embeds or integrations" |
| 36 |
onclick="navigator.clipboard.writeText('{{ item.id }}'); this.textContent='Copied!'; setTimeout(()=>this.textContent='Copy Item ID', 1500);">Copy Item ID</button> |
| 37 |
</div> |
| 38 |
</header> |
| 39 |
|
| 40 |
<div class="tabs" role="tablist" aria-label="Item sections"> |
| 41 |
<button class="tab is-selected" |
| 42 |
role="tab" |
| 43 |
aria-selected="true" |
| 44 |
aria-controls="tab-content" |
| 45 |
id="tab-overview" |
| 46 |
title="Stats, quick actions, and embed codes" |
| 47 |
hx-get="/dashboard/item/{{ item.id }}/tabs/overview" |
| 48 |
hx-target="#tab-content" |
| 49 |
hx-swap="innerHTML" |
| 50 |
hx-indicator="#tab-spinner" |
| 51 |
onclick="setActiveTab(this)">Overview</button> |
| 52 |
<button class="tab" |
| 53 |
role="tab" |
| 54 |
aria-selected="false" |
| 55 |
aria-controls="tab-content" |
| 56 |
id="tab-details" |
| 57 |
title="Title, description, tags, content, and publishing" |
| 58 |
hx-get="/dashboard/item/{{ item.id }}/tabs/details" |
| 59 |
hx-target="#tab-content" |
| 60 |
hx-swap="innerHTML" |
| 61 |
hx-indicator="#tab-spinner" |
| 62 |
onclick="setActiveTab(this)">Details</button> |
| 63 |
<button class="tab" |
| 64 |
role="tab" |
| 65 |
aria-selected="false" |
| 66 |
aria-controls="tab-content" |
| 67 |
id="tab-pricing" |
| 68 |
title="Price, pay-what-you-want, license keys, and promo codes" |
| 69 |
hx-get="/dashboard/item/{{ item.id }}/tabs/pricing" |
| 70 |
hx-target="#tab-content" |
| 71 |
hx-swap="innerHTML" |
| 72 |
hx-indicator="#tab-spinner" |
| 73 |
onclick="setActiveTab(this)">Pricing</button> |
| 74 |
{% if item.item_type != "bundle" %} |
| 75 |
<button class="tab" |
| 76 |
role="tab" |
| 77 |
aria-selected="false" |
| 78 |
aria-controls="tab-content" |
| 79 |
id="tab-files" |
| 80 |
title="Uploaded files and version history" |
| 81 |
hx-get="/dashboard/item/{{ item.id }}/tabs/files" |
| 82 |
hx-target="#tab-content" |
| 83 |
hx-swap="innerHTML" |
| 84 |
hx-indicator="#tab-spinner" |
| 85 |
onclick="setActiveTab(this)">Files</button> |
| 86 |
{% endif %} |
| 87 |
<button class="tab" |
| 88 |
role="tab" |
| 89 |
aria-selected="false" |
| 90 |
aria-controls="tab-content" |
| 91 |
id="tab-sales" |
| 92 |
title="Transaction history and refunds" |
| 93 |
hx-get="/dashboard/item/{{ item.id }}/tabs/sales" |
| 94 |
hx-target="#tab-content" |
| 95 |
hx-swap="innerHTML" |
| 96 |
hx-indicator="#tab-spinner" |
| 97 |
onclick="setActiveTab(this)">Sales</button> |
| 98 |
<span id="tab-spinner" class="htmx-indicator tab-spinner-indicator" aria-live="polite"> Loading...</span> |
| 99 |
</div> |
| 100 |
|
| 101 |
|
| 102 |
<div id="tab-content" class="tab-content active" |
| 103 |
role="tabpanel" |
| 104 |
aria-labelledby="tab-overview" |
| 105 |
hx-get="/dashboard/item/{{ item.id }}/tabs/overview" |
| 106 |
hx-trigger="load" |
| 107 |
hx-swap="innerHTML"> |
| 108 |
|
| 109 |
</div> |
| 110 |
</div> |
| 111 |
{% endblock %} |
| 112 |
|
| 113 |
{% block scripts %} |
| 114 |
<script src="/static/upload.js?v=0518"></script> |
| 115 |
<script src="/static/media-picker.js?v=0518"></script> |
| 116 |
<script src="/static/item-details.js?v=0518"></script> |
| 117 |
<script src="/static/item-upload.js?v=0518"></script> |
| 118 |
{% endblock %} |
| 119 |
|