diff --git a/SciPost_v1/settings/base.py b/SciPost_v1/settings/base.py index f4f59b7023500d1913c7e0e4efb0ce8212a7e187..487dd5d6e00b294d7de2d24f4e0ca93adc0c6546 100644 --- a/SciPost_v1/settings/base.py +++ b/SciPost_v1/settings/base.py @@ -111,11 +111,9 @@ INSTALLED_APPS = ( 'stats', 'submissions', 'theses', - 'virtualmeetings', 'ontology', 'organizations', 'profiles', - # TODO: partners to be deprecated in favour of sponsors 'sponsors', 'preprints', 'funders', diff --git a/SciPost_v1/urls.py b/SciPost_v1/urls.py index 34d72f51033730876e036d94b9571808c6a2cd22..c1b58f94f2663b8ae448482a6190717286e7f993 100644 --- a/SciPost_v1/urls.py +++ b/SciPost_v1/urls.py @@ -60,7 +60,6 @@ urlpatterns = [ url(r'^theses/', include('theses.urls', namespace="theses")), url(r'^thesis/', include('theses.urls', namespace="_theses")), url(r'^mails/', include('mails.urls', namespace="mails")), - url(r'^meetings/', include('virtualmeetings.urls', namespace="virtualmeetings")), url(r'^news/', include('news.urls', namespace="news")), url(r'^notifications/', include('notifications.urls', namespace="notifications")), url(r'^ontology/', include('ontology.urls', namespace="ontology")), diff --git a/scipost/migrations/0002_auto_20171229_1435.py b/scipost/migrations/0002_auto_20171229_1435.py index 208882451fa907073fb18a2e17051d0829745651..8600bf0aead2f71ca115bbbe7e20d09b4df15c58 100644 --- a/scipost/migrations/0002_auto_20171229_1435.py +++ b/scipost/migrations/0002_auto_20171229_1435.py @@ -15,7 +15,8 @@ class Migration(migrations.Migration): dependencies = [ ('submissions', '0001_initial'), ('commentaries', '0002_auto_20171229_1435'), - ('virtualmeetings', '0001_initial'), + # Deprec virtualmeetings 2019-04-05 + # ('virtualmeetings', '0001_initial'), ('journals', '0001_initial'), migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('theses', '0001_initial'), @@ -23,21 +24,22 @@ class Migration(migrations.Migration): ] operations = [ - migrations.AddField( - model_name='remark', - name='feedback', - field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='remarks', to='virtualmeetings.Feedback'), - ), - migrations.AddField( - model_name='remark', - name='motion', - field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='remarks', to='virtualmeetings.Motion'), - ), - migrations.AddField( - model_name='remark', - name='nomination', - field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='remarks', to='virtualmeetings.Nomination'), - ), + # Deprec virtualmeetings 2019-04-05 + # migrations.AddField( + # model_name='remark', + # name='feedback', + # field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='remarks', to='virtualmeetings.Feedback'), + # ), + # migrations.AddField( + # model_name='remark', + # name='motion', + # field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='remarks', to='virtualmeetings.Motion'), + # ), + # migrations.AddField( + # model_name='remark', + # name='nomination', + # field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='remarks', to='virtualmeetings.Nomination'), + # ), migrations.AddField( model_name='remark', name='recommendation', diff --git a/scipost/migrations/0024_auto_20190405_2102.py b/scipost/migrations/0024_auto_20190405_2102.py index 2d841ad2a3b5ca4cc97da31548a2491bc620c05d..ea57e7d76f04f905c2b4ea48f52d32d11d93790a 100644 --- a/scipost/migrations/0024_auto_20190405_2102.py +++ b/scipost/migrations/0024_auto_20190405_2102.py @@ -12,16 +12,17 @@ class Migration(migrations.Migration): ] operations = [ - migrations.RemoveField( - model_name='remark', - name='feedback', - ), - migrations.RemoveField( - model_name='remark', - name='motion', - ), - migrations.RemoveField( - model_name='remark', - name='nomination', - ), + # Deprec virtualmeetings 2019-04-05 + # migrations.RemoveField( + # model_name='remark', + # name='feedback', + # ), + # migrations.RemoveField( + # model_name='remark', + # name='motion', + # ), + # migrations.RemoveField( + # model_name='remark', + # name='nomination', + # ), ] diff --git a/virtualmeetings/__init__.py b/virtualmeetings/__init__.py deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/virtualmeetings/admin.py b/virtualmeetings/admin.py deleted file mode 100644 index efdacfd9d6b49a70a89c6c7b86d1e44791e400d5..0000000000000000000000000000000000000000 --- a/virtualmeetings/admin.py +++ /dev/null @@ -1,81 +0,0 @@ -__copyright__ = "Copyright © Stichting SciPost (SciPost Foundation)" -__license__ = "AGPL v3" - - -from django.contrib import admin - -from django import forms - -# from .models import VGM, Feedback, Nomination, Motion - -from scipost.models import Contributor - - -# class VGMAdmin(admin.ModelAdmin): -# search_fields = ['start_date'] - - -# admin.site.register(VGM, VGMAdmin) - - -# class FeedbackAdmin(admin.ModelAdmin): -# search_fields = ['feedback', 'by'] - - -# admin.site.register(Feedback, FeedbackAdmin) - - -# class NominationAdminForm(forms.ModelForm): -# in_agreement = forms.ModelMultipleChoiceField( -# required=False, -# queryset=Contributor.objects.filter( -# user__groups__name__in=['Editorial College'], -# ).order_by('user__last_name')) -# in_notsure = forms.ModelMultipleChoiceField( -# required=False, -# queryset=Contributor.objects.filter( -# user__groups__name__in=['Editorial College'], -# ).order_by('user__last_name')) -# in_disagreement = forms.ModelMultipleChoiceField( -# required=False, -# queryset=Contributor.objects.filter( -# user__groups__name__in=['Editorial College'], -# ).order_by('user__last_name')) - -# class Meta: -# model = Nomination -# fields = '__all__' - -# class NominationAdmin(admin.ModelAdmin): -# search_fields = ['last_name', 'first_name', 'by'] -# form = NominationAdminForm - -# admin.site.register(Nomination, NominationAdmin) - - -# class MotionAdminForm(forms.ModelForm): -# in_agreement = forms.ModelMultipleChoiceField( -# required=False, -# queryset=Contributor.objects.filter( -# user__groups__name__in=['Editorial College'], -# ).order_by('user__last_name')) -# in_notsure = forms.ModelMultipleChoiceField( -# required=False, -# queryset=Contributor.objects.filter( -# user__groups__name__in=['Editorial College'], -# ).order_by('user__last_name')) -# in_disagreement = forms.ModelMultipleChoiceField( -# required=False, -# queryset=Contributor.objects.filter( -# user__groups__name__in=['Editorial College'], -# ).order_by('user__last_name')) - -# class Meta: -# model = Motion -# fields = '__all__' - -# class MotionAdmin(admin.ModelAdmin): -# search_fields = ['background', 'motion', 'put_forward_by'] -# form = MotionAdminForm - -# admin.site.register(Motion, MotionAdmin) diff --git a/virtualmeetings/apps.py b/virtualmeetings/apps.py deleted file mode 100644 index a7eb4a3e8ee7d5f65aaf22cf49e8c402805222b0..0000000000000000000000000000000000000000 --- a/virtualmeetings/apps.py +++ /dev/null @@ -1,9 +0,0 @@ -__copyright__ = "Copyright © Stichting SciPost (SciPost Foundation)" -__license__ = "AGPL v3" - - -# from django.apps import AppConfig - - -# class VirtualmeetingsConfig(AppConfig): -# name = 'virtualmeetings' diff --git a/virtualmeetings/constants.py b/virtualmeetings/constants.py deleted file mode 100644 index d9874562cfaa53e7fabf01a7c1613afda0a9eb74..0000000000000000000000000000000000000000 --- a/virtualmeetings/constants.py +++ /dev/null @@ -1,13 +0,0 @@ -__copyright__ = "Copyright © Stichting SciPost (SciPost Foundation)" -__license__ = "AGPL v3" - - -MOTION_AMENDMENTS = 'ByLawAmend' -MOTION_WORKFLOW = 'Workflow' -MOTION_GENERAL = 'General' -MOTION_CATEGORIES = ( - (MOTION_AMENDMENTS, 'Amendments to by-laws'), - (MOTION_WORKFLOW, 'Editorial workflow improvements'), - (MOTION_GENERAL, 'General'), -) -motion_categories_dict = dict(MOTION_CATEGORIES) diff --git a/virtualmeetings/forms.py b/virtualmeetings/forms.py deleted file mode 100644 index b3c70e5b4cab3c454a1cee2095020dfe4f1fab22..0000000000000000000000000000000000000000 --- a/virtualmeetings/forms.py +++ /dev/null @@ -1,43 +0,0 @@ -__copyright__ = "Copyright © Stichting SciPost (SciPost Foundation)" -__license__ = "AGPL v3" - - -from django import forms - -# from .models import Feedback, Nomination, Motion - -from scipost.constants import SCIPOST_SUBJECT_AREAS - - -# class FeedbackForm(forms.ModelForm): -# class Meta: -# model = Feedback -# fields = ['feedback'] - - -# class NominationForm(forms.ModelForm): -# class Meta: -# model = Nomination -# fields = ['first_name', 'last_name', -# 'discipline', 'expertises', 'webpage'] - -# def __init__(self, *args, **kwargs): -# super(NominationForm, self).__init__(*args, **kwargs) -# self.fields['expertises'].widget = forms.SelectMultiple(choices=SCIPOST_SUBJECT_AREAS) - - -# class MotionForm(forms.ModelForm): -# class Meta: -# model = Motion -# fields = ['category', 'background', 'motion'] - -# def __init__(self, *args, **kwargs): -# super(MotionForm, self).__init__(*args, **kwargs) -# self.fields['background'].label = '' -# self.fields['background'].widget.attrs.update( -# {'rows': 8, 'cols': 100, -# 'placeholder': 'Provide useful background information on your Motion.'}) -# self.fields['motion'].label = '' -# self.fields['motion'].widget.attrs.update( -# {'rows': 8, 'cols': 100, -# 'placeholder': 'Phrase your Motion as clearly and succinctly as possible.'}) diff --git a/virtualmeetings/management/commands/transfer_old_motion_to_new.py b/virtualmeetings/management/commands/transfer_old_motion_to_new.py deleted file mode 100644 index 3b41295a33c82323b622b2b11c76016f4ee5ec8a..0000000000000000000000000000000000000000 --- a/virtualmeetings/management/commands/transfer_old_motion_to_new.py +++ /dev/null @@ -1,40 +0,0 @@ -__copyright__ = "Copyright © Stichting SciPost (SciPost Foundation)" -__license__ = "AGPL v3" - - -# from django.core.management.base import BaseCommand -# from django.contrib.contenttypes.models import ContentType - -# from virtualmeetings.models import Motion as deprec_Motion -# from forums.models import Post, Motion - -# class Command(BaseCommand): -# help = ('Temporary method to transfer old virtualmeetings.Motions ' -# 'to new forums.Motion ones.') - -# def add_arguments(self, parser): -# parser.add_argument( -# '--old_pk', action='store', default=0, type=int, dest='old_pk', help='Old Motion id') -# parser.add_argument( -# '--new_pk', action='store', default=0, type=int, dest='new_pk', help='New Motion id') - -# def handle(self, *args, **kwargs): -# old_motion = deprec_Motion.objects.get(pk=kwargs['old_pk']) -# new_motion = Motion.objects.get(pk=kwargs['new_pk']) -# # Transfer the votes -# for voter in old_motion.in_agreement.all(): -# new_motion.in_agreement.add(voter.user) -# for voter in old_motion.in_notsure.all(): -# new_motion.in_doubt.add(voter.user) -# for voter in old_motion.in_disagreement.all(): -# new_motion.in_disagreement.add(voter.user) -# # Transfer the old remarks to Post objects -# type_motion = ContentType.objects.get_by_natural_key('forums', 'post') -# for remark in old_motion.remarks.all(): -# Post.objects.get_or_create( -# posted_by=remark.contributor.user, -# posted_on=remark.date, -# parent_content_type=type_motion, -# parent_object_id=new_motion.id, -# subject='Remark', -# text=remark.remark) diff --git a/virtualmeetings/migrations/0001_initial.py b/virtualmeetings/migrations/0001_initial.py deleted file mode 100644 index 5ae54a8a04d019e6d4682a422c2301e784b6a109..0000000000000000000000000000000000000000 --- a/virtualmeetings/migrations/0001_initial.py +++ /dev/null @@ -1,129 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.11.4 on 2017-12-29 13:35 -from __future__ import unicode_literals - -from django.db import migrations, models -import django.db.models.deletion -import django.utils.timezone -import scipost.fields - - -class Migration(migrations.Migration): - - initial = True - - dependencies = [ - ('scipost', '0001_initial'), - ] - - operations = [ - migrations.CreateModel( - name='Feedback', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('date', models.DateField()), - ('feedback', models.TextField()), - ], - ), - migrations.CreateModel( - name='Motion', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('category', models.CharField(choices=[('ByLawAmend', 'Amendments to by-laws'), ('Workflow', 'Editorial workflow improvements'), ('General', 'General')], default='General', max_length=10)), - ('background', models.TextField()), - ('motion', models.TextField()), - ('date', models.DateField(auto_now_add=True)), - ('nr_A', models.PositiveIntegerField(default=0)), - ('nr_N', models.PositiveIntegerField(default=0)), - ('nr_D', models.PositiveIntegerField(default=0)), - ('voting_deadline', models.DateTimeField(default=django.utils.timezone.now, verbose_name='voting deadline')), - ('accepted', models.NullBooleanField()), - ], - ), - migrations.CreateModel( - name='Nomination', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('date', models.DateField(auto_now_add=True)), - ('first_name', models.CharField(max_length=30)), - ('last_name', models.CharField(max_length=30)), - ('discipline', models.CharField(choices=[('physics', 'Physics'), ('astrophysics', 'Astrophysics'), ('mathematics', 'Mathematics'), ('computerscience', 'Computer Science')], default='physics', max_length=20, verbose_name='Main discipline')), - ('expertises', scipost.fields.ChoiceArrayField(base_field=models.CharField(choices=[('Physics', (('Phys:AE', 'Atomic, Molecular and Optical Physics - Experiment'), ('Phys:AT', 'Atomic, Molecular and Optical Physics - Theory'), ('Phys:BI', 'Biophysics'), ('Phys:CE', 'Condensed Matter Physics - Experiment'), ('Phys:CT', 'Condensed Matter Physics - Theory'), ('Phys:FD', 'Fluid Dynamics'), ('Phys:GR', 'Gravitation, Cosmology and Astroparticle Physics'), ('Phys:HE', 'High-Energy Physics - Experiment'), ('Phys:HT', 'High-Energy Physics - Theory'), ('Phys:HP', 'High-Energy Physics - Phenomenology'), ('Phys:MP', 'Mathematical Physics'), ('Phys:NE', 'Nuclear Physics - Experiment'), ('Phys:NT', 'Nuclear Physics - Theory'), ('Phys:QP', 'Quantum Physics'), ('Phys:SM', 'Statistical and Soft Matter Physics'))), ('Astrophysics', (('Astro:GA', 'Astrophysics of Galaxies'), ('Astro:CO', 'Cosmology and Nongalactic Astrophysics'), ('Astro:EP', 'Earth and Planetary Astrophysics'), ('Astro:HE', 'High Energy Astrophysical Phenomena'), ('Astro:IM', 'Instrumentation and Methods for Astrophysics'), ('Astro:SR', 'Solar and Stellar Astrophysics'))), ('Mathematics', (('Math:AG', 'Algebraic Geometry'), ('Math:AT', 'Algebraic Topology'), ('Math:AP', 'Analysis of PDEs'), ('Math:CT', 'Category Theory'), ('Math:CA', 'Classical Analysis and ODEs'), ('Math:CO', 'Combinatorics'), ('Math:AC', 'Commutative Algebra'), ('Math:CV', 'Complex Variables'), ('Math:DG', 'Differential Geometry'), ('Math:DS', 'Dynamical Systems'), ('Math:FA', 'Functional Analysis'), ('Math:GM', 'General Mathematics'), ('Math:GN', 'General Topology'), ('Math:GT', 'Geometric Topology'), ('Math:GR', 'Group Theory'), ('Math:HO', 'History and Overview'), ('Math:IT', 'Information Theory'), ('Math:KT', 'K-Theory and Homology'), ('Math:LO', 'Logic'), ('Math:MP', 'Mathematical Physics'), ('Math:MG', 'Metric Geometry'), ('Math:NT', 'Number Theory'), ('Math:NA', 'Numerical Analysis'), ('Math:OA', 'Operator Algebras'), ('Math:OC', 'Optimization and Control'), ('Math:PR', 'Probability'), ('Math:QA', 'Quantum Algebra'), ('Math:RT', 'Representation Theory'), ('Math:RA', 'Rings and Algebras'), ('Math:SP', 'Spectral Theory'), ('Math:ST', 'Statistics Theory'), ('Math:SG', 'Symplectic Geometry'))), ('Computer Science', (('Comp:AI', 'Artificial Intelligence'), ('Comp:CC', 'Computational Complexity'), ('Comp:CE', 'Computational Engineering, Finance, and Science'), ('Comp:CG', 'Computational Geometry'), ('Comp:GT', 'Computer Science and Game Theory'), ('Comp:CV', 'Computer Vision and Pattern Recognition'), ('Comp:CY', 'Computers and Society'), ('Comp:CR', 'Cryptography and Security'), ('Comp:DS', 'Data Structures and Algorithms'), ('Comp:DB', 'Databases'), ('Comp:DL', 'Digital Libraries'), ('Comp:DM', 'Discrete Mathematics'), ('Comp:DC', 'Distributed, Parallel, and Cluster Computing'), ('Comp:ET', 'Emerging Technologies'), ('Comp:FL', 'Formal Languages and Automata Theory'), ('Comp:GL', 'General Literature'), ('Comp:GR', 'Graphics'), ('Comp:AR', 'Hardware Architecture'), ('Comp:HC', 'Human-Computer Interaction'), ('Comp:IR', 'Information Retrieval'), ('Comp:IT', 'Information Theory'), ('Comp:LG', 'Learning'), ('Comp:LO', 'Logic in Computer Science'), ('Comp:MS', 'Mathematical Software'), ('Comp:MA', 'Multiagent Systems'), ('Comp:MM', 'Multimedia'), ('Comp:NI', 'Networking and Internet Architecture'), ('Comp:NE', 'Neural and Evolutionary Computing'), ('Comp:NA', 'Numerical Analysis'), ('Comp:OS', 'Operating Systems'), ('Comp:OH', 'Other Computer Science'), ('Comp:PF', 'Performance'), ('Comp:PL', 'Programming Languages'), ('Comp:RO', 'Robotics'), ('Comp:SI', 'Social and Information Networks'), ('Comp:SE', 'Software Engineering'), ('Comp:SD', 'Sound'), ('Comp:SC', 'Symbolic Computation'), ('Comp:SY', 'Systems and Control')))], max_length=10), blank=True, null=True, size=None)), - ('webpage', models.URLField()), - ('nr_A', models.PositiveIntegerField(default=0)), - ('nr_N', models.PositiveIntegerField(default=0)), - ('nr_D', models.PositiveIntegerField(default=0)), - ('voting_deadline', models.DateTimeField(default=django.utils.timezone.now, verbose_name='voting deadline')), - ('accepted', models.NullBooleanField()), - ], - ), - migrations.CreateModel( - name='VGM', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('start_date', models.DateField()), - ('end_date', models.DateField()), - ('information', models.TextField(default='')), - ], - ), - migrations.AddField( - model_name='nomination', - name='VGM', - field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='virtualmeetings.VGM'), - ), - migrations.AddField( - model_name='nomination', - name='by', - field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='scipost.Contributor'), - ), - migrations.AddField( - model_name='nomination', - name='in_agreement', - field=models.ManyToManyField(blank=True, related_name='in_agreement_with_nomination', to='scipost.Contributor'), - ), - migrations.AddField( - model_name='nomination', - name='in_disagreement', - field=models.ManyToManyField(blank=True, related_name='in_disagreement_with_nomination', to='scipost.Contributor'), - ), - migrations.AddField( - model_name='nomination', - name='in_notsure', - field=models.ManyToManyField(blank=True, related_name='in_notsure_with_nomination', to='scipost.Contributor'), - ), - migrations.AddField( - model_name='motion', - name='VGM', - field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='virtualmeetings.VGM'), - ), - migrations.AddField( - model_name='motion', - name='in_agreement', - field=models.ManyToManyField(blank=True, related_name='in_agreement_with_motion', to='scipost.Contributor'), - ), - migrations.AddField( - model_name='motion', - name='in_disagreement', - field=models.ManyToManyField(blank=True, related_name='in_disagreement_with_motion', to='scipost.Contributor'), - ), - migrations.AddField( - model_name='motion', - name='in_notsure', - field=models.ManyToManyField(blank=True, related_name='in_notsure_with_motion', to='scipost.Contributor'), - ), - migrations.AddField( - model_name='motion', - name='put_forward_by', - field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='scipost.Contributor'), - ), - migrations.AddField( - model_name='feedback', - name='VGM', - field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='virtualmeetings.VGM'), - ), - migrations.AddField( - model_name='feedback', - name='by', - field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='scipost.Contributor'), - ), - ] diff --git a/virtualmeetings/migrations/0002_auto_20190126_2058.py b/virtualmeetings/migrations/0002_auto_20190126_2058.py deleted file mode 100644 index 54802394282c693b197ebe684245365258d2c33d..0000000000000000000000000000000000000000 --- a/virtualmeetings/migrations/0002_auto_20190126_2058.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.11.4 on 2019-01-26 19:58 -from __future__ import unicode_literals - -from django.db import migrations, models -import scipost.fields - - -class Migration(migrations.Migration): - - dependencies = [ - ('virtualmeetings', '0001_initial'), - ] - - operations = [ - migrations.AlterField( - model_name='nomination', - name='expertises', - field=scipost.fields.ChoiceArrayField(base_field=models.CharField(choices=[('Physics', (('Phys:AE', 'Atomic, Molecular and Optical Physics - Experiment'), ('Phys:AT', 'Atomic, Molecular and Optical Physics - Theory'), ('Phys:BI', 'Biophysics'), ('Phys:CE', 'Condensed Matter Physics - Experiment'), ('Phys:CT', 'Condensed Matter Physics - Theory'), ('Phys:CC', 'Condensed Matter Physics - Computational'), ('Phys:FD', 'Fluid Dynamics'), ('Phys:GR', 'Gravitation, Cosmology and Astroparticle Physics'), ('Phys:HE', 'High-Energy Physics - Experiment'), ('Phys:HT', 'High-Energy Physics - Theory'), ('Phys:HP', 'High-Energy Physics - Phenomenology'), ('Phys:MP', 'Mathematical Physics'), ('Phys:NE', 'Nuclear Physics - Experiment'), ('Phys:NT', 'Nuclear Physics - Theory'), ('Phys:QP', 'Quantum Physics'), ('Phys:SM', 'Statistical and Soft Matter Physics'))), ('Astrophysics', (('Astro:GA', 'Astrophysics of Galaxies'), ('Astro:CO', 'Cosmology and Nongalactic Astrophysics'), ('Astro:EP', 'Earth and Planetary Astrophysics'), ('Astro:HE', 'High Energy Astrophysical Phenomena'), ('Astro:IM', 'Instrumentation and Methods for Astrophysics'), ('Astro:SR', 'Solar and Stellar Astrophysics'))), ('Mathematics', (('Math:AG', 'Algebraic Geometry'), ('Math:AT', 'Algebraic Topology'), ('Math:AP', 'Analysis of PDEs'), ('Math:CT', 'Category Theory'), ('Math:CA', 'Classical Analysis and ODEs'), ('Math:CO', 'Combinatorics'), ('Math:AC', 'Commutative Algebra'), ('Math:CV', 'Complex Variables'), ('Math:DG', 'Differential Geometry'), ('Math:DS', 'Dynamical Systems'), ('Math:FA', 'Functional Analysis'), ('Math:GM', 'General Mathematics'), ('Math:GN', 'General Topology'), ('Math:GT', 'Geometric Topology'), ('Math:GR', 'Group Theory'), ('Math:HO', 'History and Overview'), ('Math:IT', 'Information Theory'), ('Math:KT', 'K-Theory and Homology'), ('Math:LO', 'Logic'), ('Math:MP', 'Mathematical Physics'), ('Math:MG', 'Metric Geometry'), ('Math:NT', 'Number Theory'), ('Math:NA', 'Numerical Analysis'), ('Math:OA', 'Operator Algebras'), ('Math:OC', 'Optimization and Control'), ('Math:PR', 'Probability'), ('Math:QA', 'Quantum Algebra'), ('Math:RT', 'Representation Theory'), ('Math:RA', 'Rings and Algebras'), ('Math:SP', 'Spectral Theory'), ('Math:ST', 'Statistics Theory'), ('Math:SG', 'Symplectic Geometry'))), ('Computer Science', (('Comp:AI', 'Artificial Intelligence'), ('Comp:CC', 'Computational Complexity'), ('Comp:CE', 'Computational Engineering, Finance, and Science'), ('Comp:CG', 'Computational Geometry'), ('Comp:GT', 'Computer Science and Game Theory'), ('Comp:CV', 'Computer Vision and Pattern Recognition'), ('Comp:CY', 'Computers and Society'), ('Comp:CR', 'Cryptography and Security'), ('Comp:DS', 'Data Structures and Algorithms'), ('Comp:DB', 'Databases'), ('Comp:DL', 'Digital Libraries'), ('Comp:DM', 'Discrete Mathematics'), ('Comp:DC', 'Distributed, Parallel, and Cluster Computing'), ('Comp:ET', 'Emerging Technologies'), ('Comp:FL', 'Formal Languages and Automata Theory'), ('Comp:GL', 'General Literature'), ('Comp:GR', 'Graphics'), ('Comp:AR', 'Hardware Architecture'), ('Comp:HC', 'Human-Computer Interaction'), ('Comp:IR', 'Information Retrieval'), ('Comp:IT', 'Information Theory'), ('Comp:LG', 'Learning'), ('Comp:LO', 'Logic in Computer Science'), ('Comp:MS', 'Mathematical Software'), ('Comp:MA', 'Multiagent Systems'), ('Comp:MM', 'Multimedia'), ('Comp:NI', 'Networking and Internet Architecture'), ('Comp:NE', 'Neural and Evolutionary Computing'), ('Comp:NA', 'Numerical Analysis'), ('Comp:OS', 'Operating Systems'), ('Comp:OH', 'Other Computer Science'), ('Comp:PF', 'Performance'), ('Comp:PL', 'Programming Languages'), ('Comp:RO', 'Robotics'), ('Comp:SI', 'Social and Information Networks'), ('Comp:SE', 'Software Engineering'), ('Comp:SD', 'Sound'), ('Comp:SC', 'Symbolic Computation'), ('Comp:SY', 'Systems and Control')))], max_length=10), blank=True, null=True, size=None), - ), - ] diff --git a/virtualmeetings/migrations/0003_auto_20190405_2102.py b/virtualmeetings/migrations/0003_auto_20190405_2102.py deleted file mode 100644 index 2163d83ca5b4288044972b0bcc08cf5cf329c016..0000000000000000000000000000000000000000 --- a/virtualmeetings/migrations/0003_auto_20190405_2102.py +++ /dev/null @@ -1,76 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.11.4 on 2019-04-05 19:02 -from __future__ import unicode_literals - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('scipost', '0024_auto_20190405_2102'), - ('virtualmeetings', '0002_auto_20190126_2058'), - ] - - operations = [ - migrations.RemoveField( - model_name='feedback', - name='VGM', - ), - migrations.RemoveField( - model_name='feedback', - name='by', - ), - migrations.RemoveField( - model_name='motion', - name='VGM', - ), - migrations.RemoveField( - model_name='motion', - name='in_agreement', - ), - migrations.RemoveField( - model_name='motion', - name='in_disagreement', - ), - migrations.RemoveField( - model_name='motion', - name='in_notsure', - ), - migrations.RemoveField( - model_name='motion', - name='put_forward_by', - ), - migrations.RemoveField( - model_name='nomination', - name='VGM', - ), - migrations.RemoveField( - model_name='nomination', - name='by', - ), - migrations.RemoveField( - model_name='nomination', - name='in_agreement', - ), - migrations.RemoveField( - model_name='nomination', - name='in_disagreement', - ), - migrations.RemoveField( - model_name='nomination', - name='in_notsure', - ), - migrations.DeleteModel( - name='Feedback', - ), - migrations.DeleteModel( - name='Motion', - ), - migrations.DeleteModel( - name='Nomination', - ), - migrations.DeleteModel( - name='VGM', - ), - ] diff --git a/virtualmeetings/migrations/__init__.py b/virtualmeetings/migrations/__init__.py deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/virtualmeetings/models.py b/virtualmeetings/models.py deleted file mode 100644 index 52f3cc296d3b8299dc6f2eefcbe1dda59bc15ae0..0000000000000000000000000000000000000000 --- a/virtualmeetings/models.py +++ /dev/null @@ -1,149 +0,0 @@ -__copyright__ = "Copyright © Stichting SciPost (SciPost Foundation)" -__license__ = "AGPL v3" - - -from django.core.urlresolvers import reverse -from django.db import models -from django.shortcuts import get_object_or_404 -from django.utils import timezone - -from .constants import MOTION_CATEGORIES - -from scipost.constants import SCIPOST_DISCIPLINES, SCIPOST_SUBJECT_AREAS -from scipost.fields import ChoiceArrayField -from scipost.models import Contributor - - -# class VGM(models.Model): -# """ -# Each year, a Virtual General Meeting is held during which operations at -# SciPost are discussed. A VGM can be attended by Administrators, -# Advisory Board members and Editorial Fellows. -# """ -# start_date = models.DateField() -# end_date = models.DateField() -# information = models.TextField(default='') - -# def __str__(self): -# return 'From %s to %s' % (self.start_date.strftime('%Y-%m-%d'), -# self.end_date.strftime('%Y-%m-%d')) - -# def get_absolute_url(self): -# return reverse('virtualmeetings:VGM_detail', args=(self.id,)) - - -# class Feedback(models.Model): -# """ -# Feedback, suggestion or criticism on any aspect of SciPost. -# """ -# VGM = models.ForeignKey('virtualmeetings.VGM', blank=True, null=True) -# by = models.ForeignKey('scipost.Contributor') -# date = models.DateField() -# feedback = models.TextField() - -# def __str__(self): -# return '%s: %s' % (self.by, self.feedback[:50]) - -# def get_absolute_url(self): -# return self.VGM.get_absolute_url() + '#feedback' + str(self.id) - - -# class Nomination(models.Model): -# """ -# Nomination to an Editorial Fellowship. -# """ -# VGM = models.ForeignKey('virtualmeetings.VGM', blank=True, null=True) -# by = models.ForeignKey('scipost.Contributor') -# date = models.DateField(auto_now_add=True) -# first_name = models.CharField(max_length=30) -# last_name = models.CharField(max_length=30) -# discipline = models.CharField(max_length=20, choices=SCIPOST_DISCIPLINES, -# default='physics', verbose_name='Main discipline') -# expertises = ChoiceArrayField( -# models.CharField(max_length=10, choices=SCIPOST_SUBJECT_AREAS), -# blank=True, null=True) -# webpage = models.URLField() -# nr_A = models.PositiveIntegerField(default=0) -# in_agreement = models.ManyToManyField('scipost.Contributor', -# related_name='in_agreement_with_nomination', blank=True) -# nr_N = models.PositiveIntegerField(default=0) -# in_notsure = models.ManyToManyField('scipost.Contributor', -# related_name='in_notsure_with_nomination', blank=True) -# nr_D = models.PositiveIntegerField(default=0) -# in_disagreement = models.ManyToManyField('scipost.Contributor', -# related_name='in_disagreement_with_nomination', -# blank=True) -# voting_deadline = models.DateTimeField('voting deadline', default=timezone.now) -# accepted = models.NullBooleanField() - -# def __str__(self): -# return '%s %s (nominated by %s)' % (self.first_name, -# self.last_name, -# self.by) - -# def get_absolute_url(self): -# return self.VGM.get_absolute_url() + '#nomination_' + str(self.id) - -# def update_votes(self, contributor_id, vote): -# contributor = get_object_or_404(Contributor, pk=contributor_id) -# self.in_agreement.remove(contributor) -# self.in_notsure.remove(contributor) -# self.in_disagreement.remove(contributor) -# if vote == 'A': -# self.in_agreement.add(contributor) -# elif vote == 'N': -# self.in_notsure.add(contributor) -# elif vote == 'D': -# self.in_disagreement.add(contributor) -# self.nr_A = self.in_agreement.count() -# self.nr_N = self.in_notsure.count() -# self.nr_D = self.in_disagreement.count() -# self.save() - - -# class Motion(models.Model): -# """ -# Motion instances are put forward to the Advisory Board and Editorial College -# and detail suggested changes to rules, procedures etc. -# They are meant to be voted on at the annual VGM. -# """ -# category = models.CharField(max_length=10, choices=MOTION_CATEGORIES, default='General') -# VGM = models.ForeignKey('virtualmeetings.VGM', blank=True, null=True) -# background = models.TextField() -# motion = models.TextField() -# put_forward_by = models.ForeignKey('scipost.Contributor') -# date = models.DateField(auto_now_add=True) -# nr_A = models.PositiveIntegerField(default=0) -# in_agreement = models.ManyToManyField('scipost.Contributor', -# related_name='in_agreement_with_motion', blank=True) -# nr_N = models.PositiveIntegerField(default=0) -# in_notsure = models.ManyToManyField('scipost.Contributor', -# related_name='in_notsure_with_motion', blank=True) -# nr_D = models.PositiveIntegerField(default=0) -# in_disagreement = models.ManyToManyField('scipost.Contributor', -# related_name='in_disagreement_with_motion', -# blank=True) -# voting_deadline = models.DateTimeField('voting deadline', default=timezone.now) -# accepted = models.NullBooleanField() - -# def __str__(self): -# return self.motion[:32] - -# def get_absolute_url(self): -# return self.VGM.get_absolute_url() + '#motion_' + str(self.id) - -# def update_votes(self, contributor_id, vote): -# contributor = get_object_or_404(Contributor, pk=contributor_id) -# self.in_agreement.remove(contributor) -# self.in_notsure.remove(contributor) -# self.in_disagreement.remove(contributor) -# if vote == 'A': -# self.in_agreement.add(contributor) -# elif vote == 'N': -# self.in_notsure.add(contributor) -# elif vote == 'D': -# self.in_disagreement.add(contributor) -# self.nr_A = self.in_agreement.count() -# self.nr_N = self.in_notsure.count() -# self.nr_D = self.in_disagreement.count() -# self.save() diff --git a/virtualmeetings/templates/virtualmeetings/VGM_detail.html b/virtualmeetings/templates/virtualmeetings/VGM_detail.html deleted file mode 100644 index 62fcc8b913637e09d6c6570c96945a5caaea9d61..0000000000000000000000000000000000000000 --- a/virtualmeetings/templates/virtualmeetings/VGM_detail.html +++ /dev/null @@ -1,323 +0,0 @@ -{% extends 'scipost/_personal_page_base.html' %} - -{% block breadcrumb_items %} - {{block.super}} - <a href="{% url 'virtualmeetings:VGMs' %}" class="breadcrumb-item">Virtual General Meetings</a> - <span class="breadcrumb-item">{{VGM}}</span> -{% endblock %} - -{% block pagetitle %}: VGM detail{% endblock pagetitle %} - -{% load staticfiles %} -{% load bootstrap %} - -{% block content %} - -<div class="row"> - <div class="col-12"> - <h1 class="highlight">SciPost Virtual General Meeting</h1> - <h2>On this page:</h2> - <ul> - <li><a href="#Information">Information message</a></li> - <li><a href="#Feedback">Feedback</a></li> - {% if VGM.start_date|date:"Y" == '2017' or VGM.start_date|date:"Y" == '2018' %} - <li><a href="#Nominations">Nominations</a></li> - {% endif %} - <li><a href="#Motions">Motions</a></li> - </ul> - </div> -</div> - -<hr> - -<div class="row" id="Information"> - <div class="col-12"> - <h2 class="highlight">Information message from SciPost Administration</h2> - <div class="mb-3">{{ VGM_information }}</div> - - <h3>Quick bullet points:</h3> - <ul> - <li>This VGM is scheduled from {{ VGM.start_date|date:'Y-m-d' }} to {{ VGM.end_date|date:'Y-m-d' }}.</li> - <li>Your feedback/suggestions/criticisms on any aspect of SciPost are greatly valued. Provide them by filling the <a href="#FeedbackBox">feedback form</a>.</li> - <li>Your nominations to the Editorial College are welcome. Simply visit the <a href="{% url 'colleges:potential_fellowships' %}">Potential Fellowships</a> page, and cast your vote on current nominations.</li> - <li>For substantial changes, for example to the by-laws, new Motions can be put forward until the end of the meeting using the <a href="#MotionBox">form</a>.</li> - <li>Voting on Motions is open until one week after the meeting.</li> - <li>You a referred to the <a href="{% url 'scipost:EdCol_by-laws' %}">by-laws</a>, section 2 for further details about the procedures.</li> - </ul> - </div> -</div> - -<hr> - -<div class="row" id="Feedback"> - <div class="col-12"> - <div id="FeedbackBox"> - <div class="card card-gray my-2"> - <div class="card-header"> - <h2>Feedback on SciPost</h2> - <a href="javascript:;" class="btn btn-outline-secondary" data-toggle="toggle" data-target="#submitFeedback">Provide feedback</a> - </div> - <div class="card-body" style="display: none;" id="submitFeedback"> - <form action="{% url 'virtualmeetings:feedback' VGM_id=VGM.id %}" method="post"> - {% csrf_token %} - {{ feedback_form|bootstrap }} - <input class="btn btn-outline-secondary" type="submit" value="Submit"/> - </form> - </div> - </div> - </div> - </div> - <div class="col-12"> - <h2 class="highlight">General Feedback provided</h2> - </div> - <div class="col-12"> - <ul> - {% for feedback in feedback_received %} - <li id="feedback{{feedback.id}}"> - {% include 'virtualmeetings/feedback_content.html' with feedback=feedback %} - </li> - <a href="javascript:;" class="btn btn-outline-secondary" data-toggle="toggle" data-target="#remarkfeedbackForm{{ feedback.id }}">Add a remark on this Feedback</a> - <div class="py-2" id="remarkfeedbackForm{{ feedback.id }}"> - <form action="{% url 'virtualmeetings:add_remark_on_feedback' VGM_id=VGM.id feedback_id=feedback.id %}" method="post"> - {% csrf_token %} - {{ remark_form|bootstrap:'0,12' }} - <input class="btn btn-outline-secondary" type="submit" value="Submit" /> - </form> - </div> - {% if feedback.remarks.all %} - <h3>Remarks on this feedback:</h3> - <ul> - {% for rem in feedback.remarks.all %} - {% include 'scipost/_remark_li.html' with remark=rem %} - {% endfor %} - </ul> - {% endif %} - {% endfor %} - </ul> - </div> -</div> - -<hr> - - -{% if VGM.start_date|date:"Y" == '2017' or VGM.start_date|date:"Y" == '2018' %} -<div class="row" id="Nominations"> - <div class="col-12"> - <div id="NominationBox"> - <div class="card card-gray my-2"> - <div class="card-header"> - <h2>Nominations to the Editorial College</h2> - <a href="javascript:;" class="btn btn-outline-secondary" data-toggle="toggle" data-target="#submitNominationForm">Nominate an Editorial Fellow candidate</a> - </div> - <div class="card-body" style="display: none;" id="submitNominationForm"> - <form action="{% url 'virtualmeetings:nominate_Fellow' VGM_id=VGM.id %}" method="post"> - {% csrf_token %} - {{ nomination_form|bootstrap }} - <input class="btn btn-outline-secondary" type="submit" value="Submit"/> - </form> - </div> - </div> - </div> - </div> - - <div class="col-12"> - <h2 class="highlight">Current Fellow nominations</h2> - <div id="FellowshipListing"> - <h3>Current Fellows ({{current_Fellows|length}}) · <a href="javascript:;" data-toggle="toggle" data-target="#current_fellows_list">view/hide</a></h3> - <ul id="current_fellows_list" style="display: none;"> - {% for Fellow in current_Fellows %} - <li> - <span class="font-weight-bold">{{Fellow}}</span><br> - {{ Fellow.get_discipline_display }} · {{ Fellow.expertises_as_string }} - </li> - {% endfor %} - </ul> - - <h3>Invitations currently outstanding ({{pending_inv_Fellows|length}}) · <a href="javascript:;" data-toggle="toggle" data-target="#pending_invitations_list">view/hide</a></h3> - <ul id="pending_invitations_list" style="display: none;"> - {% for invitee in pending_inv_Fellows %} - <li>{{ invitee.first_name }} {{ invitee.last_name }}</li> - {% empty %} - <li>No outstanding invitations found</li> - {% endfor %} - </ul> - - - <h3>Invitations which have been turned down ({{declined_inv_Fellows|length}}) · <a href="javascript:;" data-toggle="toggle" data-target="#declined_invitations_list">view/hide</a></h3> - <ul id="declined_invitations_list" style="display: none;"> - {% for invitee in declined_inv_Fellows %} - <li>{{ invitee.first_name }} {{ invitee.last_name }}</li> - {% empty %} - <li>No declined invitations found</li> - {% endfor %} - </ul> - </div> - </div> -</div> - -<div class="row"> - <div class="col-12"> - <h2 class="highlight">Nominations under consideration ({{nominations|length}})</h2> - </div> -</div> -<div class="row"> - <div class="col-12" id="accordion"> - {% for domain, spec in spec_list %} - <div class="card"> - <div class="card-body"> - <a href="#" class="card-link" data-toggle="collapse" data-target="#collapse{{ domain|cut:" " }}" aria-expanded="false" aria-controls="collapse{{ domain|cut:" " }}">{{ domain }}</a> - </div> - <!-- Domain --> - <div class="card-body collapse bg-white" id="collapse{{ domain|cut:" " }}" aria-labelledby="heading{{ domain|cut:" " }}" data-parent="#accordion"> - {% for sp, val in spec %} - <div class="card"> - <div class="card-body bg-white"> - <a href="#" class="card-link" id="heading{{ forloop.counter }}" data-toggle="collapse" data-target="#collapse{{ forloop.counter }}" aria-expanded="false" aria-controls="collapse{{ forloop.counter }}">{{ sp }}</a> - <br>{{ val }} - </div> - <ul class="list-group list-group-flush collapse" id="collapse{{ forloop.counter }}" aria-labelledby="heading{{ forloop.counter }}" data-parent="#collapse{{ domain|cut:" " }}"> - {% for nomination in nominations %} - {% if sp in nomination.expertises %} - <li class="list-group-item"> - <div class="card-body bg-white"> - {% include 'virtualmeetings/nomination_content.html' with nomination=nomination %} - </div> - <div class="card-body bg-white"> - <div class="opinionsDisplay mx-0 px-3 py-2"> - <h4>Your opinion on this Nomination (voting deadline: {{ nomination.voting_deadline|date:'y-m-d' }}):</h4> - <form action="{% url 'virtualmeetings:vote_on_nomination' nomination_id=nomination.id vote='A' %}" method="post"> - {% csrf_token %} - <input type="submit" class="agree" value="Agree {{ nomination.nr_A }} "/> - </form> - <form action="{% url 'virtualmeetings:vote_on_nomination' nomination_id=nomination.id vote='N' %}" method="post"> - {% csrf_token %} - <input type="submit" class="notsure" value="Not sure {{ nomination.nr_N }}"/> - </form> - <form action="{% url 'virtualmeetings:vote_on_nomination' nomination_id=nomination.id vote='D'%}" method="post"> - {% csrf_token %} - <input type="submit" class="disagree" value="Disagree {{ nomination.nr_D }}"/> - </form> - {% if request.user.contributor in nomination.in_agreement.all %} - <strong>(you have voted: Agreed)</strong> - {% elif request.user.contributor in nomination.in_notsure.all %} - <strong>(you have voted: Not sure)</strong> - {% elif request.user.contributor in nomination.in_disagreement.all %} - <strong>(you have voted: Disagree)</strong> - {% endif %} - </div> - </div> - <div class="card-body bg-white"> - <a href="javascript:;" class="card-link btn btn-outline-secondary" data-toggle="toggle" data-target="#remarkForm{{ nomination.id }}">Add a remark on this Nomination</a> - <div class="submitRemarkForm my-3" id="remarkForm{{ nomination.id }}" style="display: none;"> - <form action="{% url 'virtualmeetings:add_remark_on_nomination' VGM_id=VGM.id nomination_id=nomination.id %}" method="post"> - {% csrf_token %} - {{ remark_form|bootstrap:'0,12' }} - <input type="submit" class="btn btn-outline-secondary" value="Submit" /> - </form> - </div> - </div> - <div class="card-body bg-white"> - <h3>Remarks on this nomination</h3> - <ul> - {% for rem in nomination.remarks.all %} - {% include 'scipost/_remark_li.html' with remark=rem %} - {% empty %} - <li><em>No Remarks found</em></li> - {% endfor %} - </ul> - </div> - </li> - {% endif %} - {% endfor %} - </ul> - </div> - {% endfor %} - </div><!-- End Domain --> - </div> - {% endfor %} - </div> -</div> -{% endif %} - -<!-- Motions --> -<div class="row" id="Motions"> - <div class="col-12"> - <div class="card card-gray my-2"> - <div class="card-header"> - <h2>Submit a new Motion</h2> - <a href="javascript:;" class="btn btn-outline-secondary" data-toggle="toggle" data-target="#submitMotionForm">Put a new Motion forward</a> - </div> - <div class="card-body" style="display: none;" id="submitMotionForm"> - <form action="{% url 'virtualmeetings:put_motion_forward' VGM_id=VGM.id %}" method="post"> - {% csrf_token %} - {{ motion_form|bootstrap }} - <input class="btn btn-outline-secondary" type="submit" value="Submit"/> - </form> - </div> - </div> - </div> -</div> - -<div class="row"> - <div class="col-12"> - <h2 class="highlight">Motions under consideration</h2> - </div> -</div> - - {% for key, val in motion_categories_dict.items %} - <div class="row"> - <div class="col-12"><h2>{{ val }}:</h2></div> - <div class="col-md-11 ml-auto"> - <ul> - {% for motion in VGM.motion_set.all %} - {% if motion.category == key %} - <li> - {% include 'virtualmeetings/motion_content.html' with motion=motion %} - <div class="d-block mb-3 opinionsDisplay"> - <h4>Your opinion on this Motion (voting deadline: {{ motion.voting_deadline|date:'y-m-d' }}):</h4> - <form action="{% url 'virtualmeetings:vote_on_motion' motion_id=motion.id vote='A' %}" method="post"> - {% csrf_token %} - <input type="submit" class="agree" value="Agree {{ motion.nr_A }} "/> - </form> - <form action="{% url 'virtualmeetings:vote_on_motion' motion_id=motion.id vote='N' %}" method="post"> - {% csrf_token %} - <input type="submit" class="notsure" value="Not sure {{ motion.nr_N }}"/> - </form> - <form action="{% url 'virtualmeetings:vote_on_motion' motion_id=motion.id vote='D'%}" method="post"> - {% csrf_token %} - <input type="submit" class="disagree" value="Disagree {{ motion.nr_D }}"/> - </form> - {% if request.user.contributor in motion.in_agreement.all %} - <strong>(you have voted: Agreed)</strong> - {% elif request.user.contributor in motion.in_notsure.all %} - <strong>(you have voted: Not sure)</strong> - {% elif request.user.contributor in motion.in_disagreement.all %} - <strong>(you have voted: Disagree)</strong> - {% endif %} - </div> - <a class="btn btn-outline-secondary" href="javascript:;" data-toggle="toggle" data-target="#remarkForm{{ motion.id }}">Add a remark on this Motion</a> - <div class="submitRemarkForm mt-3" id="remarkForm{{ motion.id }}" style="display: none;"> - <form action="{% url 'virtualmeetings:add_remark_on_motion' motion_id=motion.id %}" method="post"> - {% csrf_token %} - {{ remark_form|bootstrap:"0,12" }} - <input type="submit" class="btn btn-outline-secondary" value="Submit" /> - </form> - </div> - {% if motion.remarks.all %} - <h3>Remarks on this motion:</h3> - <ul> - {% for rem in motion.remarks.all %} - {% include 'scipost/_remark_li.html' with remark=rem %} - {% endfor %} - </ul> - {% endif %} - <hr> - </li> - {% endif %} - {% endfor %} - </ul> - </div> - </div> - {% endfor %} - -{% endblock %} diff --git a/virtualmeetings/templates/virtualmeetings/VGMs.html b/virtualmeetings/templates/virtualmeetings/VGMs.html deleted file mode 100644 index 22f2178771a4b12c711f364594e6272b1ff7dcdc..0000000000000000000000000000000000000000 --- a/virtualmeetings/templates/virtualmeetings/VGMs.html +++ /dev/null @@ -1,28 +0,0 @@ -{% extends 'scipost/_personal_page_base.html' %} - -{% block breadcrumb_items %} - {{block.super}} - <span class="breadcrumb-item">Virtual General Meetings</span> -{% endblock %} - -{% block pagetitle %}: VGMs{% endblock pagetitle %} - -{% load staticfiles %} - -{% block content %} - -<div class="row"> - <div class="col-12"> - <h1 class="highlight">SciPost Virtual General Meetings</h1> - <ul> - {% for VGM in VGM_list %} - <li><a href="{% url 'virtualmeetings:VGM_detail' VGM_id=VGM.id %}">{{ VGM }}</a></li> - {% empty %} - <li>You are not registered for a Virtual General Meeting</a> - {% endfor %} - </ul> - </div> -</div> - - -{% endblock %} diff --git a/virtualmeetings/templates/virtualmeetings/feedback_content.html b/virtualmeetings/templates/virtualmeetings/feedback_content.html deleted file mode 100644 index 2316bd2677d36c422e84501702d2376edafafd8c..0000000000000000000000000000000000000000 --- a/virtualmeetings/templates/virtualmeetings/feedback_content.html +++ /dev/null @@ -1,4 +0,0 @@ -<div class="Feedback"> - <h3><em>by {{ feedback.by.user.first_name }} {{ feedback.by.user.last_name }}</em></h3> - <div>{{ feedback.feedback|linebreaks }}</div> -</div> diff --git a/virtualmeetings/templates/virtualmeetings/motion_content.html b/virtualmeetings/templates/virtualmeetings/motion_content.html deleted file mode 100644 index b6556ad5cd3ae64c10477f9b2faf903951fecff7..0000000000000000000000000000000000000000 --- a/virtualmeetings/templates/virtualmeetings/motion_content.html +++ /dev/null @@ -1,14 +0,0 @@ -<div class="Motion" id="motion_{{ motion.id }}"> - <h2 class="pb-0">Motion {{ motion.id }}</h2> - <h3 class="pt-0 mb-2">put forward on {{ motion.date|date:"Y-m-d" }} by {{ motion.put_forward_by.user.first_name }} {{ motion.put_forward_by.user.last_name }}</h3> - - <h3>Background:</h3> - {% if motion.put_forward_by.user.is_superuser %} - <div>{{ motion.background|safe|linebreaks }}</div> - {% else %} - <div>{{ motion.background|linebreaks }}</div> - {% endif %} - - <h3>Motion:</h3> - <div>{{ motion.motion|linebreaks }}</div> -</div> diff --git a/virtualmeetings/templates/virtualmeetings/nomination_content.html b/virtualmeetings/templates/virtualmeetings/nomination_content.html deleted file mode 100644 index 9d34f5c1802b13e7c034ec53535063deebf34ed4..0000000000000000000000000000000000000000 --- a/virtualmeetings/templates/virtualmeetings/nomination_content.html +++ /dev/null @@ -1,24 +0,0 @@ -{% load scipost_extras %} - -<div style="border-bottom: 1px solid #eee;" id="nomination_{{ nomination.id }}"> - <div class="row"> - <div class="col-4"> - <h3><b>{{ nomination.first_name }} {{ nomination.last_name }}</b></h3> - <p>Nominated by {{ nomination.by.user.first_name }} {{ nomination.by.user.last_name }}</p> - </div> - <div class="col-4"> - <p> - <a href="{{ nomination.webpage }}">Webpage</a><br> - Discipline: {{ nomination.get_discipline_display }} - </p> - </div> - <div class="col-4"> - <p>Expertise:</p> - <ul> - {% for expertise in nomination.expertises %} - <li>{{expertise|get_specialization_display}}</li> - {% endfor %} - </ul> - </div> - </div> -</div> diff --git a/virtualmeetings/tests.py b/virtualmeetings/tests.py deleted file mode 100644 index ddef03c4df91383dfce15a034976e3a469d77d70..0000000000000000000000000000000000000000 --- a/virtualmeetings/tests.py +++ /dev/null @@ -1,7 +0,0 @@ -__copyright__ = "Copyright © Stichting SciPost (SciPost Foundation)" -__license__ = "AGPL v3" - - -from django.test import TestCase - -# Create your tests here. diff --git a/virtualmeetings/urls.py b/virtualmeetings/urls.py deleted file mode 100644 index f1b29bf14d5789a8ec96c70300a771d08f580932..0000000000000000000000000000000000000000 --- a/virtualmeetings/urls.py +++ /dev/null @@ -1,26 +0,0 @@ -__copyright__ = "Copyright © Stichting SciPost (SciPost Foundation)" -__license__ = "AGPL v3" - - -from django.conf.urls import url - -from . import views - -urlpatterns = [ - # url(r'^$', views.VGMs, name='VGMs'), - # url(r'^VGM/(?P<VGM_id>[0-9]+)/$', views.VGM_detail, name='VGM_detail'), - # url(r'^feedback/(?P<VGM_id>[0-9]+)$', views.feedback, name='feedback'), - # url(r'^add_remark_on_feedback/(?P<VGM_id>[0-9]+)/(?P<feedback_id>[0-9]+)$', - # views.add_remark_on_feedback, name='add_remark_on_feedback'), - # url(r'^nominate_Fellow/(?P<VGM_id>[0-9]+)$', views.nominate_Fellow, name='nominate_Fellow'), - # url(r'^add_remark_on_nomination/(?P<VGM_id>[0-9]+)/(?P<nomination_id>[0-9]+)$', - # views.add_remark_on_nomination, name='add_remark_on_nomination'), - # url(r'^vote_on_nomination/(?P<nomination_id>[0-9]+)/(?P<vote>[AND])$', - # views.vote_on_nomination, name='vote_on_nomination'), - # url(r'^put_motion_forward/(?P<VGM_id>[0-9]+)$', - # views.put_motion_forward, name='put_motion_forward'), - # url(r'^add_remark_on_motion/(?P<motion_id>[0-9]+)$', - # views.add_remark_on_motion, name='add_remark_on_motion'), - # url(r'^vote_on_motion/(?P<motion_id>[0-9]+)/(?P<vote>[AND])$', - # views.vote_on_motion, name='vote_on_motion'), -] diff --git a/virtualmeetings/views.py b/virtualmeetings/views.py deleted file mode 100644 index e316c2c08849bf4eccf1e9ec06f32f8571023e1f..0000000000000000000000000000000000000000 --- a/virtualmeetings/views.py +++ /dev/null @@ -1,210 +0,0 @@ -__copyright__ = "Copyright © Stichting SciPost (SciPost Foundation)" -__license__ = "AGPL v3" - - -import datetime - -from django.contrib import messages -from django.contrib.auth.decorators import login_required, permission_required -from django.core.urlresolvers import reverse -from django.shortcuts import get_object_or_404, render, redirect -from django.template import Context, Template -from django.utils import timezone - -from .constants import motion_categories_dict -# from .forms import FeedbackForm, NominationForm, MotionForm -# from .models import VGM, Feedback, Nomination, Motion - -from scipost.constants import SCIPOST_SUBJECT_AREAS -from scipost.forms import RemarkForm -from scipost.models import Contributor, Remark -from invitations.models import RegistrationInvitation - - -# @login_required -# @permission_required('scipost.can_attend_VGMs') -# def VGMs(request): -# VGM_list = VGM.objects.all().order_by('start_date') -# context = {'VGM_list': VGM_list} -# return render(request, 'virtualmeetings/VGMs.html', context) - - -# @login_required -# @permission_required('scipost.can_attend_VGMs') -# def VGM_detail(request, VGM_id): -# VGM_instance = get_object_or_404(VGM, id=VGM_id) -# VGM_information = Template(VGM_instance.information).render(Context({})) -# feedback_received = Feedback.objects.filter(VGM=VGM_instance).order_by('date') -# feedback_form = FeedbackForm() -# current_Fellows = Contributor.objects.filter( -# user__groups__name='Editorial College').order_by('user__last_name') - -# pending_inv_Fellows = RegistrationInvitation.objects.for_fellows().no_response() -# declined_inv_Fellows = RegistrationInvitation.objects.for_fellows().declined() -# spec_list = SCIPOST_SUBJECT_AREAS # subject_areas_dict -# nomination_form = NominationForm() -# nominations = Nomination.objects.filter(VGM=VGM_instance, accepted=None).order_by('last_name') -# motion_form = MotionForm() -# remark_form = RemarkForm() -# context = { -# 'VGM': VGM_instance, -# 'VGM_information': VGM_information, -# 'feedback_received': feedback_received, -# 'feedback_form': feedback_form, -# 'current_Fellows': current_Fellows, -# 'pending_inv_Fellows': pending_inv_Fellows, -# 'declined_inv_Fellows': declined_inv_Fellows, -# 'spec_list': spec_list, -# 'nominations': nominations, -# 'nomination_form': nomination_form, -# 'motion_categories_dict': motion_categories_dict, -# 'motion_form': motion_form, -# 'remark_form': remark_form, -# } -# return render(request, 'virtualmeetings/VGM_detail.html', context) - - -# @login_required -# @permission_required('scipost.can_attend_VGMs') -# def feedback(request, VGM_id=None): -# if request.method == 'POST': -# feedback_form = FeedbackForm(request.POST) -# if feedback_form.is_valid(): -# feedback = Feedback(by=request.user.contributor, -# date=timezone.now().date(), -# feedback=feedback_form.cleaned_data['feedback'],) -# if VGM_id: -# VGM_instance = get_object_or_404(VGM, id=VGM_id) -# feedback.VGM = VGM_instance -# feedback.save() -# ack_message = 'Your feedback has been received.' -# context = {'ack_message': ack_message} -# if VGM_id: -# context['followup_message'] = 'Return to the ' -# context['followup_link'] = reverse('virtualmeetings:VGM_detail', -# kwargs={'VGM_id': VGM_id}) -# context['followup_link_label'] = 'VGM page' -# return render(request, 'scipost/acknowledgement.html', context) -# else: -# errormessage = 'The form was not filled properly.' -# return render(request, 'scipost/error.html', {'errormessage': errormessage}) -# else: -# errormessage = 'This view can only be posted to.' -# return render(request, 'scipost/error.html', {'errormessage': errormessage}) - - -# @login_required -# @permission_required('scipost.can_attend_VGMs', raise_exception=True) -# def add_remark_on_feedback(request, VGM_id, feedback_id): -# feedback = get_object_or_404(Feedback, pk=feedback_id) -# remark_form = RemarkForm(request.POST) -# if remark_form.is_valid(): -# remark = Remark(contributor=request.user.contributor, -# feedback=feedback, -# remark=remark_form.cleaned_data['remark']) -# remark.save() -# else: -# messages.danger(request, 'The form was invalidly filled.') -# return redirect(feedback.get_absolute_url()) - - -# @login_required -# @permission_required('scipost.can_attend_VGMs') -# def nominate_Fellow(request, VGM_id): -# VGM_instance = get_object_or_404(VGM, id=VGM_id) -# nomination_form = NominationForm(request.POST) - -# if nomination_form.is_valid(): -# nomination = nomination_form.save(commit=False) -# nomination.VGM = VGM_instance -# nomination.by = request.user.contributor -# nomination.voting_deadline = VGM_instance.end_date + datetime.timedelta(days=7) -# nomination.save() -# nomination.update_votes(request.user.contributor.id, 'A') -# messages.success(request, 'The nomination has been registered.') -# else: -# messages.warning(request, 'The form was not filled properly.') -# return redirect(VGM_instance.get_absolute_url()) - - -# @login_required -# @permission_required('scipost.can_attend_VGMs', raise_exception=True) -# def add_remark_on_nomination(request, VGM_id, nomination_id): -# # contributor = request.user.contributor -# nomination = get_object_or_404(Nomination, pk=nomination_id) -# remark_form = RemarkForm(request.POST) -# if remark_form.is_valid(): -# remark = Remark(contributor=request.user.contributor, -# nomination=nomination, -# remark=remark_form.cleaned_data['remark']) -# remark.save() -# else: -# messages.danger(request, 'The form was invalidly filled.') -# return redirect(nomination.get_absolute_url()) - - -# @login_required -# @permission_required('scipost.can_attend_VGMs', raise_exception=True) -# def vote_on_nomination(request, nomination_id, vote): -# contributor = request.user.contributor -# nomination = get_object_or_404(Nomination, pk=nomination_id) -# if timezone.now() > nomination.voting_deadline: -# messages.warning(request, 'The voting deadline on this nomination has passed.') -# else: -# nomination.update_votes(contributor.id, vote) -# messages.success(request, 'You have successfully voted on nomination %i' % nomination.id) -# return redirect(nomination.get_absolute_url()) - - -# @login_required -# @permission_required('scipost.can_attend_VGMs') -# def put_motion_forward(request, VGM_id): -# VGM_instance = get_object_or_404(VGM, id=VGM_id) -# if timezone.now().date() > VGM_instance.end_date: -# messages.warning(request, 'This VGM has ended. No new motions can be put forward.') -# return redirect(VGM_instance.get_absolute_url()) - -# motion_form = MotionForm(request.POST) -# if motion_form.is_valid(): -# motion = Motion( -# category=motion_form.cleaned_data['category'], -# VGM=VGM_instance, -# background=motion_form.cleaned_data['background'], -# motion=motion_form.cleaned_data['motion'], -# put_forward_by=request.user.contributor, -# voting_deadline=VGM_instance.end_date + datetime.timedelta(days=7), -# ) -# motion.save() -# motion.update_votes(request.user.contributor.id, 'A') -# messages.success(request, 'Your vote has been registered.') -# else: -# messages.danger(request, 'The form was not filled properly.') -# return redirect(motion.get_absolute_url()) - - -# @login_required -# @permission_required('scipost.can_attend_VGMs', raise_exception=True) -# def add_remark_on_motion(request, motion_id): -# motion = get_object_or_404(Motion, pk=motion_id) -# remark_form = RemarkForm(request.POST) -# if remark_form.is_valid(): -# remark = Remark(contributor=request.user.contributor, -# motion=motion, -# remark=remark_form.cleaned_data['remark']) -# remark.save() -# else: -# messages.danger(request, 'The form was not filled properly.') -# return redirect(motion.get_absolute_url()) - - -# @login_required -# @permission_required('scipost.can_attend_VGMs', raise_exception=True) -# def vote_on_motion(request, motion_id, vote): -# contributor = request.user.contributor -# motion = get_object_or_404(Motion, pk=motion_id) -# if timezone.now() > motion.voting_deadline: -# messages.warning(request, 'The voting deadline on this motion has passed.') -# else: -# motion.update_votes(contributor.id, vote) -# messages.success(request, 'You have successfully voted on motion %i' % motion.id) -# return redirect(motion.get_absolute_url())