diff --git a/static/toulouse-2022/_json_cells.scss b/static/toulouse-2022/_json_cells.scss index 91811755..ec2cb050 100644 --- a/static/toulouse-2022/_json_cells.scss +++ b/static/toulouse-2022/_json_cells.scss @@ -1,25 +1,5 @@ -.theme-basket { - &--item { - display: flex; - flex-direction: row; - margin-bottom: 10px; - border-bottom: $cell-entry-border; - - @media(max-width: $very-small-limit) { - flex-wrap: wrap; - } - } - - &--item-details { - width: 100%; - flex-grow: 1; - margin-bottom: 10px; - } - - &--item-activity { - font-weight: bold; - } - +.theme-basket, +.theme-activities { &--item-name, &--item-unit, &--item-location, @@ -43,6 +23,29 @@ &--item-name::before { content: "\f007"; } &--item-location::before { content: "\f041"; } &--item-date::before { content: "\f133"; } +} + +.theme-basket { + &--item { + display: flex; + flex-direction: row; + margin-bottom: 10px; + border-bottom: $cell-entry-border; + + @media(max-width: $very-small-limit) { + flex-wrap: wrap; + } + } + + &--item-details { + width: 100%; + flex-grow: 1; + margin-bottom: 10px; + } + + &--item-activity { + font-weight: bold; + } &--item-summary { display: flex; @@ -84,3 +87,101 @@ @extend .cancel-button; } } + +.theme-activities { + &--search { + display: grid; + grid-auto-rows: auto; + align-items: center; + grid-template-columns: auto auto; + margin-bottom: 2rem; + + @media($max-mobile-viewport) { + grid-template-columns: auto; + } + } + + &--criteria-label { + margin: 1rem 1rem 0.5rem 0; + + @media($max-mobile-viewport) { + margin-bottom: 0.2rem; + margin-top: 1rem; + } + } + + &--items { + display: grid; + grid-auto-rows: auto; + } + + &--item { + display: flex; + flex-wrap: wrap; + justify-content: right; + + margin-bottom: 1rem; + padding-top: 1rem; + border-top: 1px solid $cell-entry-border-color; + + @media($max-mobile-viewport) { + align-items: end; + } + + &:not(.filtered) { + display: none; + } + } + + &--item-label { + position: relative; + width: 100%; + font-weight: bold; + cursor: pointer; + display: flex; + align-items: center; + padding-right: calc(#{$title-font-size} + 0.5rem); + margin-bottom: 0.5rem; + + &::after { + position: absolute; + top: -1rem; + right: 0; + font-size: $title-font-size; + margin: 0 0.5rem; + font-family: FontAwesome; + color: $title-color; + content: $cell-close-foldable-icon; + } + } + + &--item.collapsed &--item-label::after { + content: $cell-open-foldable-icon; + } + + &--item-type { + margin-left: 10px; + } + + &--item-summary { + flex-grow: 1; + display: flex; + flex-direction: column; + + @media($min-desktop-viewport) { + flex-direction: row; + } + } + + &--item.collapsed &--item-details { + display: none; + } + + &--pagination { + @extend .cell-items-pagination; + } + + &--criteria-option[aria-disabled=true] { + display: none; + } +} diff --git a/static/toulouse-2022/config.json b/static/toulouse-2022/config.json index d25a28f4..15f32495 100644 --- a/static/toulouse-2022/config.json +++ b/static/toulouse-2022/config.json @@ -183,6 +183,17 @@ "url": "{{passerelle_url}}toulouse-maelis/{{ slug }}/validate-basket?{% if foyer_id %}family_id={{ foyer_id }}{% else %}NameID={{ user_nameid }}{% endif %}" } } + }, + "toulouse-maelis-catalog": { + "cache_duration": 0, + "force_async": true, + "name": "Toulouse - Maelis : Catalogue des activités", + "url": "{{ passerelle_url }}toulouse-maelis/{{ slug }}/read-activity-list?ref_date={% now 'Y-m-d' %}", + "form": [ + {"label": "Slug du connecteur", "varname": "slug", "required": true}, + {"label": "URL de la démarche d'inscription", "varname": "form_url", "required": true} + ], + "varnames": ["q"] } } } diff --git a/static/toulouse/config.json b/static/toulouse/config.json index 6999e631..83b60765 100644 --- a/static/toulouse/config.json +++ b/static/toulouse/config.json @@ -62,7 +62,7 @@ "cache_duration": 0, "force_async": true, "name": "DUI (Teamnet Axel) : Activités auxquelles l'enfant est inscrit·e", - "url": "{{passerelle_url}}toulouse-axel/{{slug}}/clae_children_activities_info?NameID={{user_nameid}}&booking_date={% now \"Y-m-d\" %}", + "url": "{{ passerelle_url }}toulouse-maelis/{{ slug }}/read-activity-list?ref_date={% now 'Y-m-d' %}"", "form": [ {"label": "Identifiant du connecteur", "varname": "slug", "required": true} ] diff --git a/templates/variants/toulouse-2022/combo/json/toulouse-maelis-catalog.html b/templates/variants/toulouse-2022/combo/json/toulouse-maelis-catalog.html new file mode 100644 index 00000000..3724b9d7 --- /dev/null +++ b/templates/variants/toulouse-2022/combo/json/toulouse-maelis-catalog.html @@ -0,0 +1,167 @@ +

Catalogue des activité {{ json.meta.reference_year }}-{{ json.meta.reference_year|add:1 }}

+
+ +
+ {% for item in json.data %} + + {% endfor %} +
+
+ +
+
+ + + + +