Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion templates/edit_product_mock.html
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ <h3 style="margin-top: 2rem;">Creative Formats</h3>
{% if tenant_adapter == 'google_ad_manager' %}
<div class="alert" style="background: #f3e5f5; border-color: #ce93d8; color: #6a1b9a; margin-top: 1rem;">
<strong>Inventory Targeting:</strong> Configure which ad units this product targets.
<a href="/tenant/{{ tenant_id }}/product/{{ product.product_id }}/inventory" class="btn btn-sm"
<a href="{{ script_name }}/tenant/{{ tenant_id }}/product/{{ product.product_id }}/inventory" class="btn btn-sm"
style="background: #6a1b9a; color: white; margin-left: 1rem;">Configure Inventory →</a>
</div>
{% endif %}
Expand Down
4 changes: 2 additions & 2 deletions templates/inventory_browser.html
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,7 @@ <h6 class="mb-1">${item.name}</h6>

// Add new assignments
for (const productId of toAdd) {
const response = await fetch(`/tenant/{{ tenant_id }}/products/${productId}/inventory`, {
const response = await fetch(`{{ script_name }}/tenant/{{ tenant_id }}/products/${productId}/inventory`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
Expand All @@ -721,7 +721,7 @@ <h6 class="mb-1">${item.name}</h6>

// Remove old assignments
for (const { productId, mappingId } of toRemove) {
const response = await fetch(`/tenant/{{ tenant_id }}/products/${productId}/inventory/${mappingId}`, {
const response = await fetch(`{{ script_name }}/tenant/{{ tenant_id }}/products/${productId}/inventory/${mappingId}`, {
method: 'DELETE',
headers: { 'Content-Type': 'application/json' }
});
Expand Down
8 changes: 4 additions & 4 deletions templates/media_buy_approval.html
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ <h4>Additional Targeting Overlay:</h4>
<div class="card" style="background: #f0f8ff;">
<h3>Approval Actions</h3>
<div style="display: flex; gap: 1rem;">
<form method="POST" action="/tenant/{{ tenant_id }}/media-buy/{{ media_buy.media_buy_id }}/approve" style="display: inline;">
<form method="POST" action="{{ script_name }}/tenant/{{ tenant_id }}/media-buy/{{ media_buy.media_buy_id }}/approve" style="display: inline;">
<input type="hidden" name="action" value="approve">
{% if human_task %}
<input type="hidden" name="task_id" value="{{ human_task.task_id }}">
Expand All @@ -158,7 +158,7 @@ <h3>Approval Actions</h3>
</button>
</form>

<form method="POST" action="/tenant/{{ tenant_id }}/media-buy/{{ media_buy.media_buy_id }}/approve" style="display: inline;">
<form method="POST" action="{{ script_name }}/tenant/{{ tenant_id }}/media-buy/{{ media_buy.media_buy_id }}/approve" style="display: inline;">
<input type="hidden" name="action" value="reject">
{% if human_task %}
<input type="hidden" name="task_id" value="{{ human_task.task_id }}">
Expand All @@ -168,15 +168,15 @@ <h3>Approval Actions</h3>
</button>
</form>

<a href="/tenant/{{ tenant_id }}/operations" class="btn btn-secondary">
<a href="{{ script_name }}/tenant/{{ tenant_id }}/operations" class="btn btn-secondary">
Cancel
</a>
</div>
</div>
{% else %}
<div class="card">
<p>This media buy has already been processed. Status: <strong>{{ media_buy.status }}</strong></p>
<a href="/tenant/{{ tenant_id }}/operations" class="btn btn-secondary">
<a href="{{ script_name }}/tenant/{{ tenant_id }}/operations" class="btn btn-secondary">
Back to Operations
</a>
</div>
Expand Down
3 changes: 2 additions & 1 deletion templates/orders_browser.html
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ <h5 class="modal-title">Order Details</h5>
<script>
let currentOrders = [];
const tenantId = '{{ tenant_id }}';
const scriptName = '{{ script_name }}';

// Load orders on page load
document.addEventListener('DOMContentLoaded', function() {
Expand Down Expand Up @@ -435,7 +436,7 @@ <h6>Line Items (${totalLineItems})</h6>
<td>${liDeliveryPercentage.toFixed(1)}%</td>
<td>${li.cost_per_unit ? '$' + li.cost_per_unit.toFixed(2) : '-'}</td>
<td>
<a href="/tenant/${tenantId}/gam/line-item/${li.line_item_id}"
<a href="${scriptName}/tenant/${tenantId}/gam/line-item/${li.line_item_id}"
class="btn btn-sm btn-outline-info"
target="_blank"
title="View full line item details including targeting, creatives, and JSON representation">
Expand Down
8 changes: 4 additions & 4 deletions templates/policy_review.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
<h1>Policy Review Task</h1>
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="/tenant/{{ tenant_id }}">Dashboard</a></li>
<li class="breadcrumb-item"><a href="/tenant/{{ tenant_id }}/policy">Policy Settings</a></li>
<li class="breadcrumb-item"><a href="{{ script_name }}/tenant/{{ tenant_id }}">Dashboard</a></li>
<li class="breadcrumb-item"><a href="{{ script_name }}/tenant/{{ tenant_id }}/policy">Policy Settings</a></li>
<li class="breadcrumb-item active">Review Task</li>
</ol>
</nav>
Expand Down Expand Up @@ -79,7 +79,7 @@ <h6>Initial Assessment</h6>
<h5 class="mb-0">Review Action</h5>
</div>
<div class="card-body">
<form action="/tenant/{{ tenant_id }}/policy/review/{{ task_id }}" method="POST">
<form action="{{ script_name }}/tenant/{{ tenant_id }}/policy/review/{{ task_id }}" method="POST">
<div class="form-group">
<label for="review_notes">Review Notes</label>
<textarea class="form-control" id="review_notes" name="review_notes"
Expand All @@ -95,7 +95,7 @@ <h5 class="mb-0">Review Action</h5>
</button>
</div>

<a href="/tenant/{{ tenant_id }}/policy" class="btn btn-secondary btn-block">
<a href="{{ script_name }}/tenant/{{ tenant_id }}/policy" class="btn btn-secondary btn-block">
Cancel
</a>
</form>
Expand Down
8 changes: 4 additions & 4 deletions templates/policy_rules.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
<h1>Custom Policy Rules - {{ tenant_name }}</h1>
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="/tenant/{{ tenant_id }}">Dashboard</a></li>
<li class="breadcrumb-item"><a href="/tenant/{{ tenant_id }}/policy">Policy Settings</a></li>
<li class="breadcrumb-item"><a href="{{ script_name }}/tenant/{{ tenant_id }}">Dashboard</a></li>
<li class="breadcrumb-item"><a href="{{ script_name }}/tenant/{{ tenant_id }}/policy">Policy Settings</a></li>
<li class="breadcrumb-item active">Custom Rules</li>
</ol>
</nav>
Expand All @@ -19,7 +19,7 @@ <h1>Custom Policy Rules - {{ tenant_name }}</h1>

<div class="row mt-4">
<div class="col-md-12">
<form action="/tenant/{{ tenant_id }}/policy/rules" method="POST">
<form action="{{ script_name }}/tenant/{{ tenant_id }}/policy/rules" method="POST">
<div class="row">
<!-- Prohibited Advertisers -->
<div class="col-md-4">
Expand Down Expand Up @@ -91,7 +91,7 @@ <h5 class="mb-0">Prohibited Tactics</h5>
<div class="row mt-3">
<div class="col-md-12">
<button type="submit" class="btn btn-primary">Save Rules</button>
<a href="/tenant/{{ tenant_id }}/policy" class="btn btn-secondary">Back to Policy Settings</a>
<a href="{{ script_name }}/tenant/{{ tenant_id }}/policy" class="btn btn-secondary">Back to Policy Settings</a>
</div>
</div>
</form>
Expand Down
8 changes: 4 additions & 4 deletions templates/policy_settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<h1>Policy Settings - {{ tenant_name }}</h1>
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="/tenant/{{ tenant_id }}">Dashboard</a></li>
<li class="breadcrumb-item"><a href="{{ script_name }}/tenant/{{ tenant_id }}">Dashboard</a></li>
<li class="breadcrumb-item active">Policy Settings</li>
</ol>
</nav>
Expand All @@ -24,7 +24,7 @@ <h1>Policy Settings - {{ tenant_name }}</h1>
<h5 class="mb-0">Policy Configuration</h5>
</div>
<div class="card-body">
<form action="/tenant/{{ tenant_id }}/policy/update" method="POST">
<form action="{{ script_name }}/tenant/{{ tenant_id }}/policy/update" method="POST">
<div class="form-check mb-3">
<input class="form-check-input" type="checkbox" id="enabled" name="enabled"
{% if policy_settings.enabled %}checked{% endif %}>
Expand All @@ -48,7 +48,7 @@ <h5 class="mb-0">Policy Configuration</h5>
</div>

<button type="submit" class="btn btn-primary">Save Settings</button>
<a href="/tenant/{{ tenant_id }}/policy/rules" class="btn btn-secondary">
<a href="{{ script_name }}/tenant/{{ tenant_id }}/policy/rules" class="btn btn-secondary">
Manage Custom Rules
</a>
</form>
Expand All @@ -66,7 +66,7 @@ <h5 class="mb-0">Pending Policy Reviews ({{ pending_reviews|length }})</h5>
{% if pending_reviews %}
<div class="list-group">
{% for review in pending_reviews %}
<a href="/tenant/{{ tenant_id }}/policy/review/{{ review.task_id }}"
<a href="{{ script_name }}/tenant/{{ tenant_id }}/policy/review/{{ review.task_id }}"
class="list-group-item list-group-item-action">
<div class="d-flex w-100 justify-content-between">
<h6 class="mb-1">{{ review.brief[:50] }}...</h6>
Expand Down
6 changes: 3 additions & 3 deletions templates/policy_settings_comprehensive.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
<h1>Policy Settings - {{ tenant_name }}</h1>
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="/tenant/{{ tenant_id }}">Dashboard</a></li>
<li class="breadcrumb-item"><a href="{{ script_name }}/tenant/{{ tenant_id }}">Dashboard</a></li>
<li class="breadcrumb-item active">Policy Settings</li>
</ol>
</nav>
Expand All @@ -75,7 +75,7 @@ <h1>Policy Settings - {{ tenant_name }}</h1>
</div>

<div id="policy-container" class="view-mode">
<form action="/tenant/{{ tenant_id }}/policy/update" method="POST" id="policy-form">
<form action="{{ script_name }}/tenant/{{ tenant_id }}/policy/update" method="POST" id="policy-form">
<div class="row mt-4">
<!-- General Settings -->
<div class="col-md-4">
Expand Down Expand Up @@ -117,7 +117,7 @@ <h5 class="mb-0">Pending Reviews ({{ pending_reviews|length }})</h5>
{% if pending_reviews %}
<div class="list-group">
{% for review in pending_reviews[:5] %}
<a href="/tenant/{{ tenant_id }}/policy/review/{{ review.task_id }}"
<a href="{{ script_name }}/tenant/{{ tenant_id }}/policy/review/{{ review.task_id }}"
class="list-group-item list-group-item-action">
<div class="d-flex w-100 justify-content-between">
<h6 class="mb-1">{{ review.brief[:50] }}...</h6>
Expand Down
12 changes: 6 additions & 6 deletions templates/product_inventory_config.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
<div class="col-12">
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="/tenant/{{ tenant_id }}">{{ tenant_name }}</a></li>
<li class="breadcrumb-item"><a href="/tenant/{{ tenant_id }}/products">Products</a></li>
<li class="breadcrumb-item"><a href="/tenant/{{ tenant_id }}/products/{{ product.product_id }}/edit">{{ product.name }}</a></li>
<li class="breadcrumb-item"><a href="{{ script_name }}/tenant/{{ tenant_id }}">{{ tenant_name }}</a></li>
<li class="breadcrumb-item"><a href="{{ script_name }}/tenant/{{ tenant_id }}/products">Products</a></li>
<li class="breadcrumb-item"><a href="{{ script_name }}/tenant/{{ tenant_id }}/products/{{ product.product_id }}/edit">{{ product.name }}</a></li>
<li class="breadcrumb-item active">Configure Inventory</li>
</ol>
</nav>
Expand Down Expand Up @@ -102,7 +102,7 @@ <h5 class="mb-0">Selected Inventory</h5>
<button class="btn btn-primary" onclick="saveConfiguration()">
Save Configuration
</button>
<a href="/tenant/{{ tenant_id }}/products/{{ product.product_id }}/edit"
<a href="{{ script_name }}/tenant/{{ tenant_id }}/products/{{ product.product_id }}/edit"
class="btn btn-secondary">Cancel</a>
</div>
</div>
Expand Down Expand Up @@ -326,7 +326,7 @@ <h5 class="mb-0">Selected Inventory</h5>

function refreshInventory() {
// Redirect to Inventory Browser for syncing
window.location.href = `/tenant/${tenantId}/inventory`;
window.location.href = `{{ script_name }}/tenant/${tenantId}/inventory`;
}

function getSuggestions() {
Expand Down Expand Up @@ -408,7 +408,7 @@ <h5 class="mb-0">Selected Inventory</h5>
.then(result => {
if (result.status === 'success') {
alert('Configuration saved successfully!');
window.location.href = `/tenant/${tenantId}/products/${productId}/edit`;
window.location.href = `{{ script_name }}/tenant/${tenantId}/products/${productId}/edit`;
} else {
alert('Error saving configuration: ' + (result.error || 'Unknown error'));
}
Expand Down
2 changes: 1 addition & 1 deletion templates/signup_complete.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ <h3 style="margin-bottom: 1rem; color: #1a1a1a;">📋 Your Account Details</h3>
https://{{ tenant.subdomain }}.{{ sales_agent_domain }}/admin/
</a>
{% else %}
<a href="/tenant/{{ tenant.tenant_id }}" style="color: #4285F4; text-decoration: none; font-weight: 500;">
<a href="{{ script_name }}/tenant/{{ tenant.tenant_id }}" style="color: #4285F4; text-decoration: none; font-weight: 500;">
View Your Dashboard
</a>
{% endif %}
Expand Down
2 changes: 1 addition & 1 deletion templates/tenant_dashboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -1302,7 +1302,7 @@ <h4 style="margin: 0 0 0.5rem 0;">Full Details:</h4>
return;
}
// Navigate to task approval page
window.location.href = `/tenant/{{ tenant.tenant_id }}/tasks/${taskId}/approve`;
window.location.href = `{{ script_name }}/tenant/{{ tenant.tenant_id }}/tasks/${taskId}/approve`;
}

// View task details
Expand Down
Loading
Loading