Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/core/logic.py
Original file line number Diff line number Diff line change
Expand Up @@ -653,6 +653,7 @@ def get_settings_to_edit(display_group, journal, user):
"replyto_address",
"use_credit",
"a11y_public_info",
"feeds",
]

group_of_settings = process_setting_list(journal_settings, "general", journal)
Expand Down
3 changes: 3 additions & 0 deletions src/templates/admin/elements/forms/group_journal.html
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ <h2>Other</h2>
<p>If you want to toggle CRediT support, you can do so here.</p>
{% include "admin/elements/forms/field.html" with field=edit_form.display_use_credit %}
{% include "admin/elements/forms/field.html" with field=edit_form.use_credit %}

<p>When enabled, RSS and Atom feed links are included in the journal's page headers.</p>
{% include "admin/elements/forms/field.html" with field=edit_form.feeds %}
</div>

{% if request.press.allow_journal_a11y_info %}
Expand Down
6 changes: 4 additions & 2 deletions src/themes/OLH/templates/core/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,10 @@
{% hook 'base_head_css' %}

{% if request.journal %}
<link href="{% journal_url 'rss_articles' %}" type="application/atom+xml" rel="alternate" title="Article Feed for Journal">
<link href="{% journal_url 'rss_news' %}" type="application/atom+xml" rel="alternate" title="News Feed for Journal">
{% if journal_settings.general.feeds %}
<link href="{% journal_url 'rss_articles' %}" type="application/atom+xml" rel="alternate" title="Article Feed for Journal">
<link href="{% journal_url 'rss_news' %}" type="application/atom+xml" rel="alternate" title="News Feed for Journal">
{% endif %}
{% else %}
<link rel="alternate" type="application/rss+xml" title="Articles RSS Feed" href="{% url 'rss_articles' %}"/>
<link type="application/atom+xml" rel="alternate" title="News Feed for Journal" href="{% url 'rss_news' %}">
Expand Down
2 changes: 2 additions & 0 deletions src/themes/clean/templates/core/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@
{% block head %}{% endblock head %}
<link rel="sitemap" type="application/xml" title="Sitemap" href="{% url 'website_sitemap' %}">

{% if not request.journal or journal_settings.general.feeds %}
<link href="{% journal_url 'rss_articles' %}" type="application/atom+xml" rel="alternate"
title="Article Feed for Journal">
<link href="{% journal_url 'rss_news' %}" type="application/atom+xml" rel="alternate" title="News Feed for Journal">
{% endif %}
{% include "common/elements/favicons.html" %}

<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" rel="stylesheet"
Expand Down
2 changes: 1 addition & 1 deletion src/themes/material/templates/core/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<link rel="sitemap" type="application/xml" title="Sitemap" href="{% url 'website_sitemap' %}">
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet"
integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
{% if request.journal %}
{% if request.journal and journal_settings.general.feeds %}
<link href="{% journal_url 'rss_articles' %}" type="application/atom+xml" rel="alternate"
title="Article Feed for Journal">
<link href="{% journal_url 'rss_news' %}" type="application/atom+xml" rel="alternate"
Expand Down
19 changes: 19 additions & 0 deletions src/utils/install/journal_defaults.json
Original file line number Diff line number Diff line change
Expand Up @@ -5615,5 +5615,24 @@
"editor",
"journal-manager"
]
},
{
"group": {
"name": "general"
},
"setting": {
"description": "RSS and Atom feed links in the journal's page headers.",
"is_translatable": false,
"name": "feeds",
"pretty_name": "RSS/Atom Feeds",
"type": "boolean"
},
"value": {
"default": "on"
},
"editable_by": [
"editor",
"journal-manager"
]
}
]
Loading