Leader tools: Training section (Leader's Guide PDF, presentation, build-wide video) with cards in My line and Pipeline; #training?g=leader deep link; training entries can name their button; chatbot knows it

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-10-16 14:09:55 -05:00
parent 79e48b3cad
commit f0c868ef23
3 changed files with 16 additions and 3 deletions
+2 -2
View File
@@ -529,7 +529,7 @@
const media = isVid ? '<video src="' + esc(it.videoUrl) + '"' + (poster ? ' poster="' + esc(poster) + '"' : '') + ' preload="metadata" controls playsinline style="width:100%;max-width:640px;border-radius:12px;background:#000"></video>' : '';
const links = [];
if (it.videoUrl && !isVid) links.push('<a class="btn small sec" href="' + esc(it.videoUrl) + '" target="_blank" rel="noopener">Watch</a>');
if (it.docUrl) links.push('<a class="btn small sec" href="' + esc(it.docUrl) + '" target="_blank" rel="noopener">Open material</a>');
if (it.docUrl) links.push('<a class="btn small' + (it.docLabel ? '' : ' sec') + '" href="' + esc(it.docUrl) + '" target="_blank" rel="noopener">' + esc(it.docLabel || 'Open material') + '</a>');
return head + '<div class="card"><h3>' + esc(it.title || 'Lesson') + '</h3>'
+ (it.desc ? '<p class="muted small">' + esc(it.desc) + '</p>' : '')
+ (media ? '<p style="margin:10px 0">' + media + '</p>' : '')
@@ -805,7 +805,7 @@
if (name === 'profile') loadLineBanner();
if (name === 'line') { buildLineJump(); loadLineage(); loadUplineMessages(); loadCoach(); loadLinkStats(); loadProspects(); }
if (name === 'campaigns') ['cTarget', 'cImage', 'cVideoUrl'].forEach(id => { if ($(id)) $(id).value = ''; }); // no residual URL between visits
if (name === 'training') loadTraining();
if (name === 'training') { if (/(^|&)g=leader/.test(paneQ)) loadTraining.filter = 'Leader tools'; loadTraining(); }
if (name === 'pipeline') loadPipeline();
if (name === 'games') loadGames(paneQ);
document.getElementById('memberArea').classList.remove('side-open'); // close mobile drawer