From ead51e77632d79302e4fb33f0a64eb1cacb0b9c7 Mon Sep 17 00:00:00 2001 From: cecepasinechka Date: Mon, 7 Oct 2024 08:44:23 +0200 Subject: [PATCH] changed notifyEmail into array --- _courses/TEST.md | 4 +++- _layouts/course-data-filtered.html | 2 +- _layouts/course-data.html | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/_courses/TEST.md b/_courses/TEST.md index dcd2d6e..ccfd608 100644 --- a/_courses/TEST.md +++ b/_courses/TEST.md @@ -8,7 +8,9 @@ permalink: "TEST" author: - "Janez Novak" contact: "janez.novak@um.si" -notifyEmail: "cvetankapasinecka@gmail.com" +notifyEmail: +- "test@gmail.com" +- "test@student.um.si" title: "Krajše izobraževanje" image: "https://unsplash.com/photos/fbi-woman-works-on-a-case-NxOQWmoYr9k" type: "Potrjeno krajše izobraževanje za podelitev mikrodokazila UM" diff --git a/_layouts/course-data-filtered.html b/_layouts/course-data-filtered.html index 9873639..910b981 100644 --- a/_layouts/course-data-filtered.html +++ b/_layouts/course-data-filtered.html @@ -16,7 +16,7 @@ "difficulty": "{{ course.difficulty | replace: "š", "s" | replace: "č", "c" | replace: "ž", "z" | replace: "Š", "S" | replace: "Č", "C" | replace: "Ž", "Z" }}", "type": "{{ course.type | replace: "š", "s" | replace: "č", "c" | replace: "ž", "z" | replace: "Š", "S" | replace: "Č", "C" | replace: "Ž", "Z" }}", "cType": "{{ course.cType }}", - {% if course.notifyEmail and course.notifyEmail != "" %}"notifyEmail": "{{ course.notifyEmail }}"{% else %}"notifyEmail": ""{% endif %}, + "notifyEmail": [{% if course.notifyEmail and course.notifyEmail != "" %}{% for email in course.notifyEmail %}"{{ email }}"{% unless forloop.last %}, {% endunless %}{% endfor %}{% else %}""{% endif %}], {% if course.executionStartDate and course.executionStartDate != "" %}"executionStartDate": "{{ course.executionStartDate }}"{% else %}"executionStartDate": ""{% endif %}, {% if course.executionData and course.executionData != "" %}"executionData": "{{ course.executionData | replace: "š", "s" | replace: "č", "c" | replace: "ž", "z" | replace: "Š", "S" | replace: "Č", "C" | replace: "Ž", "Z" | strip_newlines | replace: '"', '\"' }}"{% else %}"executionData": ""{% endif %}, {% if course.questions and course.questions != "" %}"questions": "{{ course.questions | newline_to_br | strip_newlines | replace: ' ', '\\n' | replace: '"', '\"' | replace: "š", "s" | replace: "č", "c" | replace: "ž", "z" | replace: "Š", "S" | replace: "Č", "C" | replace: "Ž", "Z" }}"{% else %}"questions": ""{% endif %}, diff --git a/_layouts/course-data.html b/_layouts/course-data.html index 8a2de0e..850748e 100644 --- a/_layouts/course-data.html +++ b/_layouts/course-data.html @@ -17,7 +17,7 @@ "type": "{{ course.type }}", "execution": "{{ course.execution }}", "cType": "{{ course.cType }}", - {% if course.notifyEmail and course.notifyEmail != "" %}"notifyEmail": "{{ course.notifyEmail }}"{% else %}"notifyEmail": ""{% endif %}, + "notifyEmail": [{% if course.notifyEmail and course.notifyEmail != "" %}{% for email in course.notifyEmail %}"{{ email }}"{% unless forloop.last %}, {% endunless %}{% endfor %}{% else %}""{% endif %}], {% if course.executionStartDate and course.executionStartDate != "" %}"executionStartDate": "{{ course.executionStartDate }}"{% else %}"executionStartDate": ""{% endif %}, {% if course.executionData and course.executionData != "" %}"executionData": "{{ course.executionData | newline_to_br | strip_newlines | replace: '"', '\"' }}"{% else %}"executionData": ""{% endif %}, {% if course.questions and course.questions != "" %}"questions": "{{ course.questions | newline_to_br | strip_newlines | replace: ' ', '\\n' | replace: '"', '\"' }}"{% else %}"questions": ""{% endif %},