diff --git a/castellum/static/style.css b/castellum/static/style.css index 091a17d5a1d56b3724aa0623e438c7360b1658a5..65abc6f81b2b031567921f14da1f8b0519690468 100644 --- a/castellum/static/style.css +++ b/castellum/static/style.css @@ -159,3 +159,13 @@ .dl-inline dd { margin: 0 1em 0 0; } + +.diff-changed { + color: var(--orange); +} +.diff-added { + color: var(--green); +} +.diff-removed { + color: var(--red); +} diff --git a/castellum/studies/migrations/0031_study_snapshot.py b/castellum/studies/migrations/0031_study_snapshot.py new file mode 100644 index 0000000000000000000000000000000000000000..4fbf493b46d2ac9865720eeeb29dae3a3b3f750a --- /dev/null +++ b/castellum/studies/migrations/0031_study_snapshot.py @@ -0,0 +1,18 @@ +# Generated by Django 3.2 on 2021-04-19 13:38 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('studies', '0030_domain_context'), + ] + + operations = [ + migrations.AddField( + model_name='study', + name='snapshot', + field=models.TextField(blank=True, editable=False, verbose_name='Snapshot'), + ), + ] diff --git a/castellum/studies/models.py b/castellum/studies/models.py index f98fe4a1aa6d349fc83f6600cd7d85f89eb1e72f..cbda835f89f99bb87c42a4da044cad419a18971b 100644 --- a/castellum/studies/models.py +++ b/castellum/studies/models.py @@ -126,6 +126,7 @@ class Study(models.Model): blank=True, ) announce_status_changes = models.BooleanField(_('Announce status changes'), default=False) + snapshot = models.TextField(_('Snapshot'), blank=True, editable=False) members = models.ManyToManyField(User, through='StudyMembership') domains = GenericRelation(Domain) @@ -383,4 +384,4 @@ class StudyTag(models.Model): name = models.CharField(_('Name'), max_length=128) def __str__(self): - return '{} - {}'.format(self.study, self.name) + return self.name diff --git a/castellum/studies/templates/studies/study_base.html b/castellum/studies/templates/studies/study_base.html index be2af5b1ddfb747197a35c8266b3257c82d3fa41..bb783520a1758b4ee41873b4927efc3d8361a33e 100644 --- a/castellum/studies/templates/studies/study_base.html +++ b/castellum/studies/templates/studies/study_base.html @@ -110,6 +110,12 @@ {% translate 'Overview' %} + {% if can_access_study and can_approve_study %} + + {% endif %} + {% if can_access_study and can_change_study %}