diff --git a/scipost_django/affiliates/migrations/0008_affiliatejournal_homepage.py b/scipost_django/affiliates/migrations/0008_affiliatejournal_homepage.py new file mode 100644 index 0000000000000000000000000000000000000000..b036eb0fa6709a6e9f288a2dfa532f3a65fd1af5 --- /dev/null +++ b/scipost_django/affiliates/migrations/0008_affiliatejournal_homepage.py @@ -0,0 +1,18 @@ +# Generated by Django 3.2.12 on 2022-02-23 15:06 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('affiliates', '0007_alter_affiliatepublication__metadata_crossref'), + ] + + operations = [ + migrations.AddField( + model_name='affiliatejournal', + name='homepage', + field=models.URLField(blank=True, max_length=256), + ), + ] diff --git a/scipost_django/affiliates/models/journal.py b/scipost_django/affiliates/models/journal.py index dd1e30195d7a8d1d586af241e3ddf16f359c6eb9..9df8948a89ee85adf75c85a7495521d6373fe924 100644 --- a/scipost_django/affiliates/models/journal.py +++ b/scipost_django/affiliates/models/journal.py @@ -30,6 +30,8 @@ class AffiliateJournal(models.Model): unique=True, ) + homepage = models.URLField(max_length=256, blank=True) + class Meta: ordering = ["publisher", "name"] permissions = (("manage_journal_content", "Manage Journal content"),) diff --git a/scipost_django/affiliates/templates/affiliates/affiliatejournal_detail.html b/scipost_django/affiliates/templates/affiliates/affiliatejournal_detail.html index 902e5fc53258dce0f232ca42e9326edbd6780997..905f0d6d622df3ec1627efa233da8ded04d9dcb4 100644 --- a/scipost_django/affiliates/templates/affiliates/affiliatejournal_detail.html +++ b/scipost_django/affiliates/templates/affiliates/affiliatejournal_detail.html @@ -18,6 +18,14 @@ <h2 class="highlight">Affiliate Journal: {{ object }}</h2> + <h3>Journal information</h3> + <table class="table"> + <tr> + <th>Homepage</th> + <td>{% if object.homepage %}<a href="{{ object.homepage }}" target="_blank">{{ object.homepage }}</a>{% else %}(not defined){% endif %}</td> + </tr> + </table> + {% if perms.affiliates.can_edit_affiliatedjournal %} <h3 class="highlight">Journal managers</h3> <div class="row p-2">