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
913922fc
Verified
Commit
913922fc
authored
5 years ago
by
Jonathan Weth
Browse files
Options
Downloads
Patches
Plain Diff
Fix use of badges for status "Cancelled"
parent
0815bb8e
No related branches found
No related tags found
1 merge request
!31
Biscuit merge. Closes #53.
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
aleksis/apps/chronos/templates/chronos/partials/lesson.html
+6
-4
6 additions, 4 deletions
aleksis/apps/chronos/templates/chronos/partials/lesson.html
aleksis/apps/chronos/templates/chronos/substitutions.html
+5
-4
5 additions, 4 deletions
aleksis/apps/chronos/templates/chronos/substitutions.html
with
11 additions
and
8 deletions
aleksis/apps/chronos/templates/chronos/partials/lesson.html
+
6
−
4
View file @
913922fc
{% load i18n %}
<div
class=
"card lesson-card"
>
<div
class=
"card-content"
>
...
...
@@ -30,16 +32,16 @@
{% if type == "room" and lesson_period.room != lesson_period.get_room %}
{# When it's the old room, let it empty #}
{% elif lesson_period.substitution.
table.badge
%}
{% elif lesson_period.
get_
substitution.
cancelled
%}
{# When a badge (cancellation, etc.) exists, then display it with the teacher#}
{# Class or room > Display teacher #}
{% if type == "group" or type == "room" %}
{% include "chronos/partials/teachers.html" with teachers=lesson_period.lesson.teachers.all %}
{% if type == "group" or type == "room"
and lesson_period.lesson.teachers.all
%}
{% include "chronos/partials/teachers.html" with teachers=lesson_period.lesson.teachers.all %}
<br/>
{% endif %}
{# Badge #}
<span
class=
"badge new green darken-2"
>
{
{ lesson_period.substitution.table.badge }
}
</span>
<span
class=
"badge new green darken-2"
>
{
% trans "Cancelled" %
}
</span>
{% else %}
{# Display sub #}
...
...
This diff is collapsed.
Click to expand it.
aleksis/apps/chronos/templates/chronos/substitutions.html
+
5
−
4
View file @
913922fc
...
...
@@ -96,14 +96,15 @@
{% include "chronos/partials/subs/room.html" %}
</td>
<td>
{% if sub.badge %}
<span
class=
"badge new green hide-on-med-and-up"
>
{{ sub.badge }}
</span>
{% if sub.cancelled %}
{# TODO: Support other cases#}
<span
class=
"badge new green hide-on-med-and-up"
>
{% trans "Cancelled" %}
</span>
{% endif %}
<em>
{{ sub.text|default:"" }}
</em>
</td>
<td
class=
"hide-on-small-and-down"
>
{% if sub.
badge
%}
<span
class=
"badge new green darken-2"
>
{
{ sub.badge }
}
</span>
{% if sub.
cancelled
%}
<span
class=
"badge new green darken-2"
>
{
% trans "Cancelled" %
}
</span>
{% endif %}
</td>
</tr>
...
...
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