From cd070b2f62d9b891711ead63187e7d28822d279b Mon Sep 17 00:00:00 2001 From: Si Jie Date: Thu, 4 Aug 2022 23:55:21 +0800 Subject: [PATCH] Improve workflow for print/vet status tracking + public view page - Add usercontest status: sealed - Modify translation workflow to include sealing for onsite-teams - Add public view page for all team translation status (optimized for broadcasting on zoom/projector) - Add auto-refresh for users.html and users_public.html Co-authored-by: Ashar Fuadi --- trans/admin.py | 2 + trans/migrations/0023_auto_20220730_1917.py | 20 ++++ trans/models.py | 1 + trans/templates/autorefresh.html | 5 + trans/templates/base.html | 3 + trans/templates/home.html | 10 +- trans/templates/user.html | 23 +++- trans/templates/users.html | 63 ++++++++++- trans/templates/users_public.html | 110 ++++++++++++++++++++ trans/urls.py | 3 + trans/views/admin.py | 25 ++++- 11 files changed, 254 insertions(+), 11 deletions(-) create mode 100644 trans/migrations/0023_auto_20220730_1917.py create mode 100644 trans/templates/autorefresh.html create mode 100644 trans/templates/users_public.html diff --git a/trans/admin.py b/trans/admin.py index 6718ed63..4d2b2588 100644 --- a/trans/admin.py +++ b/trans/admin.py @@ -82,6 +82,7 @@ class Meta: 'user', 'contest', 'frozen', + 'sealed', 'note', 'extra_country_1_code', 'extra_country_2_code', @@ -96,6 +97,7 @@ class UserContestAdmin(ImportExportModelAdmin): 'user', 'contest', 'frozen', + 'sealed', 'note', 'extra_country_1_code', 'extra_country_2_code', diff --git a/trans/migrations/0023_auto_20220730_1917.py b/trans/migrations/0023_auto_20220730_1917.py new file mode 100644 index 00000000..60634b95 --- /dev/null +++ b/trans/migrations/0023_auto_20220730_1917.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.29 on 2022-07-30 12:17 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('trans', '0022_remove_user_online'), + ] + + operations = [ + migrations.AddField( + model_name='usercontest', + name='sealed', + field=models.BooleanField(default=False), + ), + ] \ No newline at end of file diff --git a/trans/models.py b/trans/models.py index 2af7aa61..996b7d5c 100644 --- a/trans/models.py +++ b/trans/models.py @@ -176,6 +176,7 @@ class UserContest(models.Model): user = models.ForeignKey('User') contest = models.ForeignKey('Contest', default=None) frozen = models.BooleanField(default=False) + sealed = models.BooleanField(default=False) note = models.TextField(default='') extra_country_1_code = models.CharField(max_length=6, blank=True) extra_country_2_code = models.CharField(max_length=6, blank=True) diff --git a/trans/templates/autorefresh.html b/trans/templates/autorefresh.html new file mode 100644 index 00000000..fd28ade8 --- /dev/null +++ b/trans/templates/autorefresh.html @@ -0,0 +1,5 @@ + \ No newline at end of file diff --git a/trans/templates/base.html b/trans/templates/base.html index 530263e3..c7874777 100644 --- a/trans/templates/base.html +++ b/trans/templates/base.html @@ -64,6 +64,9 @@