Skip to content

Commit

Permalink
Fix ads_manager for new dsfr
Browse files Browse the repository at this point in the history
  • Loading branch information
brmzkw committed Jul 18, 2024
1 parent 57394c6 commit 81f246f
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 42 deletions.
82 changes: 42 additions & 40 deletions mesads/templates/webpack/pages/ads_register/ads_manager.html
Original file line number Diff line number Diff line change
Expand Up @@ -104,48 +104,50 @@ <h6>Filtrer les ADS</h6>
</div>
</div>

<div class="fr-table fr-table--lg fr-table--no-scroll" id="table-stats-pref">
<div class="fr-table__wrapper">
<div class="fr-table__container">
<div class="fr-table__content">
<table id="table-stats-pref">
<thead>
<tr>
{% if ads_manager.content_type.name == 'EPCI' %}
<th>🌆 Commune</th>
{% endif %}
<th>♯ Numéro</th>
<th>📜 Date de création</th>
<th>🗓 Date d'attribution<br />au titulaire actuel</th>
<th>🚑 Conventionné<br />CPAM ?</th>
<th>🤴 Titulaire</th>
<th>🔎 Action</th>
</thead>
<tbody>
{% for ads in ads_list %}
<tr>
{% if ads_manager.content_type.name == 'EPCI' %}
<td>{{ ads.epci_commune.libelle|default:"" }}</td>
{% endif %}
<td><a href="{% url 'app.ads.detail' manager_id=ads_manager.id ads_id=ads.id %}">{{ ads.number }}</a></td>
<td>{{ ads.ads_creation_date|default:"" }}</td>
<td>{{ ads.attribution_date|default:"" }}</td>
<td>{% if ads.accepted_cpam is None %}⁉️ Inconnu{% elif ads.accepted_cpam is True %}👍 Oui{% else %}❌ Non{% endif %}</td>
<td>{{ ads.owner_name }}</td>
<td>
<a class="fr-btn fr-btn--sm" href="{% url 'app.ads.detail' manager_id=ads_manager.id ads_id=ads.id %}">Détails</a>
</td>
</tr>
{% empty %}
<tr>
<td colspan="{% if ads_manager.content_type.name == 'EPCI' %}7{% else %}6{% endif %}">Aucun résultat</td>
</tr>
{% endfor %}
</tbody>
</table>
{% show_pagination_links page_obj %}
<div class="fr-grid-row">
<div class="fr-table fr-table--md" id="table-ads-pref">
<div class="fr-table__wrapper">
<div class="fr-table__container">
<div class="fr-table__content">
<table id="table-ads-pref">
<thead>
<tr>
{% if ads_manager.content_type.name == 'EPCI' %}
<th>🌆 Commune</th>
{% endif %}
<th>♯ Numéro</th>
<th>📜 Date de création</th>
<th>🗓 Date d'attribution<br />au titulaire actuel</th>
<th>🚑 Conventionné<br />CPAM ?</th>
<th>🤴 Titulaire</th>
<th>🔎 Action</th>
</thead>
<tbody>
{% for ads in ads_list %}
<tr>
{% if ads_manager.content_type.name == 'EPCI' %}
<td>{{ ads.epci_commune.libelle|default:"" }}</td>
{% endif %}
<td><a href="{% url 'app.ads.detail' manager_id=ads_manager.id ads_id=ads.id %}">{{ ads.number }}</a></td>
<td>{{ ads.ads_creation_date|default:"" }}</td>
<td>{{ ads.attribution_date|default:"" }}</td>
<td>{% if ads.accepted_cpam is None %}⁉️ Inconnu{% elif ads.accepted_cpam is True %}👍 Oui{% else %}❌ Non{% endif %}</td>
<td>{{ ads.owner_name }}</td>
<td>
<a class="fr-btn fr-btn--sm" href="{% url 'app.ads.detail' manager_id=ads_manager.id ads_id=ads.id %}">Détails</a>
</td>
</tr>
{% empty %}
<tr>
<td colspan="{% if ads_manager.content_type.name == 'EPCI' %}7{% else %}6{% endif %}">Aucun résultat</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
</div>
{% show_pagination_links page_obj %}
</div>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,10 @@ <h1>Mon espace propriétaire</h1>
{% endfor %}
</tbody>
</table>

{% show_pagination_links page_obj %}
</div>
</div>
</div>
{% show_pagination_links page_obj %}
</div>
{% endif %}
{% endblock %}

0 comments on commit 81f246f

Please sign in to comment.