-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
626d7d8
commit 36ca76f
Showing
5 changed files
with
32 additions
and
29 deletions.
There are no files selected for viewing
3 changes: 3 additions & 0 deletions
3
peachjam_search/templates/peachjam_search/_saved_search_filters.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{# djlint:off #} | ||
{% for values in saved_search.get_filters_dict.values %}{% if not forloop.first %}, {% endif %}{{ values|join:", " }}{% endfor %} | ||
{# djlint:on #} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 16 additions & 11 deletions
27
peachjam_search/templates/peachjam_search/emails/search_alert.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,26 @@ | ||
{% load i18n %} | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"/> | ||
<title>Search Alert</title> | ||
<title>{% trans "Search Alert" %}</title> | ||
</head> | ||
<body> | ||
<p>Hi {{ saved_search.user }}</p> | ||
<p>We have found new documents that match your search for:</p> | ||
<p>{{ saved_search.user }},</p> | ||
<p>{% trans "We have found new documents that match your search alert:" %}</p> | ||
<p> | ||
<strong>{{ saved_search.q }}</strong> | ||
<strong><a href="{{ site.domain }}{{ saved_search.get_absolute_url }}">{{ saved_search.q }}</a></strong> | ||
</p> | ||
<p>{% include 'peachjam_search/_saved_search_filters.html' %}</p> | ||
<ul> | ||
{% for doc in hits %} | ||
<li> | ||
<a href="{{ site.domain }}{{ doc.expression_frbr_uri }}">{{ doc.title }}</a> | ||
</li> | ||
{% endfor %} | ||
</ul> | ||
<p> | ||
<a href="{{ site.domain }}{% url "search:saved_search_list" %}">{% trans "Manage your search alerts" %}</a> | ||
</p> | ||
<p>Here are the new documents:</p> | ||
{% for doc in hits %} | ||
<h3> | ||
<a href="{{ site.domain }}{{ doc.expression_frbr_uri }}">{{ doc.title }}</a> | ||
</h3> | ||
{% endfor %} | ||
<p>Best regards.</p> | ||
</body> | ||
</html> |
19 changes: 11 additions & 8 deletions
19
peachjam_search/templates/peachjam_search/emails/search_alert.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,16 @@ | ||
Search Alert | ||
Hi {{ saved_search.user }} | ||
We have found new documents that match your search for: | ||
{{ saved_search.user }}, | ||
|
||
We have found new documents that match your search alert: | ||
|
||
{{ saved_search.q }} | ||
Here are the new documents: | ||
|
||
{{ site.domain }}{{ saved_search.get_absolute_url }} | ||
|
||
{% for doc in hits %} | ||
TITLE: {{ doc.title }} | ||
URL: {{ site.domain }}{{ doc.expression_frbr_uri }} | ||
======================== | ||
Title: {{ doc.title }} | ||
{{ site.domain }}{{ doc.expression_frbr_uri }} | ||
|
||
{% endfor %} | ||
|
||
Best regards. | ||
|
||
Manage your search alerts: {{ site.domain }}{% url "search:saved_search_list" %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters