Skip to content
Snippets Groups Projects
Commit 6978640e authored by Tomáš Valenta's avatar Tomáš Valenta
Browse files

wip - calendar

parent d398e611
No related branches found
No related tags found
No related merge requests found
Pipeline #12700 passed
......@@ -4,3 +4,4 @@ webpack-stats.json
staticfiles
node_modules
shared/static/shared/*.{js,css,txt}
media/*
......@@ -11,7 +11,7 @@
<ul class="grid grid-cols-2 gap-3">
{% for group in lecture_groups %}
<li>
<a href="{% url "lectures:view_lectures" group.id %}" class="hover:no-underline">
<a href="{% url "lectures:view_lecture_index" group.id %}" class="hover:no-underline">
<div class="card elevation-6">
<div class="card__body hover:bg-gray-100 duration-100">
<h2 class="head-alt-sm">{{ group.name }}</h2>
......
......@@ -60,7 +60,9 @@
</ul>
</template>
<template v-if="isCurrentView('calendar')">
b
<div class="__js-root">
<ui-person-calendar events='[]'></ui-person-calendar>
</div>
</template>
<template v-if="isCurrentView('recordings')">
c
......
......@@ -16,7 +16,10 @@ def get_base_context(request) -> dict:
def view_avilable_groups(request):
lecture_groups = (
get_objects_for_user(request.user, "lectures.view_lecturegroup")
.filter(user_groups__in=request.user.groups.all())
.filter(
models.Q(user_groups__in=request.user.groups.all())
| models.Q(user_groups=None)
)
.distinct()
.all()
)
......
media/364D1F51-B67A-4FA5-83E6-1F32D62B6A78.gif

18.8 KiB

......@@ -9,6 +9,7 @@
"version": "0.0.1",
"license": "AGPL-3.0-or-later",
"dependencies": {
"@fullcalendar/core": "^6.1.6",
"@tailwindcss/typography": "^0.5.9",
"css-loader": "^6.7.3",
"jquery": "^3.6.3",
......@@ -40,6 +41,14 @@
"node": ">=10.0.0"
}
},
"node_modules/@fullcalendar/core": {
"version": "6.1.6",
"resolved": "https://registry.npmjs.org/@fullcalendar/core/-/core-6.1.6.tgz",
"integrity": "sha512-Q/3pWgOv7qr/eVpuDz+05jxJZSg7Fdwh4XgQP8DlJFLp5aLlOiiKdkTUIO1BX7clQtYTm8P0v7FqMKbsFiQInw==",
"dependencies": {
"preact": "~10.12.1"
}
},
"node_modules/@jridgewell/gen-mapping": {
"version": "0.3.3",
"resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz",
......@@ -1591,6 +1600,15 @@
"resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz",
"integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ=="
},
"node_modules/preact": {
"version": "10.12.1",
"resolved": "https://registry.npmjs.org/preact/-/preact-10.12.1.tgz",
"integrity": "sha512-l8386ixSsBdbreOAkqtrwqHwdvR35ID8c3rKPa8lCWuO86dBi32QWHV4vfsZK1utLLFMvw+Z5Ad4XLkZzchscg==",
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/preact"
}
},
"node_modules/punycode": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz",
......
......@@ -12,6 +12,7 @@
"author": "Tomáš Valenta",
"license": "AGPL-3.0-or-later",
"dependencies": {
"@fullcalendar/core": "^6.1.6",
"@tailwindcss/typography": "^0.5.9",
"css-loader": "^6.7.3",
"jquery": "^3.6.3",
......
......@@ -1025,10 +1025,6 @@ html {
margin-bottom: 2.5rem;
}
.mb-12 {
margin-bottom: 3rem;
}
.mb-4 {
margin-bottom: 1rem;
}
......@@ -1037,6 +1033,10 @@ html {
margin-bottom: 1.5rem;
}
.mr-1 {
margin-right: 0.25rem;
}
.mt-4 {
margin-top: 1rem;
}
......@@ -1073,6 +1073,10 @@ html {
cursor: pointer;
}
.grid-cols-1 {
grid-template-columns: repeat(1, minmax(0, 1fr));
}
.grid-cols-2 {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
......@@ -1101,6 +1105,10 @@ html {
gap: 0.75rem;
}
.gap-4 {
gap: 1rem;
}
.space-x-2 > :not([hidden]) ~ :not([hidden]) {
--tw-space-x-reverse: 0;
margin-right: calc(0.5rem * var(--tw-space-x-reverse));
......@@ -1123,6 +1131,10 @@ html {
align-self: flex-start;
}
.p-5 {
padding: 1.25rem;
}
.py-4 {
padding-top: 1rem;
padding-bottom: 1rem;
......@@ -1231,6 +1243,10 @@ html {
width: 10rem;
}
.md\:grid-cols-2 {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
.md\:flex-row {
flex-direction: row;
}
......
......@@ -192,7 +192,7 @@
</footer>
<script
src="https://styleguide.pirati.cz/2.11.x/js/main.bundle.js"
src="https://styleguide.pirati.cz/2.12.x/js/main.bundle.js"
></script>
</body>
</html>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment