14 changed files with 167 additions and 34 deletions
			
			
		| @ -0,0 +1,14 @@@@ -0,0 +1,14 @@ | ||||
| from enum import Enum | ||||
| 
 | ||||
| class Review(Enum): | ||||
|     none = 0 | ||||
|     denied = 1 | ||||
|     accepted = 2 | ||||
| 
 | ||||
|     @classmethod | ||||
|     def parse_string(cls, string): | ||||
|         if string == 'accept' or string == 'accepted': | ||||
|             return cls.accepted | ||||
|         if string == 'deny' or string == 'denied': | ||||
|             return cls.denied | ||||
|         return cls.none | ||||
| @ -0,0 +1,37 @@@@ -0,0 +1,37 @@ | ||||
| <div class="row"> | ||||
|     <div class="col-md-4"> | ||||
|         <div class="row"> | ||||
|             <div class="table-responsive"> | ||||
|                 <table class="table"> | ||||
|                     <tr> | ||||
|                         <th>Hunter</th> | ||||
|                         <td>{{ pcp.catching_player.user.name }}</td> | ||||
|                     </tr> | ||||
|                     <tr> | ||||
|                         <th>Bunny</th> | ||||
|                         <td>{{ pcp.caught_player.user.name }}</td> | ||||
|                     </tr> | ||||
|                     <tr> | ||||
|                         <th>Time</th> | ||||
|                         <td>{{ pcp.timestamp.strftime('%Y-%m-%d %H:%M') }}</td> | ||||
|                     </tr> | ||||
|                 </table> | ||||
|             </div> | ||||
|         </div> | ||||
|         <div class="row"> | ||||
|             <a href="{{ url_for('main.review_caught_bunny_photos', game_name=game.name, pcp_id=pcp.id, action='accept') }}"> | ||||
|                 <button class="btn btn-success">Accept</button> | ||||
|             </a> | ||||
|             <a href="{{ url_for('main.review_caught_bunny_photos', game_name=game.name, pcp_id=pcp.id, action='deny') }}"> | ||||
|                 <button class="btn btn-danger">Reject</button> | ||||
|             </a> | ||||
|         </div> | ||||
|     </div> | ||||
|     <div class="col-md-8"> | ||||
|         <img src="{{ url_for('main.caught_bunny_photo', game_name=game.name,  | ||||
|                              timestamp=pcp.timestamp.strftime('%Y%m%d%H%M%S'),  | ||||
|                              bunny_name=pcp.caught_player.user.name,  | ||||
|                              hunter_name=pcp.catching_player.user.name) }}"  | ||||
|         alt="could not load photo", width="100%"> | ||||
|     </div> | ||||
| </div> | ||||
| @ -0,0 +1,14 @@@@ -0,0 +1,14 @@ | ||||
| {% extends "base.html" %} | ||||
| 
 | ||||
| {% block app_content %} | ||||
| <div class="col-md-1"></div> | ||||
| <div class="col-md-10"> | ||||
|     <h1>Bunny Photo Review</h1> | ||||
|     <hr> | ||||
|     {% for pcp in game.unreviewed_bunny_photos() %} | ||||
|         {% include '_review_photo.html' %} | ||||
|         <hr> | ||||
|     {% endfor %} | ||||
| </div> | ||||
| <div class="col.md-1"></div> | ||||
| {% endblock %} | ||||
					Loading…
					
					
				
		Reference in new issue