@@ -60,77 +60,89 @@ <h2 class="h2">{% trans "U bent toegevoegd als contactpersoon" %}</h2>
60
60
</ div >
61
61
{% endif %}
62
62
63
- {% form id="contact-filter" form_object=form method="GET" columns=2 no_actions=True horizontal=True spaceless=True autosubmit=True form_action=form_action %}
63
+ < div class ="contacts ">
64
+ {% render_form id="contact-filter" form=form method="GET" no_actions=True horizontal=True spaceless=True autosubmit=True form_action=form_action class="form form--columns-2 form--spaceless form--autosubmit form--horizontal" %}
65
+ < div class ="form__control contacts__filter ">
66
+ < div class ="contacts__filter-button ">
67
+ {% button text=_("Filter") type="button" bordered=True %}
68
+ </ div >
69
+ < div class ="contacts__filter-container ">
70
+ < p class ="p "> {% trans "Filter op:" %}</ p >
71
+ {% input form.type no_label=True no_help=True icon="expand_more" class="label input" id="id_type" %}
72
+ </ div >
73
+ </ div >
74
+ {% endrender_form %}
64
75
65
- < table class ="table ">
66
- < thead class ="table__heading ">
67
- < tr >
68
- < td class ="table__item "> {% trans "Naam" %}</ td >
69
- < td class ="table__item "> {% trans "Soort contact" %}</ td >
70
- < td class ="table__item "> {% trans "E-mailadres" %}</ td >
71
- < td class ="table__item "> {% trans "Telefoonnummer" %}</ td >
72
- < td class ="table__item " colspan ="2 "> {% trans "Actief" %} </ td >
73
- < td class ="table__item "> </ td >
74
- </ tr >
75
- </ thead >
76
- < tbody >
77
- {% if not pending_invitations and not contacts_for_approval and not pending_approval and not pending_approval_list and not object_list %}
76
+ < table class ="table ">
77
+ < thead class ="table__heading ">
78
78
< tr >
79
- < td class ="table__item " colspan ="7 " > {% trans "Er zijn geen contacten gevonden met deze filter, of u heeft nog geen contacten." %}</ td >
79
+ < td class ="table__item "> {% trans "Naam" %}</ td >
80
+ < td class ="table__item "> {% trans "Soort contact" %}</ td >
81
+ < td class ="table__item "> {% trans "E-mailadres" %}</ td >
82
+ < td class ="table__item "> {% trans "Telefoonnummer" %}</ td >
83
+ < td class ="table__item " colspan ="2 "> {% trans "Actief" %} </ td >
84
+ < td class ="table__item "> </ td >
80
85
</ tr >
81
- {% else %}
82
-
83
- <!--New contacts-users with pending invitations for registration-->
84
- {% for invite in pending_invitations %}
86
+ </ thead >
87
+ < tbody >
88
+ {% if not pending_invitations and not contacts_for_approval and not pending_approval and not pending_approval_list and not object_list %}
85
89
< tr >
86
- < th class ="table__header "> {{invite.invitee_first_name}} {{invite.invitee_last_name}}</ th >
87
- < td class ="table__item "> </ td >
88
- < td class ="table__item "> {{invite.invitee_email}}</ td >
89
- < td class ="table__item "> </ td >
90
- < td class ="table__item "> {% icon "close" extra_classes="icon icon--danger" %}</ td >
91
- < td class ="table__item "> {% button text=_('Stuur bericht') icon="message" icon_position="before" icon_outlined=True transparent=True disabled=True %}</ td >
92
- < td class ="table__item "> {% button icon="settings" icon_position="before" text="" hide_text=True transparent=True disabled=True %}< td >
90
+ < td class ="table__item " colspan ="7 " > {% trans "Er zijn geen contacten gevonden met deze filter, of u heeft nog geen contacten." %}</ td >
93
91
</ tr >
94
- {% endfor %}
92
+ {% else %}
95
93
96
- <!--Existing contacts-users which require approval - sender's view -->
97
- {% for contact in contacts_for_approval %}
98
- < tr >
99
- < th class ="table__header "> </ th >
100
- < td class ="table__item "> </ td >
101
- < td class ="table__item "> {{contact.email }}</ td >
102
- < td class ="table__item "> </ td >
103
- < td class ="table__item "> {% icon "close" extra_classes="icon icon--danger" %}</ td >
104
- < td class ="table__item "> {% button text=_('Stuur bericht') icon="message" icon_position="before" icon_outlined=True transparent=True disabled=True %}</ td >
105
- < td class ="table__item "> {% button icon="settings" icon_position="before" text="" hide_text=True transparent=True disabled=True %}< td >
106
- </ tr >
107
- {% endfor %}
94
+ <!--New contacts-users with pending invitations for registration -->
95
+ {% for invite in pending_invitations %}
96
+ < tr >
97
+ < th class ="table__header "> {{invite.invitee_first_name}} {{invite.invitee_last_name}} </ th >
98
+ < td class ="table__item "> </ td >
99
+ < td class ="table__item "> {{invite.invitee_email }}</ td >
100
+ < td class ="table__item "> </ td >
101
+ < td class ="table__item "> {% icon "close" extra_classes="icon icon--danger" %}</ td >
102
+ < td class ="table__item "> {% button text=_('Stuur bericht') icon="message" icon_position="before" icon_outlined=True transparent=True disabled=True %}</ td >
103
+ < td class ="table__item "> {% button icon="settings" icon_position="before" text="" hide_text=True transparent=True disabled=True %}< td >
104
+ </ tr >
105
+ {% endfor %}
108
106
109
- <!--Active contacts list-->
110
- {% for contact in object_list %}
111
- < tr >
112
- < th class ="table__header "> {{ contact.get_full_name }}</ th >
113
- < td class ="table__item "> {% if contact.contact_type == "contact" %}Contactpersoon{% elif contact.contact_type == "begeleider" %}Begeleider{% elif contact.contact_type == "organization" %}Organisatie{% endif %}</ td >
114
- < td class ="table__item "> {{ contact.get_contact_email|default:"" }}</ td >
115
- < td class ="table__item "> {{ contact.phonenumber }}</ td >
116
- < td class ="table__item "> {% if contact.is_not_active %}{% icon "close" extra_classes="icon icon--danger" %}{% else %}{% icon "check" %}{% endif %}</ td >
117
- < td class ="table__item "> {% button text=_('Stuur bericht') icon="message" icon_position="before" href=contact.get_contact_message_url icon_outlined=True transparent=True disabled=contact.is_not_active %}</ td >
118
- < td class ="table__item ">
119
- {% dropdown icon="settings" disabled=contact.is_not_active %}
120
- < div class ="dropdown__item ">
121
- {% url 'accounts:contact_delete' uuid=contact.uuid as delete_url %}
122
- {% render_form form=None form_action=delete_url method="POST" spaceless=True id="delete-contact-form" extra_classes="confirm" data_confirm_title=_("Are you sure you want to delete this contact?") data_confirm_cancel=_("Nee") data_confirm_default=_("Ja") %}
123
- {% csrf_token %}
124
- {% button icon="delete" text=_("Verwijderen") transparent=True %}
125
- {% endrender_form %}
126
- </ div >
127
- {% enddropdown %}
128
- </ td >
129
- </ tr >
130
- {% endfor %}
131
- {% endif %}
132
- </ tbody >
133
- </ table >
107
+ <!--Existing contacts-users which require approval - sender's view-->
108
+ {% for contact in contacts_for_approval %}
109
+ < tr >
110
+ < th class ="table__header "> </ th >
111
+ < td class ="table__item "> </ td >
112
+ < td class ="table__item "> {{contact.email}}</ td >
113
+ < td class ="table__item "> </ td >
114
+ < td class ="table__item "> {% icon "close" extra_classes="icon icon--danger" %}</ td >
115
+ < td class ="table__item "> {% button text=_('Stuur bericht') icon="message" icon_position="before" icon_outlined=True transparent=True disabled=True %}</ td >
116
+ < td class ="table__item "> {% button icon="settings" icon_position="before" text="" hide_text=True transparent=True disabled=True %}< td >
117
+ </ tr >
118
+ {% endfor %}
119
+
120
+ <!--Active contacts list-->
121
+ {% for contact in object_list %}
122
+ < tr >
123
+ < th class ="table__header "> {{ contact.get_full_name }}</ th >
124
+ < td class ="table__item "> {% if contact.contact_type == "contact" %}Contactpersoon{% elif contact.contact_type == "begeleider" %}Begeleider{% elif contact.contact_type == "organization" %}Organisatie{% endif %}</ td >
125
+ < td class ="table__item "> {{ contact.get_contact_email|default:"" }}</ td >
126
+ < td class ="table__item "> {{ contact.phonenumber }}</ td >
127
+ < td class ="table__item "> {% if contact.is_not_active %}{% icon "close" extra_classes="icon icon--danger" %}{% else %}{% icon "check" %}{% endif %}</ td >
128
+ < td class ="table__item "> {% button text=_('Stuur bericht') icon="message" icon_position="before" href=contact.get_contact_message_url icon_outlined=True transparent=True disabled=contact.is_not_active %}</ td >
129
+ < td class ="table__item ">
130
+ {% dropdown icon="settings" disabled=contact.is_not_active %}
131
+ < div class ="dropdown__item ">
132
+ {% url 'accounts:contact_delete' uuid=contact.uuid as delete_url %}
133
+ {% render_form form=None form_action=delete_url method="POST" spaceless=True id="delete-contact-form" extra_classes="confirm" data_confirm_title=_("Are you sure you want to delete this contact?") data_confirm_cancel=_("Nee") data_confirm_default=_("Ja") %}
134
+ {% csrf_token %}
135
+ {% button icon="delete" text=_("Verwijderen") transparent=True %}
136
+ {% endrender_form %}
137
+ </ div >
138
+ {% enddropdown %}
139
+ </ td >
140
+ </ tr >
141
+ {% endfor %}
142
+ {% endif %}
143
+ </ tbody >
144
+ </ table >
145
+ </ div >
134
146
135
147
{% pagination page_obj=page_obj paginator=paginator request=request href="accounts:my_profile" text=_("Terug naar mijn profiel") %}
136
148
{% endblock content %}
0 commit comments