diff --git a/interface/migrations/0028_ensemble_details.py b/interface/migrations/0028_ensemble_details.py new file mode 100644 index 0000000..0aa6ec2 --- /dev/null +++ b/interface/migrations/0028_ensemble_details.py @@ -0,0 +1,18 @@ +# Generated by Django 3.1.1 on 2021-05-05 05:10 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('interface', '0027_auto_20210322_1154'), + ] + + operations = [ + migrations.AddField( + model_name='ensemble', + name='details', + field=models.TextField(blank=True), + ), + ] diff --git a/interface/models.py b/interface/models.py index aded9d7..1804c87 100644 --- a/interface/models.py +++ b/interface/models.py @@ -44,6 +44,7 @@ class Ensemble(models.Model): passphrase = models.CharField(max_length=100) admins = models.ManyToManyField('auth.User', related_name='ensembles') slug = models.SlugField(max_length=100, editable=False) + details = models.TextField(blank=True) storage = models.ForeignKey('byostorage.UserStorage', null=True, on_delete=models.SET_NULL) def active_projects(self): @@ -53,10 +54,10 @@ class Ensemble(models.Model): code = str(self.code) return "{}-{}-{}".format(code[:3], code[3:6], code[6:]) - def save(self): + def save(self, **kwargs): if not self.slug: self.slug = slugify(self.name) - super(Ensemble, self).save() + super(Ensemble, self).save(**kwargs) def __str__(self): return self.name @@ -86,7 +87,7 @@ class Project(models.Model): @property def has_happened(self): - return self.event_date < timezone.now() + return self.event_date < timezone.now().date() def save(self): if not self.slug: diff --git a/interface/static/interface/css/polyphonic.css b/interface/static/interface/css/polyphonic.css index 4dadfdc..ea8351e 100644 --- a/interface/static/interface/css/polyphonic.css +++ b/interface/static/interface/css/polyphonic.css @@ -3,6 +3,7 @@ --border-color: #292929; --gray-blue: #667788; --light-blue: #c5eff7; + --light-grey: #EEEEEE; } @font-face { @@ -36,7 +37,7 @@ BODY { } .main { - max-width: 1000px; + max-width: 1280px; margin: 10px auto; border: 1px solid var(--border-color); border-radius: 5px; @@ -55,16 +56,30 @@ BODY { margin: 0px auto; } +.wide { + width: 1200px; +} + .collapse { display: flex; flex-direction: row; justify-content: space-around; } +@media all and (max-width: 1200px) { + .wide { + width: 900px; + } +} + @media all and (max-width: 900px) { .mdhide { display: none; } + + .wide { + width: auto; + } } @media all and (max-width: 700px) { @@ -74,6 +89,9 @@ BODY { .collapse { flex-direction: column; } + .wide { + width: auto; + } } @@ -138,6 +156,16 @@ INPUT[type=checkbox] { margin-top: 20px; } +.badge { + display: inline-block; + border: 1px solid var(--gray-blue); + font-weight: bold; + font-size: 0.9em; + border-radius: 10px; + padding: 4px 10px 2px; + margin: 2px; +} + .btn { background-color: var(--gray-blue); display: inline-block; @@ -232,10 +260,28 @@ H1 { text-align: center; } -TD { - padding: 5px; +TABLE { + border-spacing: 0px; } +TD, TH { + padding: 3px 6px; + text-align: left; +} + +TABLE THEAD TR { + background-color: var(--gray-blue); + color: var(--light-blue); + font-weight: bolder; +} + +TABLE THEAD TH { + padding: 5px 6px; +} + +TABLE.zebra TR:nth-child(even) { + background-color: var(--light-grey); +} TABLE.horizontal TH { text-align: right; @@ -298,12 +344,12 @@ TABLE SELECT { border: 1px solid #999; } TD.select-cell { - padding: 0; + padding: 0px !important; } .select-cell SELECT { border: none; - background-color: white; + background-color: transparent; height: 30px; font-family: inherit; font-size: inherit; diff --git a/interface/templates/interface/default_form.html b/interface/templates/interface/default_form.html index 7278952..837c798 100644 --- a/interface/templates/interface/default_form.html +++ b/interface/templates/interface/default_form.html @@ -2,7 +2,7 @@ {% block page %}
| + | Piece | +Part | +||
|---|---|---|---|---|
| {{ forloop.counter }}) | +{{ forloop.counter }}. | {{ item.work.name }} | -+ |