Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
website
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Video AG Infrastruktur
website
Commits
985a5447
Commit
985a5447
authored
5 years ago
by
Christoph Rackwitz
Committed by
Julian Rother
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
cutprogress: fixe Breite; user-gefilterte Ansicht hatte irrelevante Kurse
parent
bde747c0
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
cutprogress.py
+30
-21
30 additions, 21 deletions
cutprogress.py
static/style.css
+10
-1
10 additions, 1 deletion
static/style.css
templates/cutprogress.html
+2
-2
2 additions, 2 deletions
templates/cutprogress.html
with
42 additions
and
24 deletions
cutprogress.py
+
30
−
21
View file @
985a5447
...
@@ -11,9 +11,9 @@ def cutprogress(user=None):
...
@@ -11,9 +11,9 @@ def cutprogress(user=None):
allsemester
=
query
(
'
SELECT DISTINCT semester from courses ORDER BY semester DESC
'
)
allsemester
=
query
(
'
SELECT DISTINCT semester from courses ORDER BY semester DESC
'
)
semester
=
request
.
values
.
get
(
'
semester
'
,
allsemester
[
0
][
'
semester
'
])
semester
=
request
.
values
.
get
(
'
semester
'
,
allsemester
[
0
][
'
semester
'
])
#
column headers: courses
#
find courses for semester
courses
=
query
(
'''
courses
=
query
(
'''
SELECT courses.id, courses.handle, courses.short
, courses.responsible
SELECT courses.id, courses.handle, courses.short
FROM courses
FROM courses
WHERE semester = ?
WHERE semester = ?
ORDER by id DESC
ORDER by id DESC
...
@@ -30,12 +30,21 @@ def cutprogress(user=None):
...
@@ -30,12 +30,21 @@ def cutprogress(user=None):
'''
,
course
[
'
id
'
])
'''
,
course
[
'
id
'
])
if
not
people
:
if
not
people
:
people
=
[{
'
realname
'
:
'
Niemand
'
}]
people
=
[{
'
realname
'
:
'
Niemand
'
,
'
id
'
:
-
1
}]
course
[
'
responsible
'
]
=
people
course
[
'
responsible
'
]
=
people
# fetch lectures
# filter for responsibility
lectures
=
query
(
'''
if
user
is
not
None
:
courses
=
[
c
for
c
in
courses
if
user
in
(
r
[
'
id
'
]
for
r
in
c
[
'
responsible
'
])
]
# fetch lectures for courses
lectures
=
[]
for
c
in
courses
:
lectures
+=
query
(
'''
SELECT
SELECT
lectures.id,
lectures.id,
lectures.course_id,
lectures.course_id,
...
@@ -46,12 +55,12 @@ def cutprogress(user=None):
...
@@ -46,12 +55,12 @@ def cutprogress(user=None):
FROM lectures
FROM lectures
JOIN courses ON courses.id = lectures.course_id
JOIN courses ON courses.id = lectures.course_id
LEFT JOIN videos ON lectures.id = videos.lecture_id
LEFT JOIN videos ON lectures.id = videos.lecture_id
WHERE courses.
semester
= ?
WHERE courses.
id
= ?
AND date <= DATE(
'
now
'
)
AND date <= DATE(
'
now
'
)
AND NOT lectures.norecording
AND NOT lectures.norecording
GROUP BY lectures.id
GROUP BY lectures.id
ORDER BY date DESC, lectures.time ASC, lectures.id ASC
ORDER BY date DESC, lectures.time ASC, lectures.id ASC
'''
,
semester
)
'''
,
c
[
'
id
'
]
)
# sort dates, figure out when weeks change
# sort dates, figure out when weeks change
dates
=
sorted
({
dates
=
sorted
({
...
...
This diff is collapsed.
Click to expand it.
static/style.css
+
10
−
1
View file @
985a5447
...
@@ -137,7 +137,12 @@ th.rotate {
...
@@ -137,7 +137,12 @@ th.rotate {
th
.rotate
>
div
{
th
.rotate
>
div
{
transform
:
transform
:
rotate
(
270deg
)
rotate
(
270deg
)
translate
(
-50px
,
0px
);
translate
(
-100px
,
0px
);
width
:
30px
;
}
th
.rotate
>
div
>
span
{
padding
:
5px
10px
;
}
}
.tooltip-inner
{
.tooltip-inner
{
...
@@ -145,6 +150,10 @@ th.rotate > div {
...
@@ -145,6 +150,10 @@ th.rotate > div {
}
}
#cutprogress
td
{
white-space
:
nowrap
;
}
#cutprogress
.table
tr
.weekbreak
td
{
#cutprogress
.table
tr
.weekbreak
td
{
border-top
:
2px
solid
black
!important
;
border-top
:
2px
solid
black
!important
;
}
}
This diff is collapsed.
Click to expand it.
templates/cutprogress.html
+
2
−
2
View file @
985a5447
...
@@ -18,9 +18,9 @@
...
@@ -18,9 +18,9 @@
Datum
Datum
</th>
</th>
{% for course in courses %}
{% for course in courses %}
<th
class=
"
text-center
rotate"
>
<th
class=
"rotate"
>
<div>
<div>
<a
title=
"Zuständig: {{ course.responsible|join(attribute='realname') }}"
href=
"{{ url_for("
course
",
handle=
course.handle)
}}"
>
{{ course.short }}
</a>
<span>
<a
title=
"Zuständig: {{ course.responsible|join(attribute='realname') }}"
href=
"{{ url_for("
course
",
handle=
course.handle)
}}"
>
{{ course.short }}
</a>
</span>
</div>
</div>
</th>
</th>
{% endfor %}
{% endfor %}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment