Skip to content
Snippets Groups Projects
Verified Commit b2a5dad4 authored by Jonathan Weth's avatar Jonathan Weth :keyboard:
Browse files

Merge remote-tracking branch 'origin/master'

parents f34c17f2 5ebda294
No related branches found
No related tags found
No related merge requests found
from django.utils.translation import gettext_lazy as _ from django.utils.translation import gettext_lazy as _
CONSTANCE_CONFIG = { CONSTANCE_CONFIG = {
"CHRONOS_USE_PARENT_GROUPS": (
False,
_(
"If an lesson or substitution has only one group"
" and this group has parent groups,"
" show the parent groups instead of the original group."
),
),
"CHRONOS_SHORTEN_GROUPS": (
False,
_(
"If there are more groups than the limit set in CHRONOS_SHORTEN_GROUPS_LIMIT, add text collapsible."
),
),
"CHRONOS_SHORTEN_GROUPS_LIMIT": (
4,
_(
"If there are more groups than this limit and CHRONOS_SHORTEN_GROUPS is enabled, add text collapsible."
),
),
"CHRONOS_SUBSTITUTIONS_PRINT_DAY_NUMBER": ( "CHRONOS_SUBSTITUTIONS_PRINT_DAY_NUMBER": (
2, 2,
_("Number of days shown on substitutions print view"), _("Number of days shown on substitutions print view"),
...@@ -12,6 +32,9 @@ CONSTANCE_CONFIG = { ...@@ -12,6 +32,9 @@ CONSTANCE_CONFIG = {
} }
CONSTANCE_CONFIG_FIELDSETS = { CONSTANCE_CONFIG_FIELDSETS = {
"Chronos settings": ( "Chronos settings": (
"CHRONOS_USE_PARENT_GROUPS",
"CHRONOS_SHORTEN_GROUPS",
"CHRONOS_SHORTEN_GROUPS_LIMIT",
"CHRONOS_SUBSTITUTIONS_PRINT_DAY_NUMBER", "CHRONOS_SUBSTITUTIONS_PRINT_DAY_NUMBER",
"CHRONOS_SUBSTITUTIONS_SHOW_HEADER_BOX", "CHRONOS_SUBSTITUTIONS_SHOW_HEADER_BOX",
), ),
......
...@@ -35,7 +35,7 @@ li.active > a > .sidenav-badge { ...@@ -35,7 +35,7 @@ li.active > a > .sidenav-badge {
flex-direction: column; flex-direction: column;
} }
.lesson-card .card-content div { .lesson-card .card-content > div {
padding: 3px; padding: 3px;
flex: auto; flex: auto;
width: 100%; width: 100%;
......
<a href="{% url "timetable" "group" item.pk %}">
{{ item.short_name }}{% if not forloop.last %},{% endif %}
</a>
{% for group in groups %} {% if groups.count == 1 and groups.0.parent_groups.all and config.CHRONOS_USE_PARENT_GROUPS %}
<a href="{% url "timetable" "group" group.pk %}"> {% include "chronos/partials/groups_part.html" with groups=groups.0.parent_groups.all %}
{{ group.short_name }}{% if not forloop.last %},{% endif %} {% else %}
</a> {% include "chronos/partials/groups_part.html" with groups=groups %}
{% endfor %} {% endif %}
{% if groups.count > config.CHRONOS_SHORTEN_GROUPS_LIMIT and config.CHRONOS_SHORTEN_GROUPS %}
{% include "components/text_collapsible.html" with template="chronos/partials/group.html" qs=groups %}
{% else %}
{% for group in groups %}
{% include "chronos/partials/group.html" with item=group %}
{% endfor %}
{% endif %}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment