-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GPS : pagination et filtre par nom de bénéficiaire #4361
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
@@ -0,0 +1,134 @@ | ||
{% load str_filters %} | ||
|
||
<section aria-labelledby="results" id="follow-up-groups-section"> | ||
{% if not memberships_page %} | ||
<div class="my-3 my-md-4 s-box__row row membership-card">Aucun résultat.</div> | ||
{% else %} | ||
{% for membership in memberships_page %} | ||
<div class="my-3 my-md-4 s-box__row row membership-card"> | ||
<div class="c-box--results__header"> | ||
|
||
<div class="c-box--results__summary"> | ||
<i class="ri-user-line" aria-hidden="true"></i> | ||
<div> | ||
<h3>{{ membership.follow_up_group.beneficiary.get_full_name }}</h3> | ||
<span>{{ membership.follow_up_group.beneficiary.email }}</span> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<hr class="m-0 pb-4" /> | ||
|
||
<div class="d-flex justify-content-between mb-4"> | ||
<div> | ||
{% with membership.nb_members|add:"-1" as counter %} | ||
<div> | ||
{% if not membership.created_in_bulk %} | ||
<div> | ||
{# djlint:off #} | ||
{# Don't let djlint add a newline before the . or it will add a space after référent and . #} | ||
Vous avez ajouté ce bénéficiaire le <strong>{{ membership.created_at|date:"d/m/Y" }}</strong>{% if membership.is_referent %} et êtes <strong>référent</strong>{% endif %}.{# djlint:on #} | ||
</div> | ||
{% elif membership.is_referent %} | ||
<div> | ||
Vous êtes <strong>référent</strong>. | ||
</div> | ||
{% endif %} | ||
{% if counter < 1 %} | ||
Aucun autre professionnel que vous n'est intervenu auprès de ce bénéficiaire. | ||
{% else %} | ||
{{ counter }} autre{{ counter|pluralizefr }} professionnel{{ counter|pluralizefr }} | ||
{{ counter|pluralize:"est,sont" }} | ||
intervenu{{ counter|pluralizefr }} auprès de ce bénéficiaire. | ||
{% endif %} | ||
</div> | ||
{% endwith %} | ||
</div> | ||
|
||
|
||
</div> | ||
<div class="d-flex justify-content-between"> | ||
|
||
{% with membership.follow_up_group.beneficiary.public_id as public_id %} | ||
<div> | ||
|
||
{% url 'gps:leave_group' group_id=membership.follow_up_group.id as leave_group_url %} | ||
<a href="{% url 'users:details' public_id=public_id %}" | ||
class="btn btn-warning btn-block w-100 w-md-auto btn-ico" | ||
aria-label="Ne plus suivre {{ membership.follow_up_group.beneficiary.get_full_name }}" | ||
data-bs-toggle="modal" | ||
data-bs-target="#confirm_modal" | ||
data-bs-title="Êtes-vous sûr de ne plus vouloir suivre {{ membership.follow_up_group.beneficiary.get_full_name }} ?" | ||
data-bs-body="Vous pourrez toujours suivre ce bénéficiaire de nouveau plus tard." | ||
data-bs-confirm-text="Ne plus suivre" | ||
data-bs-confirm-url="{{ leave_group_url }}" | ||
data-bs-confirm-class="btn-danger"> | ||
<i class="ri-user-unfollow-line" aria-hidden="true"></i> | ||
<span>Ne plus suivre</span> | ||
|
||
</a> | ||
|
||
|
||
{% if membership.is_referent %} | ||
|
||
{% url 'gps:toggle_referent' group_id=membership.follow_up_group.id as remove_referent_url %} | ||
<a href="{% url 'users:details' public_id=membership.follow_up_group.beneficiary.public_id %}" | ||
class="btn btn-warning btn-block w-100 w-md-auto btn-ico" | ||
aria-label="Ne plus être référent de {{ membership.follow_up_group.beneficiary.get_full_name }}" | ||
data-bs-toggle="modal" | ||
data-bs-target="#confirm_modal" | ||
data-bs-title="Êtes-vous sûr de ne plus vouloir être référent de {{ membership.follow_up_group.beneficiary.get_full_name }} ?" | ||
data-bs-body="Vous pourrez toujours devenir référent de ce bénéficiaire plus tard." | ||
data-bs-confirm-text="Ne plus être référent" | ||
data-bs-confirm-url="{{ remove_referent_url }}" | ||
data-bs-confirm-class="btn-danger"> | ||
|
||
<i class="ri-map-pin-user-line font-weight-normal me-1" aria-hidden="true"></i> | ||
<span>Ne plus être référent</span> | ||
|
||
</a> | ||
|
||
{% endif %} | ||
</div> | ||
|
||
|
||
<div> | ||
{% if not membership.is_referent %} | ||
{% url 'gps:toggle_referent' group_id=membership.follow_up_group.id as add_referent_url %} | ||
|
||
<a href="{% url 'users:details' public_id=membership.follow_up_group.beneficiary.public_id %}" | ||
class="btn btn-outline-success btn-block w-100 w-md-auto btn-ico" | ||
aria-label="Devenir référent de {{ membership.follow_up_group.beneficiary.get_full_name }}" | ||
data-bs-toggle="modal" | ||
data-bs-target="#confirm_modal" | ||
data-bs-title="Êtes-vous sûr de vouloir devenir référent de {{ membership.follow_up_group.beneficiary.get_full_name }} ?" | ||
data-bs-body="Vous pourrez toujours ne plus être référent de ce bénéficiaire plus tard." | ||
data-bs-confirm-text="Devenir référent" | ||
data-bs-confirm-url="{{ add_referent_url }}" | ||
data-bs-confirm-class="btn-success"> | ||
|
||
<i class="ri-map-pin-user-line font-weight-normal me-1" aria-hidden="true"></i> | ||
<span>Devenir référent</span> | ||
|
||
</a> | ||
|
||
{% endif %} | ||
<a href="{% url 'users:details' public_id=membership.follow_up_group.beneficiary.public_id %}" | ||
class="btn btn-outline-primary btn-block btn-ico w-100 w-md-auto" | ||
aria-label="Consulter la fiche de {{ membership.follow_up_group.beneficiary.get_full_name }}"> | ||
<i class="ri-eye-line ri-xl font-weight-medium" aria-hidden="true"></i> | ||
<span>Consulter la fiche</span> | ||
</a> | ||
</div> | ||
{% endwith %} | ||
|
||
</div> | ||
</div> | ||
{% endfor %} | ||
|
||
<div class="mt-5"> | ||
{% include "includes/pagination.html" with page=memberships_page boost=True boost_target="#follow-up-groups-section" boost_indicator="#follow-up-groups-section" %} | ||
</div> | ||
|
||
{% endif %} | ||
</section> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Je vois beaucoup de
public_id=membership.follow_up_group.beneficiary.public_id
au sein de ce blocwith