diff --git a/event/static/js/calendar.js b/event/static/js/calendar.js index 0f30b7f..2396615 100644 --- a/event/static/js/calendar.js +++ b/event/static/js/calendar.js @@ -33,6 +33,9 @@ class Calendar { this.events = []; + this.eventDetailURLFormat = calendarParameters.eventDetailURLFormat !== undefined + ? calendarParameters.eventDetailURLFormat + : ""; this.subscriptionURLFormat = calendarParameters.subscriptionURLFormat !== undefined ? calendarParameters.subscriptionURLFormat : ""; @@ -703,8 +706,12 @@ class EventDetails { } createAndAppendTitle () { + let eventDetailURL = this.event.calendar.eventDetailURLFormat + .replace("999999", this.event.id); + let linkToEventPageNode = $("") - .attr("href", "TODO") // TODO + .attr("href", eventDetailURL) + .attr("target", "_blank") .addClass("cal-detail-name") .appendTo(this.node); diff --git a/event/templates/event/calendar.html b/event/templates/event/calendar.html index db2dd26..86a925c 100644 --- a/event/templates/event/calendar.html +++ b/event/templates/event/calendar.html @@ -15,6 +15,7 @@ let cal = new Calendar({ startDate: new Date(2018, 10, 30, 8), endDate: new Date(2018, 11, 2, 6), + eventDetailURLFormat: "https://cof.ens.fr/poulpe/event/activity/999999", subscriptionURLFormat: "{% url "event:enrol_activity" 999999 %}?ajax=json", csrfToken: $(".planning [name=csrfmiddlewaretoken]").val() });