yeswiki icon indicating copy to clipboard operation
yeswiki copied to clipboard

Harmoniser la syntaxe de query et du champ conditionnel bazar

Open J9rem opened this issue 3 years ago • 0 comments

Type of issue (keep only one) / Type de demande (ne garder qu'une ligne) New feature / Nouvelle fonctionnalité

Description Harmoniser la syntaxe de query et du champ conditionnel bazar

Additionnal informations / Informations complémentaires

  • version of YesWiki / version de YesWiki doryphore

Suite à https://github.com/YesWiki/yeswiki/pull/867, une syntaxe inspirée du twig a été mise en place pour les champs bazar conditionnels : https://github.com/YesWiki/yeswiki/blob/86436bef4924a4e33022643718e4cfe3b9fea5df/tools/bazar/presentation/javascripts/conditionschecking/conditionschecking.js#L5-L6 L'idée serait de la mettre en place pour les requêtes query via l'url $_GET et via les paramètres de l'action bazarliste. Elle ne serait pas activée par défaut pour les wikis existant mais un paramètre de config serait nécessaire pour changer la syntaxe ET elle serait activer par défaut pour les nouveaux wikis (spécifications à discuster, ici c'est une proposition)

Objectif ConditionChecking query dans l'url actuellement
Identifier un champ liste,checkbox,radio bf_thematique ou listeListeThematiquebf_thematique listeListeThematiquebf_thematique
Identifier un champ autre type de champ non fonctionnel bf_nom
le champ vaut exactement la valeur demandée (radio, liste) bf_thematique==valueId ou bf_thematique == valueId listeListeThematiquebf_thematique=valueId
le champ est différent de la valeur demandée (radio, liste) bf_thematique!=valueId ou bf_thematique != valueId listeListeThematiquebf_thematique!=valueId
le champ vaut exactement la valeur demandée (checkbox) bf_thematique==valueId ou bf_thematique == valueId listeListeThematiquebf_thematique=valueId|listeListeThematiquebf_thematique!=otherId1,otherId2,otherId3
le champ contient exactement les valeurs demandées (checkbox) bf_thematique==[valueId1,valueId2,valueId3] ou bf_thematique == [valueId1,valueId2,valueId3] listeListeThematiquebf_thematique=valueId1,valueId2,valueId3|listeListeThematiquebf_thematique!=otherId1,otherId2,otherId3
le champ contient au moins un des les valeurs demandées (checkbox) bf_thematique in [valueId1,valueId2,valueId3] ou bf_thematique in[valueId1,valueId2,valueId3] listeListeThematiquebf_thematique=valueId1,valueId2,valueId3
le champ est vide bf_thematique is empty listeListeThematiquebf_thematique=
le champ n'est pas vide bf_thematique is not empty listeListeThematiquebf_thematique!=
associer des conditions ( ... ) non disponible
négation d'une condition !( ... ) non disponible
tester le nombre de réponse cochées (checkbox) bf_thematique|length > 6 ou >=,<,<= non disponible
ET conditionnel and |
OU conditionnel or non disponible

J9rem avatar Feb 25 '22 11:02 J9rem