Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add location to "Scheduled" lectures on course page #1376

Merged
merged 19 commits into from
Oct 21, 2024
Prev Previous commit
Next Next commit
Added verification through regex
  • Loading branch information
Karakoc committed Oct 18, 2024
commit 6467fa20e07c2cd5fc36ec86e7b66a3f4964ccad
8 changes: 6 additions & 2 deletions web/template/home.gohtml
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,9 @@
</section>
</template>
<template x-if="plannedStreams.hasElements()">
<section class="tum-live-course-view-item px-3">
<section x-data="{isLectureHallValid(lectureHall) {const regex = /^\d{4}\.[A-Za-z0-9]{2}\.[A-Za-z0-9]{3,4}$/;
return regex.test(lectureHall);}}"
class="tum-live-course-view-item px-3">
<header>
<h3>Scheduled</h3>
</header>
Expand All @@ -590,7 +592,9 @@
<span x-text="`${s.TimeOfStart()} - ${s.TimeOfEnd()}`"></span>
</div>
<h4 x-text="s.Name" class="font-semibold text-1"></h4>
<a :href="`https://nav.tum.de/room/${s.LectureHall}`" class="no-underline" x-text="s.LectureHall"></a>
<template x-if="isLectureHallValid(s.LectureHall)">
<a :href="`https://nav.tum.de/room/${s.LectureHall}`" class="no-underline" x-text="s.LectureHall"></a>
</template>
</div>
</div>
</article>
Expand Down