Hide display of future shows on series listings page
This commit is contained in:
parent
f7e54233e2
commit
4a34496f24
@ -1,21 +1,9 @@
|
|||||||
<!--% PROCESS 'shared-utils.tpl.html' %-->
|
<!--% PROCESS 'shared-utils.tpl.html' %-->
|
||||||
|
<!--% PROCESS "queries-series-${constants.database}.tpl.html" %-->
|
||||||
<article>
|
<article>
|
||||||
<!--% USE DBI(constants.driver, constants.user, constants.password) %-->
|
<!--% USE DBI(constants.driver, constants.user, constants.password) %-->
|
||||||
<h1 class="title">In-Depth Series</h1>
|
<h1 class="title">In-Depth Series</h1>
|
||||||
<!--% FOREACH series IN DBI.query(
|
<!--% FOREACH series IN DBI.query(query_episodes) %-->
|
||||||
'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
|
|
||||||
ORDER BY name'
|
|
||||||
) %-->
|
|
||||||
<h2><a href="<!--% absolute_path(baseurl) %-->series/<!--% zero_pad_left(series.id) %-->.html"><!--% series.name %--></a></h2>
|
<h2><a href="<!--% absolute_path(baseurl) %-->series/<!--% zero_pad_left(series.id) %-->.html"><!--% series.name %--></a></h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li>Number of episodes: <!--% series.number_of_episodes %--></li>
|
<li>Number of episodes: <!--% series.number_of_episodes %--></li>
|
||||||
|
15
templates/queries-series-mysql.tpl.html
Normal file
15
templates/queries-series-mysql.tpl.html
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
<!--% query_episodes = '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
|
||||||
|
WHERE eps.date < DATE_ADD(NOW(), INTERVAL 1 DAY)
|
||||||
|
GROUP BY series) AS ep ON ep.series = miniseries.id
|
||||||
|
ORDER BY name'
|
||||||
|
%-->
|
||||||
|
|
15
templates/queries-series-sqlite.tpl.html
Normal file
15
templates/queries-series-sqlite.tpl.html
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
<!--% query_episodes = '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
|
||||||
|
WHERE eps.date < date(\'now\', \'+1 days\')
|
||||||
|
GROUP BY series) AS ep ON ep.series = miniseries.id
|
||||||
|
ORDER BY name'
|
||||||
|
%-->
|
||||||
|
|
Reference in New Issue
Block a user