Diff -- /var/www/vhosts/3dshawn.com/ptmatrix.3dshawn.com/TEMPLATES/tf_portfolio.html

O Operator
Diff

/var/www/vhosts/3dshawn.com/ptmatrix.3dshawn.com/TEMPLATES/tf_portfolio.html

added on local at 2026-07-01 12:35:03

Added
+59
lines
Removed
-0
lines
Context
0
unchanged
Blobs
from
to 977e09074efd
Restore this content →
Unified diff
Naive LCS-based line diff. Additions in emerald, deletions in rose. Both sides decompressed live from BLOB_STORE.
1<div class="page-header">
2 <div>
3 <h1>Portfolio Gantt</h1>
4 <p class="subtitle">Every active project on one timeline. Bars show planned start &rarr; target due. Fill shows % complete. Red flag = slipping past target.</p>
5 </div>
6
7<div style="display:flex;gap:8px;margin-bottom:14px;align-items:center">
8 <a class="btn btn-sm[if:$scope_mine] btn-primary[/if][if:!$scope_mine] btn-ghost[/if]" href="/portfolio.cgi?scope=mine">My projects</a>
9 [if:$has_team_scope]<a class="btn btn-sm[if:$scope_team] btn-primary[/if][if:!$scope_team] btn-ghost[/if]" href="/portfolio.cgi?scope=team">My team</a>[/if]
10 [if:$has_dept_scope]<a class="btn btn-sm[if:$scope_dept] btn-primary[/if][if:!$scope_dept] btn-ghost[/if]" href="/portfolio.cgi?scope=dept">My department</a>[/if]
11 [if:$is_mgr_pg]<a class="btn btn-sm[if:$scope_all] btn-primary[/if][if:!$scope_all] btn-ghost[/if]" href="/portfolio.cgi?scope=all">All projects</a>[/if]
12</div>
13<div class="flex-end">
14 <form method="GET" action="/portfolio.cgi" style="display:flex;gap:8px;align-items:flex-end;flex-wrap:wrap">
15 [if:$has_departments]
16 <div class="field" style="margin:0"><label style="font-size:11px">Department</label>
17 <select class="input" name="department" style="padding:6px 10px">
18 <option value="">All departments</option>
19 [loop:@departments]<option value="$loop1.id" $loop1.is_selected>$loop1.name</option>[/loop]
20 </select>
21 </div>
22 [/if]
23 <div class="field" style="margin:0"><label style="font-size:11px">Active during &mdash; start</label><input class="input" type="date" name="start" value="$pg_start" style="padding:6px 10px"></div>
24 <div class="field" style="margin:0"><label style="font-size:11px">End</label><input class="input" type="date" name="end" value="$pg_end" style="padding:6px 10px"></div>
25 <button type="submit" class="btn btn-ghost btn-sm" style="height:36px">Apply</button>
26 <a href="/portfolio.cgi" class="btn btn-ghost btn-sm" style="height:36px;line-height:28px">Clear</a>
27 </form>
28 </div>
29</div>
30
31[if:!$has_data]
32<div class="card mb-3" style="border-left:3px solid var(--col-warn);padding:18px">
33 <strong>No projects with start + target dates set.</strong> The portfolio view needs both dates filled in to draw bars. Open each project &rarr; set <em>Start date</em> and <em>Target due date</em>.
34</div>
35[/if]
36
37[if:$has_data]
38<div class="card">
39 <div class="card-header"><h3 style="margin:0">$project_count project(s)</h3></div>
40 <svg viewBox="0 0 $chart_w $chart_h" style="width:100%;height:auto;display:block;background:rgba(255,255,255,.01)">
41 [loop:@ticks]
42 <line x1="$loop1.x" x2="$loop1.x" y1="$chart_top_pad" y2="$chart_bot_y" stroke="rgba(255,255,255,.05)" stroke-width="1"/>
43 <text x="$loop1.x" y="30" text-anchor="middle" fill="var(--col-text-dim)" font-size="11">$loop1.label</text>
44 [/loop]
45 <line x1="$today_x" x2="$today_x" y1="$chart_top_pad" y2="$chart_bot_y" stroke="#5aa9ff" stroke-width="1" stroke-dasharray="3,3"/>
46 <text x="$today_x" y="44" text-anchor="middle" fill="#5aa9ff" font-size="11" font-weight="600">today</text>
47 [loop:@bars]
48 <text x="210" y="$loop1.label_y" text-anchor="end" fill="var(--col-text)" font-size="13" font-weight="500">$loop1.label</text>
49 <rect x="$loop1.x" y="$loop1.y" width="$loop1.w" height="18" fill="$loop1.dept_color" fill-opacity="0.25" rx="3" ry="3"/>
50 <rect x="$loop1.x" y="$loop1.y" width="$loop1.progress_w" height="18" fill="$loop1.dept_color" fill-opacity="0.85" rx="3" ry="3"/>
51 <text x="$loop1.x" y="$loop1.text_y" dx="6" fill="#fff" font-size="11" font-weight="600">$loop1.pct%</text>
52 [if:$loop1.is_slipping]<circle cx="$loop1.x" cy="$loop1.label_y" r="5" fill="#ef4444"><title>Slipping past target</title></circle>[/if]
53 [/loop]
54 </svg>
55 <div class="text-muted" style="font-size:12px;padding:14px 18px;border-top:1px solid var(--col-border)">
56 Click a project on the chart label (use <a href="/projects.cgi" style="color:inherit;text-decoration:underline">Projects</a>) to drill in. Red dots = past target due date and still incomplete.
57 </div>
58</div>
59[/if]