Skip to content

Commit

Permalink
fix: .c-box--results btn posiiton
Browse files Browse the repository at this point in the history
  • Loading branch information
hellodeloo committed Oct 10, 2024
1 parent b643fa0 commit c05aac7
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 16 deletions.
22 changes: 10 additions & 12 deletions itou/templates/employee_record/includes/list_item.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,15 @@
{% load tally %}
<div class="c-box c-box--results has-links-inside my-3 my-md-4">
<div class="c-box--results__header">

<div class="d-flex flex-column flex-lg-row gap-2 gap-lg-3">

<div class="c-box--results__summary flex-grow-1">
<i class="ri-user-line" aria-hidden="true"></i>

<div>

<h3>{{ item.job_seeker.get_full_name }}</h3>

<div class="d-flex flex-column flex-md-row align-items-start align-items-md-end gap-1 gap-md-2">
<span>
<i class="ri-map-pin-2-line fw-normal me-1" aria-hidden="true"></i>{% profile_city_display item.job_seeker.jobseeker_profile %}
</span>

</div>
</div>
</div>
Expand Down Expand Up @@ -144,15 +138,19 @@ <h3>{{ item.job_seeker.get_full_name }}</h3>
{% if not employee_record %}
{% if item.job_seeker.jobseeker_profile.lack_of_nir_reason == "NIR_ASSOCIATED_TO_OTHER" %}
<div class="c-box--results__footer">
<a class="btn btn-primary btn-block w-100 w-md-auto has-external-link"
href="{% tally_form_url "wzxQlg" %}{{ item.nir_tally_params }}"
target="_blank"
rel="noopener"
aria-label="Régulariser le n° de sécurité sociale {{ item.job_seeker.get_full_name }} (ouverture dans un nouvel onglet)">Régulariser le n° de sécurité sociale</a>
<div class="d-flex flex-column flex-md-row justify-content-md-end gap-3">
<a class="btn btn-primary btn-block w-100 w-md-auto has-external-link"
href="{% tally_form_url "wzxQlg" %}{{ item.nir_tally_params }}"
target="_blank"
rel="noopener"
aria-label="Régulariser le n° de sécurité sociale {{ item.job_seeker.get_full_name }} (ouverture dans un nouvel onglet)">Régulariser le n° de sécurité sociale</a>
</div>
</div>
{% elif item.date_were_not_transmitted %}
<div class="c-box--results__footer">
<a class="btn btn-primary btn-block w-100 w-md-auto" href="{% url "employee_record_views:create" item.id %}" aria-label="Mettre à jour la fiche salarié de {{ item.job_seeker.get_full_name }}">Mettre à jour</a>
<div class="d-flex flex-column flex-md-row justify-content-md-end gap-3">
<a class="btn btn-primary btn-block w-100 w-md-auto" href="{% url "employee_record_views:create" item.id %}" aria-label="Mettre à jour la fiche salarié de {{ item.job_seeker.get_full_name }}">Mettre à jour</a>
</div>
</div>
{% else %}
<div class="c-box--results__footer">
Expand Down
16 changes: 12 additions & 4 deletions tests/www/employee_record_views/__snapshots__/test_list.ambr
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
# name: TestListEmployeeRecords.test_employee_record_to_disable_with_nir_associated_to_other[action]
'''
<div class="c-box--results__footer">
<a aria-label="Régulariser le n° de sécurité sociale Jane DOE (ouverture dans un nouvel onglet)" class="btn btn-primary btn-block w-100 w-md-auto has-external-link" href="https://tally.so/r/wzxQlg?employeerecord=[PK of EmployeeRecord]" rel="noopener" target="_blank">Régulariser le n° de sécurité sociale</a>
<div class="d-flex flex-column flex-md-row justify-content-md-end gap-3">
<a aria-label="Régulariser le n° de sécurité sociale Jane DOE (ouverture dans un nouvel onglet)" class="btn btn-primary btn-block w-100 w-md-auto has-external-link" href="https://tally.so/r/wzxQlg?employeerecord=[PK of EmployeeRecord]" rel="noopener" target="_blank">Régulariser le n° de sécurité sociale</a>
</div>
</div>
'''
# ---
Expand All @@ -40,7 +42,9 @@
# name: TestListEmployeeRecords.test_employee_records_with_a_prolongation_need_to_be_updated[action]
'''
<div class="c-box--results__footer">
<a aria-label="Mettre à jour la fiche salarié de Jane DOE" class="btn btn-primary btn-block w-100 w-md-auto" href="/employee_record/create/[PK of JobApplication]">Mettre à jour</a>
<div class="d-flex flex-column flex-md-row justify-content-md-end gap-3">
<a aria-label="Mettre à jour la fiche salarié de Jane DOE" class="btn btn-primary btn-block w-100 w-md-auto" href="/employee_record/create/[PK of JobApplication]">Mettre à jour</a>
</div>
</div>
'''
# ---
Expand All @@ -66,7 +70,9 @@
# name: TestListEmployeeRecords.test_employee_records_with_a_suspension_need_to_be_updated[action]
'''
<div class="c-box--results__footer">
<a aria-label="Mettre à jour la fiche salarié de Jane DOE" class="btn btn-primary btn-block w-100 w-md-auto" href="/employee_record/create/[PK of JobApplication]">Mettre à jour</a>
<div class="d-flex flex-column flex-md-row justify-content-md-end gap-3">
<a aria-label="Mettre à jour la fiche salarié de Jane DOE" class="btn btn-primary btn-block w-100 w-md-auto" href="/employee_record/create/[PK of JobApplication]">Mettre à jour</a>
</div>
</div>
'''
# ---
Expand All @@ -92,7 +98,9 @@
# name: TestListEmployeeRecords.test_employee_records_with_nir_associated_to_other[action]
'''
<div class="c-box--results__footer">
<a aria-label="Régulariser le n° de sécurité sociale Jane DOE (ouverture dans un nouvel onglet)" class="btn btn-primary btn-block w-100 w-md-auto has-external-link" href="https://tally.so/r/wzxQlg?jobapplication=[PK of JobApplication]" rel="noopener" target="_blank">Régulariser le n° de sécurité sociale</a>
<div class="d-flex flex-column flex-md-row justify-content-md-end gap-3">
<a aria-label="Régulariser le n° de sécurité sociale Jane DOE (ouverture dans un nouvel onglet)" class="btn btn-primary btn-block w-100 w-md-auto has-external-link" href="https://tally.so/r/wzxQlg?jobapplication=[PK of JobApplication]" rel="noopener" target="_blank">Régulariser le n° de sécurité sociale</a>
</div>
</div>
'''
# ---
Expand Down

0 comments on commit c05aac7

Please sign in to comment.