← back to AsSeenInMovies
asseeninmovies: cross-link /movie/:id ↔ /spotted/submit?movie_id= — render Spotted section even with zero rows + CTA chip in header + invitation copy when empty + brand+timecode in row body
c22b6bea0221cec1b6c29d4faceaf2786470222f · 2026-05-12 16:16:05 -0700 · SteveStudio2
Files touched
Diff
commit c22b6bea0221cec1b6c29d4faceaf2786470222f
Author: SteveStudio2 <stevestudio2@SteveStacStudio.lan>
Date: Tue May 12 16:16:05 2026 -0700
asseeninmovies: cross-link /movie/:id ↔ /spotted/submit?movie_id= — render Spotted section even with zero rows + CTA chip in header + invitation copy when empty + brand+timecode in row body
---
server.js | 27 ++++++++++++++++++---------
1 file changed, 18 insertions(+), 9 deletions(-)
diff --git a/server.js b/server.js
index 735f3ef..d205411 100644
--- a/server.js
+++ b/server.js
@@ -693,9 +693,11 @@ app.get('/movie/:id', async (req, res) => {
WHEN 'Art' THEN 4 WHEN 'Camera' THEN 5 WHEN 'Editing' THEN 6
WHEN 'Sound' THEN 7 WHEN 'Production' THEN 8 ELSE 9 END,
c.order_idx NULLS LAST, p.full_name`, [id]);
+ // Public /movie/:id should only surface verified placements; pending
+ // submissions (verified_at IS NULL) wait for admin review.
const spotted = await pool.query(`
- SELECT * FROM asim_spotted WHERE movie_id=$1
- ORDER BY verified_at DESC NULLS LAST, created_at DESC`, [id]);
+ SELECT * FROM asim_spotted WHERE movie_id=$1 AND verified_at IS NOT NULL
+ ORDER BY verified_at DESC, created_at DESC`, [id]);
// Group credits by department
const groups = {};
@@ -724,19 +726,26 @@ app.get('/movie/:id', async (req, res) => {
</div>
</div>`;
- const spottedHtml = spotted.rows.length ? `
+ // Show "Spotted on set" section either when we have verified rows OR
+ // unconditionally as an invitation to submit. The CTA links to the
+ // submission form with movie_id pre-filled.
+ const spottedHtml = `
<section>
- <h2>Spotted on set</h2>
- ${spotted.rows.map(s => `
+ <h2 style="display:flex;justify-content:space-between;align-items:baseline;gap:10px;flex-wrap:wrap">
+ <span>Spotted on set${spotted.rows.length ? ` <span style="color:var(--ink-faint);font-size:14px;letter-spacing:0">· ${spotted.rows.length}</span>` : ''}</span>
+ <a href="/spotted/submit?movie_id=${id}" style="font-size:12px;letter-spacing:0.12em;text-transform:uppercase;color:var(--gold);text-decoration:none;border:1px solid var(--gold);padding:5px 12px;border-radius:4px">+ Submit a placement</a>
+ </h2>
+ ${spotted.rows.length ? spotted.rows.map(s => `
<div class="spotted-row">
<div class="badge-col">${esc(s.product_category || 'dressing')}${s.is_premium_pick ? '<br><span class="premium-badge">DOCUMENTED</span>' : ''}</div>
<div>
- <div style="font-weight:500">${esc(s.product_name)}</div>
+ <div style="font-weight:500">${esc(s.product_name)}${s.brand ? ` <span style="color:var(--ink-faint);font-weight:400">— ${esc(s.brand)}</span>` : ''}</div>
+ ${s.scene_timecode ? `<div style="color:var(--ink-faint);font-size:12px;margin-top:2px">${esc(s.scene_timecode)}</div>` : ''}
<div class="desc">${esc(s.scene_description || '')}</div>
- ${s.shop_url ? `<a class="shop" href="${esc(s.shop_url)}" target="_blank" rel="noopener">View source →</a>` : ''}
+ ${s.shop_url ? `<a class="shop" href="${esc(s.shop_url)}" target="_blank" rel="nofollow noopener">Where to find it ↗</a>` : ''}
</div>
- </div>`).join('')}
- </section>` : '';
+ </div>`).join('') : '<p style="color:var(--ink-faint);font-style:italic;padding:14px 0 4px;font-size:13.5px">No verified placements yet for this film. <a href="/spotted/submit?movie_id=' + id + '" style="color:var(--gold)">Submit one →</a></p>'}
+ </section>`;
const creditsHtml = deptOrder.filter(d => groups[d] && groups[d].length).map(d => `
<div class="dept">${esc(d)}</div>
← 6ed5341 asseeninmovies: /spotted HTML gallery — verified placements
·
back to AsSeenInMovies
·
asseeninmovies: home page — third rail 'Recent SPOTTED' (6 v 3a3c2c7 →