Bug #23212
widget select--meetings.html : afficher un message quand aucun créneau n'est disponible
Début:
16 avril 2018
Echéance:
% réalisé:
0%
Temps estimé:
Patch proposed:
Non
Planning:
Non
Description
Dans widget de select--meetings.html, afficher un message « Aucun créneau horaire n'est disponible » au centre du widget, le cas échéant.
Fichiers
Demandes liées
Révisions associées
Historique
Mis à jour par Thomas Noël il y a presque 6 ans
De Frédéric sur #23201
Basiquement ça pourrait être genre :
--- a/wcs/qommon/form.py +++ b/wcs/qommon/form.py @@ -1528,6 +1528,12 @@ class SingleSelectHintWidget(SingleSelectWidget): yield {'description': description, 'attrs': html_attrs, 'options': option[-1] if self.options_with_attributes else None} + def has_valid_options(self): + for option in self.get_options(): + if not option['attrs'].get('disabled'): + return True + return False + def get_hint(self): if self.separate_hint(): return SingleSelectWidget.get_hint(self)
Puis :
--- a/templates/qommon/forms/widgets/select--meetings.html +++ b/templates/qommon/forms/widgets/select--meetings.html @@ -14,8 +14,14 @@ {% endwith %} {% endfor %} </select> +{% if widget.has_valid_options %} <div id="form_{{widget.name}}_table" class="meetings_table"> </div> +{% else %} +<div class="infonotice"> + Plus rien de disponible. +</div> +{% endif %} <script> $(function() { var options = $('#form_{{widget.name}} option');
Mis à jour par Frédéric Péters il y a presque 6 ans
- Lié à Development #23838: select widget : faciliter l'affichage d'une alternative en absence d'options possibles ajouté
Mis à jour par Frédéric Péters il y a presque 6 ans
- Fichier 0001-templates-show-a-message-if-there-are-no-meeting-slo.patch 0001-templates-show-a-message-if-there-are-no-meeting-slo.patch ajouté
- Statut changé de Nouveau à En cours
- Patch proposed changé de Non à Oui
Mis à jour par Frédéric Péters il y a plus d'un an
- Projet changé de Intégrations graphiques Publik à w.c.s.
- Assigné à mis à Frédéric Péters
- Patch proposed changé de Oui à Non
- Planning mis à Non
Désormais dans w.c.s.
Mis à jour par Robot Gitea il y a plus d'un an
- Statut changé de En cours à Solution proposée
Frédéric Péters (fpeters) a ouvert une pull request sur Gitea concernant cette demande :
- URL : https://gitea.entrouvert.org/entrouvert/wcs/pulls/41
- Titre : widgets: add a message where there's no available timetable (#23212)
- Modifications : https://gitea.entrouvert.org/entrouvert/wcs/pulls/41/files
Mis à jour par Robot Gitea il y a plus d'un an
Frédéric Péters (fpeters) a ouvert une pull request sur Gitea concernant cette demande :
- URL : https://gitea.entrouvert.org/entrouvert/publik-base-theme/pulls/125
- Titre : scss: add style for "no time slot" (#23212)
- Modifications : https://gitea.entrouvert.org/entrouvert/publik-base-theme/pulls/125/files
Mis à jour par Robot Gitea il y a plus d'un an
- Statut changé de Solution proposée à Solution validée
Lauréline Guérin (lguerin) a approuvé une pull request sur Gitea concernant cette demande :
- URL : https://gitea.entrouvert.org/entrouvert/wcs/pulls/41
- Commentaire :
N/A
Mis à jour par Robot Gitea il y a environ un an
- Statut changé de Solution validée à Résolu (à déployer)
Frédéric Péters (fpeters) a mergé une pull request sur Gitea concernant cette demande :
- URL : https://gitea.entrouvert.org/entrouvert/wcs/pulls/41
- Titre : widgets: add a message where there's no available timetable (#23212)
- Modifications : https://gitea.entrouvert.org/entrouvert/wcs/pulls/41/files
Mis à jour par Transition automatique il y a environ un an
- Statut changé de Résolu (à déployer) à Solution déployée
Mis à jour par Brice Mallet il y a environ un an
- Lié à Development #18928: Affichage spécifique d'un agenda lorsqu'aucun créneau disponible ajouté
widgets: add a message where there's no available timetable (#23212)