forked from rho_n/hpr_generator
Add generation of individual series pages
This commit is contained in:
parent
dcc0f3d6b0
commit
b1f1fd4229
6
site.cfg
6
site.cfg
@ -58,3 +58,9 @@ filename: correspondents/[id]/index.html
|
||||
navigation: navigation-get-shows.tpl.html
|
||||
content: content-series.tpl.html
|
||||
filename: series/index.html
|
||||
|
||||
[series_shows]
|
||||
navigation: navigation-get-shows.tpl.html
|
||||
content: content-series_shows.tpl.html
|
||||
multipage: true
|
||||
filename: series/[id].html
|
||||
|
48
templates/content-series_shows.tpl.html
Normal file
48
templates/content-series_shows.tpl.html
Normal file
@ -0,0 +1,48 @@
|
||||
<!--% PROCESS 'shared-episode-summary.tpl.html' %-->
|
||||
<!--% PROCESS 'shared-avatar.tpl.html' %-->
|
||||
<!--% USE DBI(constants.driver, constants.user, constants.password) %-->
|
||||
<!--% query_series = DBI.prepare('SELECT miniseries.id, miniseries.name,
|
||||
miniseries.description,
|
||||
miniseries.private, miniseries.image, miniseries.valid,
|
||||
ep.number_of_episodes, ep.latest_show, ep.earliest_show
|
||||
FROM miniseries
|
||||
INNER JOIN
|
||||
(SELECT series,
|
||||
COUNT(eps.id) AS number_of_episodes,
|
||||
MAX(eps.date) AS latest_show,
|
||||
MIN(eps.date) AS earliest_show
|
||||
FROM eps
|
||||
GROUP BY series) AS ep ON ep.series = miniseries.id
|
||||
WHERE miniseries.id = ?
|
||||
ORDER BY name')
|
||||
%-->
|
||||
<!--% series_result = query_series.execute(id) %-->
|
||||
<article>
|
||||
<!--% FOREACH series IN series_result %-->
|
||||
<h1 class="title">In-Depth Series: <!--% series.name %--></h1>
|
||||
<ul>
|
||||
<li>Number of episodes: <!--% series.number_of_episodes %--></li>
|
||||
<li>Open/closed: open</li>
|
||||
<li>Date of earliest show: <!--% series.earliest_show %--></li>
|
||||
<li>Date of latest show: <!--% series.latest_show %--></li>
|
||||
<li>Series RSS feeds: <a href="hpr_ogg_rss.php?series=79&full=1&gomax=1">ogg</a>, <a href="hpr_spx_rss.php?series=79&full=1&gomax=1">spx</a>, <a href="hpr_mp3_rss.php?series=79&full=1&gomax=1">mp3</a></li>
|
||||
</ul>
|
||||
<div><em><!--% series.description %--></em></div>
|
||||
<!--% END %-->
|
||||
<!--% query_shows = DBI.prepare('SELECT
|
||||
id, date, title,
|
||||
duration, summary, notes,
|
||||
explicit, eps.license, tags,
|
||||
hosts.host, hosts.hostid
|
||||
FROM eps
|
||||
INNER JOIN hosts
|
||||
ON eps.hostid = hosts.hostid
|
||||
WHERE series = ?
|
||||
ORDER BY date DESC
|
||||
')
|
||||
%-->
|
||||
<!--% show_results = query_shows.execute(id) %-->
|
||||
<!--% FOREACH show IN show_results %-->
|
||||
<!--% show_summary(show) %-->
|
||||
<!--% END %-->
|
||||
</article>
|
7
templates/ids-series_shows.tpl.html
Normal file
7
templates/ids-series_shows.tpl.html
Normal file
@ -0,0 +1,7 @@
|
||||
<!--% USE DBI(constants.driver, constants.user, constants.password) %-->
|
||||
<!--% FOREACH series IN DBI.query(
|
||||
'select s.id from miniseries as s'
|
||||
) %-->
|
||||
,<!--% series.id %-->
|
||||
<!--% END %-->
|
||||
|
Loading…
Reference in New Issue
Block a user