mirror of
				https://gitlab.crans.org/bde/nk20-scripts
				synced 2025-10-30 22:59:52 +01:00 
			
		
		
		
	add script for notify club about their food
This commit is contained in:
		
							
								
								
									
										51
									
								
								templates/scripts/food_report.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										51
									
								
								templates/scripts/food_report.html
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,51 @@ | ||||
| {% load i18n %} | ||||
| {% now "Y-m-d" as today %} | ||||
| <!DOCTYPE html> | ||||
| <html lang="fr"> | ||||
| <head> | ||||
|     <meta charset="UTF-8"> | ||||
|     <title>[Note Kfet] Liste de la bouffe</title> | ||||
| </head> | ||||
| <body> | ||||
| <table> | ||||
| <thead> | ||||
| <tr> | ||||
|     <th>Club</th> | ||||
|     <th>Nom</th> | ||||
|     <th>Date de péremption</th> | ||||
|     <th>DLC/DDM</th> | ||||
|     <th>Consigne pour les GCKs</th> | ||||
| </tr> | ||||
| </thead> | ||||
| <tbody> | ||||
|     {% for food in foods %} | ||||
|     {% if today > food.expiry_date|date:"Y-m-d" %} | ||||
| 	    {% if food.date_type and food.date_type == "DLC" %} | ||||
| 		<tr bgcolor="red"> | ||||
| 	    {% else %} | ||||
| 	        <tr bgcolor="yellow"> | ||||
| 	    {% endif %} | ||||
| 	{% else %} | ||||
| 	    <tr> | ||||
| 	{% endif %} | ||||
|             <td>{{ food.owner.name }}</td> | ||||
|             <td>{{ food.name }}</td> | ||||
|             <td>{{ food.expiry_date }}</td> | ||||
| 	    {% if food.date_type %} | ||||
| 	        <td>{{ food.date_type }}</td> | ||||
| 	    {% else %} | ||||
|             	<td>--</td> | ||||
| 	    {% endif %} | ||||
|             <td>{{ food.order }}</td> | ||||
|         </tr> | ||||
|     {% endfor %} | ||||
| </tbody> | ||||
| </table> | ||||
|  | ||||
| -- | ||||
| <p> | ||||
|     Les GCKs du BDE<br> | ||||
|     {% trans "Mail generated by the Note Kfet on the" %} {% now "j F Y à H:i:s" %} | ||||
| </p> | ||||
| </body> | ||||
| </html> | ||||
		Reference in New Issue
	
	Block a user