mirror of
https://github.com/sissbruecker/linkding.git
synced 2025-08-07 10:58:25 +02:00
Add RSS link to shared bookmarks page (#984)
This commit is contained in:
@@ -36,5 +36,8 @@
|
||||
{% if not request.global_settings.enable_link_prefetch %}
|
||||
<meta name="turbo-prefetch" content="false">
|
||||
{% endif %}
|
||||
{% if rss_feed_url %}
|
||||
<link rel="alternate" type="application/rss+xml" href="{{ rss_feed_url }}" />
|
||||
{% endif %}
|
||||
<script src="{% static "bundle.js" %}?v={{ app_version }}"></script>
|
||||
</head>
|
||||
|
@@ -503,3 +503,10 @@ class BookmarkArchivedViewTestCase(
|
||||
self.assertIsNotNone(soup.select_one("turbo-frame#details-modal"))
|
||||
self.assertIsNone(soup.select_one("#bookmark-list-container"))
|
||||
self.assertIsNone(soup.select_one("#tag-cloud-container"))
|
||||
|
||||
def test_does_not_include_rss_feed(self):
|
||||
response = self.client.get(reverse("bookmarks:archived"))
|
||||
soup = self.make_soup(response.content.decode())
|
||||
|
||||
feed = soup.select_one('head link[type="application/rss+xml"]')
|
||||
self.assertIsNone(feed)
|
||||
|
@@ -481,3 +481,10 @@ class BookmarkIndexViewTestCase(
|
||||
self.assertIsNotNone(soup.select_one("turbo-frame#details-modal"))
|
||||
self.assertIsNone(soup.select_one("#bookmark-list-container"))
|
||||
self.assertIsNone(soup.select_one("#tag-cloud-container"))
|
||||
|
||||
def test_does_not_include_rss_feed(self):
|
||||
response = self.client.get(reverse("bookmarks:index"))
|
||||
soup = self.make_soup(response.content.decode())
|
||||
|
||||
feed = soup.select_one('head link[type="application/rss+xml"]')
|
||||
self.assertIsNone(feed)
|
||||
|
@@ -593,3 +593,11 @@ class BookmarkSharedViewTestCase(
|
||||
self.assertIsNotNone(soup.select_one("turbo-frame#details-modal"))
|
||||
self.assertIsNone(soup.select_one("#bookmark-list-container"))
|
||||
self.assertIsNone(soup.select_one("#tag-cloud-container"))
|
||||
|
||||
def test_includes_public_shared_rss_feed(self):
|
||||
response = self.client.get(reverse("bookmarks:shared"))
|
||||
soup = self.make_soup(response.content.decode())
|
||||
|
||||
feed = soup.select_one('head link[type="application/rss+xml"]')
|
||||
self.assertIsNotNone(feed)
|
||||
self.assertEqual(feed.attrs["href"], reverse("bookmarks:feeds.public_shared"))
|
||||
|
@@ -104,6 +104,7 @@ def shared(request):
|
||||
"tag_cloud": tag_cloud,
|
||||
"details": bookmark_details,
|
||||
"users": users,
|
||||
"rss_feed_url": reverse("bookmarks:feeds.public_shared"),
|
||||
},
|
||||
)
|
||||
|
||||
|
Reference in New Issue
Block a user