diff --git a/core/migrations/0025_auto_20220517_1622.py b/core/migrations/0025_auto_20220517_1622.py new file mode 100644 index 00000000..9ede43a2 --- /dev/null +++ b/core/migrations/0025_auto_20220517_1622.py @@ -0,0 +1,23 @@ +# Generated by Django 2.2.25 on 2022-05-17 14:22 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('core', '0024_auto_20211004_1610'), + ] + + operations = [ + migrations.AlterField( + model_name='document', + name='domain_type', + field=models.TextField(choices=[('not_specified', 'Not Specified'), ('agreement', 'Agreement'), ('ethics_approval', 'Ethics Approval'), ('consent_form', 'Consent Form'), ('subject_information_sheet', 'Subject Information Sheet'), ('project_proposal', 'Project Proposal'), ('data_protection_impact_assessment', 'Data Protection Impact Assessment'), ('other', 'Other')], default='not_specified', verbose_name='Domain Type'), + ), + migrations.AlterField( + model_name='userestriction', + name='use_restriction_rule', + field=models.TextField(choices=[('PROHIBITION', 'PROHIBITION'), ('OBLIGATION', 'OBLIGATION'), ('PERMISSION', 'PERMISSION'), ('CONSTRAINED_PERMISSION', 'CONSTRAINED_PERMISSION')], default='PROHIBITION', max_length=64, verbose_name='Use Restriction Rule'), + ), + ] diff --git a/core/models/document.py b/core/models/document.py index afa111db..2eeba9a4 100644 --- a/core/models/document.py +++ b/core/models/document.py @@ -28,7 +28,7 @@ class Document(CoreModel): ("agreement", "Agreement"), ("ethics_approval", "Ethics Approval"), ("consent_form", "Consent Form"), - ("subject_informationsheet", "Subject InformationSheet"), + ("subject_information_sheet", "Subject Information Sheet"), ("project_proposal", "Project Proposal"), ('data_protection_impact_assessment', 'Data Protection Impact Assessment'), ("other", "Other")) diff --git a/web/templates/_includes/documents_table.html b/web/templates/_includes/documents_table.html new file mode 100644 index 00000000..39b98224 --- /dev/null +++ b/web/templates/_includes/documents_table.html @@ -0,0 +1,41 @@ +

link Documents

+ + + + + + + + + + + {% if can_edit %} + + {% endif %} + + + + {% for file in datafiles %} + + + + + + + + {% endfor %} + +
Document TypeExpiryNotesFileSizeActions
{{ file.get_domain_type_display }}{{ file.expiry_date | default:'-' }}{{ file.content_notes | default:'-' }} + {{ file.shortname}}{{ file.size | filesizeformat }} + + edit + + delete_forever +
\ No newline at end of file diff --git a/web/templates/contracts/contract.html b/web/templates/contracts/contract.html index 0eb1d631..5b7db280 100644 --- a/web/templates/contracts/contract.html +++ b/web/templates/contracts/contract.html @@ -132,42 +132,8 @@

Participants

-

link Documents

- - - - - - - - {% if can_edit %} - {% endif %} - - - - {% for file in datafiles %} - - - - - - - - {% endfor %} - -
FileSizeExpiryDocument TypeActions
{{ file.shortname}}size: {{ file.size | filesizeformat }}{{ file.expiry_date | default:'-' }}{{ file.domain_type }} - - edit - - delete_forever -
+ + {% include "_includes/documents_table.html" %} diff --git a/web/templates/projects/project.html b/web/templates/projects/project.html index c0f7b21e..55b30740 100644 --- a/web/templates/projects/project.html +++ b/web/templates/projects/project.html @@ -298,49 +298,17 @@

link Contracts
+ add +
-

link Documents

- - - - - - - - - {% if can_edit %} - {% endif %} - - - - {% for file in datafiles %} - - - - - - {% if can_edit %} - - {% endif %} - - {% endfor %} - - -
FileSizeExpiryDocument TypeActions
{{ file.shortname}}{{ file.size | filesizeformat }}{{ file.expiry_date | default:'-' }}{{ file.domain_type }} - - edit - - delete_forever -
+ {% include "_includes/documents_table.html" %}