forked from HPR/hpr_generator
		
	Implement call for shows feature
Add display_call_for_shows MACRO. Update index template to include call to display_call_for_shows.
This commit is contained in:
		
							
								
								
									
										21
									
								
								templates/shared-call_for_shows.tpl.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								templates/shared-call_for_shows.tpl.html
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,21 @@ | ||||
| <!--% PROCESS 'shared-utils.tpl.html' %--> | ||||
| <!--% MACRO display_call_for_shows BLOCK %--> | ||||
| 	<!--% query_call_for_shows = DBI.prepare(' | ||||
| 		SELECT CASE WHEN COUNT(id) < 7 THEN True ELSE False END AS `request_for_shows` | ||||
| 		FROM eps | ||||
| 		WHERE eps.date > date(\'now\') AND eps.date < date(\'now\', \'+10 days\') | ||||
| 		') | ||||
| 	%--> | ||||
| 	<!--% results_call_for_shows = query_call_for_shows.execute().get_all() %--> | ||||
| 		<!--% IF results_call_for_shows.0.request_for_shows == 1 %--> | ||||
| 	<!--% USE date %--> | ||||
| 	<article> | ||||
| 		<header> | ||||
| 			<h3>Call for shows</h3> | ||||
| 		</header> | ||||
| 		<p><strong><em>We are running very low on shows</em></strong> at the moment. Have a look at the <a href="<!--% absolute_path(baseurl) %-->correspondents/index.html">hosts</a> page and if you don't see "<!--% date.format(date.now, '%Y') %-->-??-??" next to your name, or if your name is not listed, you might consider sending us in something.</p> | ||||
| 		<!--     <img src="/images/hprstats.png" alt="hpr queue showing an graph showing how few shows we have" /> --> | ||||
| 		<p>There are no files to process on the FTP server.</p> | ||||
| 	</article> | ||||
| 	<!--% END %--> | ||||
| <!--% END %--> | ||||
		Reference in New Issue
	
	Block a user