-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Show related contacts in the POI form
Co-authored-by: David Venhoff <[email protected]>
- Loading branch information
1 parent
03fb569
commit c241298
Showing
7 changed files
with
175 additions
and
11 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -997,6 +997,21 @@ | |
"created_date": "2024-08-06T13:23:45.256Z" | ||
} | ||
}, | ||
{ | ||
"model": "cms.contact", | ||
"pk": 4, | ||
"fields": { | ||
"title": "", | ||
"name": "", | ||
"location": 6, | ||
"email": "[email protected]", | ||
"phone_number": "0123456789", | ||
"website": "https://integreat-app.de/", | ||
"archived": false, | ||
"last_updated": "2024-08-06T13:23:45.256Z", | ||
"created_date": "2024-08-06T13:23:45.256Z" | ||
} | ||
}, | ||
{ | ||
"model": "cms.recurrencerule", | ||
"pk": 1, | ||
|
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
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
28 changes: 28 additions & 0 deletions
28
integreat_cms/cms/templates/pois/poi_form_sidebar/related_contacts_box.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,28 @@ | ||
{% extends "../../_collapsible_box.html" %} | ||
{% load i18n %} | ||
{% load widget_tweaks %} | ||
{% block collapsible_box_icon %} | ||
message-square | ||
{% endblock collapsible_box_icon %} | ||
{% block collapsible_box_title %} | ||
{% trans "Related contacts" %} | ||
{% endblock collapsible_box_title %} | ||
{% block collapsible_box_content %} | ||
{% with poi_form.instance.contacts.all as contacts %} | ||
<div> | ||
<div class="help-text"> | ||
{% if contacts %} | ||
{% trans "This location is currently referred to in those contacts." %} | ||
{% else %} | ||
{% trans "This location is not currently referred to in any contact." %} | ||
{% endif %} | ||
</div> | ||
{% for contact in contacts %} | ||
<a href="{% url 'edit_contact' contact_id=contact.id region_slug=request.region.slug %}" | ||
class="block pt-2 hover:underline"> | ||
<i icon-name="pen-square" class="mr-2"></i> {{ contact }} | ||
</a> | ||
{% endfor %} | ||
</div> | ||
{% endwith %} | ||
{% endblock collapsible_box_content %} |
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
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
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