diff --git a/eoapublications/management/commands/publicationimport.py b/eoapublications/management/commands/publicationimport.py index ac604d8..9b5b4a3 100644 --- a/eoapublications/management/commands/publicationimport.py +++ b/eoapublications/management/commands/publicationimport.py @@ -452,6 +452,12 @@ def handle(self, **options): Newelement.Order = xmlChild.get('order') Newelement.Fulltext = self.process_as_string(xmlChild) Newelement.save() + if xmlChild.tag == "EOAparagraph" and xmlChild.get("href") is not None: + Newelement.Kind = 'eoaparagraph' + Newelement.Paralleltextlink = xmlChild.get("href") + Newelement.Order = xmlChild.get('order') + Newelement.Fulltext = self.process_as_string(xmlChild) + Newelement.save() if xmlChild.tag == "EOAsection": Newelement.Kind = 'eoasection' Newelement.Order = xmlChild.get('order') diff --git a/eoapublications/migrations/0005_add_paralleltextlink.py b/eoapublications/migrations/0005_add_paralleltextlink.py new file mode 100644 index 0000000..79b5809 --- /dev/null +++ b/eoapublications/migrations/0005_add_paralleltextlink.py @@ -0,0 +1,18 @@ +# Generated by Django 2.1.11 on 2020-04-07 07:22 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('eoapublications', '0004_add_epigraph'), + ] + + operations = [ + migrations.AddField( + model_name='element', + name='Paralleltextlink', + field=models.TextField(blank=True), + ), + ] diff --git a/eoapublications/migrations/0006_add_paralleltextlink.py b/eoapublications/migrations/0006_add_paralleltextlink.py new file mode 100644 index 0000000..ef2c035 --- /dev/null +++ b/eoapublications/migrations/0006_add_paralleltextlink.py @@ -0,0 +1,18 @@ +# Generated by Django 2.1.11 on 2020-04-07 07:28 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('eoapublications', '0005_add_paralleltextlink'), + ] + + operations = [ + migrations.AlterField( + model_name='element', + name='Paralleltextlink', + field=models.TextField(blank=True, max_length=30), + ), + ] diff --git a/eoapublications/migrations/0007_add_paralleltextlink.py b/eoapublications/migrations/0007_add_paralleltextlink.py new file mode 100644 index 0000000..188fe70 --- /dev/null +++ b/eoapublications/migrations/0007_add_paralleltextlink.py @@ -0,0 +1,18 @@ +# Generated by Django 2.1.11 on 2020-04-07 07:30 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('eoapublications', '0006_add_paralleltextlink'), + ] + + operations = [ + migrations.AlterField( + model_name='element', + name='Paralleltextlink', + field=models.CharField(blank=True, max_length=30), + ), + ] diff --git a/eoapublications/models.py b/eoapublications/models.py index 002c427..3a488f1 100644 --- a/eoapublications/models.py +++ b/eoapublications/models.py @@ -171,6 +171,7 @@ class Element(models.Model): Indentation = models.BooleanField(blank=True,default=False) Epigraph = models.BooleanField(blank=True,default=False) Listcharacter = models.CharField(max_length=1000,blank=True) + Paralleltextlink = models.CharField(max_length=30, blank=True) Fulltext = models.TextField(blank=True) Caption = models.TextField(blank=True) Figureimagebig = models.ImageField(upload_to=filepath_chapter, blank=True) diff --git a/eoapublications/templates/publications/chapter/chapter_base.html b/eoapublications/templates/publications/chapter/chapter_base.html index 7b3096e..9bac382 100644 --- a/eoapublications/templates/publications/chapter/chapter_base.html +++ b/eoapublications/templates/publications/chapter/chapter_base.html @@ -134,6 +134,9 @@

{% if Element.Indexelements %} {% endif %} + {% if Element.Paralleltextlink %} + + {% endif %} {% if forloop.first %} {% if Element.Kind == 'eoasection' %}