forked from rho_n/hpr_generator
Roan Horning
c4b0361104
Shared macro that generates standardized summary information about an episode.
47 lines
1.6 KiB
HTML
47 lines
1.6 KiB
HTML
<!--% PROCESS 'shared-episode-summary.tpl.html' %-->
|
|
<!--% PROCESS 'shared-avatar.tpl.html' %-->
|
|
<!--% USE DBI(constants.driver, constants.user, constants.password) %-->
|
|
<!--% query_show_count = DBI.prepare('
|
|
SELECT id
|
|
FROM eps
|
|
WHERE eps.hostid = ? ')
|
|
%-->
|
|
<!--% query_shows = DBI.prepare('
|
|
SELECT
|
|
substr(\'0000\' || eps.id, -4, 4) AS [id],
|
|
CASE eps.explicit WHEN 1 THEN \'Explicit\' ELSE \'Clean\' END AS explicit ,
|
|
eps.date, eps.license, eps.duration,
|
|
eps.title, eps.summary, eps.tags,
|
|
eps.series, eps.notes,
|
|
hosts.local_image,
|
|
substr(\'0000\' || hosts.hostid, -4, 4) AS [host_id],
|
|
hosts.host, hosts.email
|
|
FROM eps INNER JOIN hosts ON eps.hostid = hosts.hostid
|
|
WHERE hosts.hostid = ?
|
|
ORDER BY date DESC ')
|
|
%-->
|
|
<!--% shows_to_count = query_show_count.execute(id); %-->
|
|
<!--% shows = query_shows.execute(id); %-->
|
|
<!--% show_count = 0 %-->
|
|
<!--% FOREACH show IN shows_to_count %-->
|
|
<!--% show_count = show_count +1; %-->
|
|
<!--% END %-->
|
|
<!--% hosts = DBI.tie('hosts', 'hostid') %-->
|
|
|
|
<article>
|
|
<!--% this_host = hosts.$id %-->
|
|
<h2 class="title">Correspondent</h2>
|
|
<h2><!--% this_host.host %--></h2>
|
|
<p><img src="./images/<!--% get_avatar(this_host.local_image, this_host.hostid) %-->"
|
|
height="80" alt="Host Image" /><br>
|
|
<label>Host ID</label>: <!--% this_host.hostid %--><br><br>
|
|
<label>email:</label> <u><!--% this_host.email %--></u><br>
|
|
<label>episodes:</label> <strong><!--% show_count %--></strong>
|
|
</p>
|
|
<!--% FOREACH show IN shows; %-->
|
|
|
|
<!--% show_summary(show, 'hide_host') %-->
|
|
<!--% END %-->
|
|
</article>
|
|
<p><a href="contribute.html">Become a Correspondent</a></p>
|