-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
job_seekers_views: add list for prescribers
- Loading branch information
1 parent
bf1f2fe
commit 5247815
Showing
12 changed files
with
1,021 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{% load str_filters %} | ||
|
||
<p class="mb-0" id="job-seekers-list-count"{% if request.htmx %} hx-swap-oob="true"{% endif %}> | ||
{% with paginator.count as counter %}{{ counter }} résultat{{ counter|pluralizefr }}{% endwith %} | ||
</p> |
47 changes: 47 additions & 0 deletions
47
itou/templates/job_seekers_views/includes/list_results.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,47 @@ | ||
{% load static %} | ||
{% load str_filters %} | ||
|
||
<section aria-labelledby="job-seekers-list-count" id="job-seekers-section"> | ||
{% if not page_obj %} | ||
<div class="text-center my-3 my-md-4"> | ||
<img class="img-fluid" src="{% static 'img/illustration-siae-card-no-result.svg' %}" alt="" loading="lazy"> | ||
<p class="mb-1 mt-3"> | ||
<strong>Aucun candidat pour le moment</strong> | ||
</p> | ||
</div> | ||
{% else %} | ||
<div class="mt-3 mt-md-4"> | ||
<table class="table"> | ||
<caption class="visually-hidden">Liste des candidats</caption> | ||
<thead> | ||
<tr> | ||
<th scope="col">Prénom NOM</th> | ||
<th scope="col">Statut du PASS IAE</th> | ||
<th scope="col">Nombre de candidatures</th> | ||
<th scope="col">Dernière mise à jour de candidature</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{% for job_seeker in page_obj %} | ||
<tr> | ||
<td> | ||
<a href="{% url "job_seekers_views:details" public_id=job_seeker.public_id %}?back_url={{ request.get_full_path|urlencode }}" class="btn-link">{{ job_seeker.get_full_name|mask_unless:job_seeker.user_can_view_personal_information }}</a> | ||
</td> | ||
<td> | ||
{% include "apply/includes/eligibility_badge.html" with job_seeker=job_seeker is_subject_to_eligibility_rules=True eligibility_diagnosis=job_seeker.valid_eligibility_diagnosis only %} | ||
</td> | ||
<td>{{ job_seeker.job_applications_nb }}</td> | ||
<td>{{ job_seeker.last_updated_at|date:"d/m/Y" }}</td> | ||
</tr> | ||
{% endfor %} | ||
</tbody> | ||
</table> | ||
</div> | ||
|
||
{% include "includes/pagination.html" with page=page_obj boost=True boost_target="#job-seekers-section" boost_indicator="#job-seekers-section" %} | ||
{% endif %} | ||
</section> | ||
|
||
{% if request.htmx %} | ||
{% include "job_seekers_views/includes/list_counter.html" with paginator=paginator request=request only %} | ||
{% endif %} |
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,49 @@ | ||
{% extends "layout/base.html" %} | ||
{% load django_bootstrap5 %} | ||
{% load matomo %} | ||
{% load static %} | ||
{% load str_filters %} | ||
{% load format_filters %} | ||
|
||
{% block title %}Candidats {{ block.super }}{% endblock %} | ||
|
||
{% block title_content %} | ||
<div class="d-flex flex-column flex-md-row gap-3 justify-content-md-between"> | ||
<h1 class="m-0">Candidats</h1> | ||
<div class="d-flex flex-column flex-md-row gap-3" role="group" aria-label="Actions sur les candidatures"> | ||
<a href="{% url 'search:employers_results' %}" class="btn btn-lg btn-primary btn-ico"> | ||
<i class="ri-draft-line font-weight-medium" aria-hidden="true"></i> | ||
<span>Postuler pour un candidat</span> | ||
</a> | ||
</div> | ||
</div> | ||
{% endblock %} | ||
|
||
{% block title_prevstep %} | ||
{% include "layout/previous_step.html" with back_url=back_url only %} | ||
{% endblock %} | ||
|
||
{% block content %} | ||
<section class="s-section"> | ||
<div class="s-section__container container"> | ||
<div class="s-section__row row"> | ||
<div class="col-12"> | ||
<div class="d-flex flex-column flex-md-row align-items-md-center justify-content-md-between mb-3 mb-md-4"> | ||
{% include "job_seekers_views/includes/list_counter.html" with paginator=paginator request=request only %} | ||
<div class="flex-column flex-md-row mt-3 mt-md-0"> | ||
<form hx-get="{% url 'job_seekers_views:list' %}" hx-trigger="change delay:.5s" hx-indicator="#job-seekers-section" hx-target="#job-seekers-section" hx-swap="outerHTML" hx-push-url="true"> | ||
{% bootstrap_field filters_form.job_seeker wrapper_class="w-lg-400px" show_label=False %} | ||
</form> | ||
</div> | ||
</div> | ||
{% include "job_seekers_views/includes/list_results.html" with page_obj=page_obj request=request only %} | ||
</div> | ||
</div> | ||
</div> | ||
</section> | ||
{% endblock %} | ||
|
||
{% block script %} | ||
{{ block.super }} | ||
<script src='{% static "js/htmx_compat.js" %}'></script> | ||
{% endblock %} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
from django import forms | ||
from django_select2.forms import Select2Widget | ||
|
||
|
||
class FilterForm(forms.Form): | ||
job_seeker = forms.ChoiceField( | ||
required=False, | ||
label="Nom", | ||
widget=Select2Widget( | ||
attrs={ | ||
"data-placeholder": "Nom du salarié", | ||
} | ||
), | ||
) | ||
|
||
def __init__(self, job_seeker_qs, data, *args, **kwargs): | ||
super().__init__(data, *args, **kwargs) | ||
self.fields["job_seeker"].choices = [ | ||
(job_seeker.pk, job_seeker.get_full_name()) | ||
for job_seeker in job_seeker_qs.order_by("first_name", "last_name") | ||
if job_seeker.get_full_name() | ||
] |
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
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
Oops, something went wrong.