Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AlekSIS-App-Chronos
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AlekSIS®
Official
AlekSIS-App-Chronos
Commits
b9da0796
Commit
b9da0796
authored
6 years ago
by
Jonathan Weth
Browse files
Options
Downloads
Patches
Plain Diff
Remove bugs in plan | Comment
parent
5b53df82
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
biscuit/apps/chronos/templates/timetable/plan.html
+38
-5
38 additions, 5 deletions
biscuit/apps/chronos/templates/timetable/plan.html
with
38 additions
and
5 deletions
biscuit/apps/chronos/templates/timetable/plan.html
+
38
−
5
View file @
b9da0796
...
...
@@ -118,9 +118,13 @@
<div
class=
"col s2"
>
<div
class=
"card timetable-title-card"
>
<div
class=
"card-content"
>
<span
class=
"card-title left"
>
{{ time.number_format }}
</span>
{# Lesson number #}
<span
class=
"card-title left"
>
{{ time.number_format }}
</span>
{# Time dimension of lesson #}
<div
class=
"right timetable-time grey-text text-darken-2"
>
<span>
{{ time.start|date:"H:i" }}
</span><br>
<span>
{{ time.end|date:"H:i" }}
</span>
...
...
@@ -130,56 +134,85 @@
</div>
{% for col in row %}
{# A lesson #}
<div
class=
"col s2"
>
<div
class=
"card lesson-card"
>
<div
class=
"card-content"
>
{# Every element of the lesson #}
{% for element_container in col.elements %}
<div
style=
"
{# Display background color only if no badge exists and it is not the old room #}
{% if not element_container.substitution.table.badge %}
{% if not element_container.is_old or type != 1 %}
background-color: {{ element_container.element.subject.hex_color }};
{% endif %}
{% endif %}"
{
#
Add
CSS
class
for
sub
when
it
'
s
a
sub
#
}
class=
"{% if element_container.substitution %}lesson-with-sub{% endif %}"
>
<p>
{% if element_container.substitution %}
{# SUBSTITUTION #}
{% if type == 1 and element_container.is_old %}
{# When it's the old room, let it empty #}
{% elif element_container.substitution.table.badge %}
{# When a badge (cancellation, etc.) exists, then display it #}
<span
class=
"badge new green darken-2"
>
{{ element_container.substitution.table.badge }}
</span>
{% else %}
{# Display sub #}
{# Teacher or room > display classes #}
{% if type == 0 or type == 1 %}
{{ element_container.substitution.table.classes }}
{% endif %}
{# Display teacher with tooltip #}
<span
class=
"tooltipped"
data-position=
"bottom"
data-tooltip=
"{{ element_container.substitution.table.teacher_full|safe }}"
>
{{ element_container.substitution.table.teacher|safe }}
</span>
{# Display subject #}
{{ element_container.substitution.table.subject|safe }}
{# Teacher or class > display room #}
{% if type == 0 or type == 2 %}
<span
class=
"tooltipped"
data-position=
"bottom"
data-tooltip=
"{{ element_container.substitution.table.room_full|safe }}"
>
{{ element_container.substitution.table.room|safe }}
</span>
{% endif %}
{% endif %}
<br>
{% if not type == 1 and not element_container.is_old %}
{# When it isn't a room or the old plan, then display the extra text (e. g. work orders)#}
{% if not type == 1 or not element_container.is_old %}
<small>
<em>
{{ element_container.substitution.table.text|default:"" }}
</em>
</small>
{% endif %}
{% else %}
{# Normal plan #}
{# Teacher or room > Display classes #}
{% if type == 0 or type == 1 %}
{% for class in element_container.element.classes %}
{{ class.name }}
{% endfor %}
{% endif %}
{# Class or room > Display teacher #}
{% if type == 2 or type == 1 %}
<span
data-position=
"bottom"
class=
"tooltipped"
data-tooltip=
"{{ element_container.element.teacher }}"
>
{{ element_container.element.teacher.shortcode }}
</span>
{% endif %}
{# Display subject #}
<strong>
{{ element_container.element.subject.shortcode }}
</strong>
{# Teacher or class > Display room #}
{% if type == 0 or type == 2 %}
<span
class=
"tooltipped"
data-position=
"bottom"
data-tooltip=
"{{ element_container.room.name }}"
>
{{ element_container.room.shortcode }}
</span>
...
...
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