From d2a6267d957519ce2fa3d20511b84d1189deff2a Mon Sep 17 00:00:00 2001 From: "Brian S. Stephan" Date: Sun, 20 Feb 2011 13:11:49 -0600 Subject: [PATCH] Web (Storycraft): show a bar indicating the progress of the detailed game --- web/static/storycraft/page.css | 13 +++++++++++++ web/storycraft/views.py | 5 +---- web/templates/storycraft/game_index.html | 11 +++++++++++ web/templates/storycraft/index.html | 11 +++++++++++ web/templates/storycraft/tmpl_game_summary.html | 6 ++++++ 5 files changed, 42 insertions(+), 4 deletions(-) diff --git a/web/static/storycraft/page.css b/web/static/storycraft/page.css index fdec238..c41a416 100644 --- a/web/static/storycraft/page.css +++ b/web/static/storycraft/page.css @@ -112,6 +112,19 @@ body { text-decoration: none; } +.gameitem .progressblock { + width: 100%; + margin: 10px; +} + +.progressbar .yui-pb { + height: 10px; +} + +.progressbar .yui-pb-bar { + background-color: #811610; +} + .storyblock { border: 1px solid #e0e0e0; margin: 0px 10px; diff --git a/web/storycraft/views.py b/web/storycraft/views.py index 028ba1a..96ecc40 100644 --- a/web/storycraft/views.py +++ b/web/storycraft/views.py @@ -20,10 +20,7 @@ def game_index(request, game_id): game = get_object_or_404(StorycraftGame, pk=game_id) players = StorycraftPlayer.objects.filter(game=game.id) - lines = [] - - if game.is_completed(): - lines = StorycraftLine.objects.filter(game=game.id) + lines = StorycraftLine.objects.filter(game=game.id) return render_to_response('storycraft/game_index.html', {'game': game, 'players': players, 'lines': lines}, context_instance=RequestContext(request)) diff --git a/web/templates/storycraft/game_index.html b/web/templates/storycraft/game_index.html index 405a0dd..5f1765d 100644 --- a/web/templates/storycraft/game_index.html +++ b/web/templates/storycraft/game_index.html @@ -5,6 +5,17 @@ dr.botzo — Storycraft + + + + + + + + + + + {% if messages %} diff --git a/web/templates/storycraft/index.html b/web/templates/storycraft/index.html index 9c63c49..727bd0f 100644 --- a/web/templates/storycraft/index.html +++ b/web/templates/storycraft/index.html @@ -5,6 +5,17 @@ dr.botzo — Storycraft + + + + + + + + + + + {% if messages %} diff --git a/web/templates/storycraft/tmpl_game_summary.html b/web/templates/storycraft/tmpl_game_summary.html index 390d252..e5a484d 100644 --- a/web/templates/storycraft/tmpl_game_summary.html +++ b/web/templates/storycraft/tmpl_game_summary.html @@ -11,6 +11,12 @@ {% endfor %} {% endif %} + {% if lines %} +
+
+
+ + {% endif %}