-
Notifications
You must be signed in to change notification settings - Fork 36
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]> Co-authored-by: jarlhengstmengel <[email protected]>
- Loading branch information
1 parent
8490250
commit b79018c
Showing
6 changed files
with
172 additions
and
5 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
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 by the following 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.label_in_reference_list }} | ||
</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