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

Merge branch '206-class-register-personal-notes-unusable-on-mobile-devices' into 'master'

Resolve "Class register / personal notes unusable on mobile devices"

Closes #206

See merge request !269
parents 4f42ca7f 198b18b8
No related branches found
No related tags found
1 merge request!269Resolve "Class register / personal notes unusable on mobile devices"
Pipeline #54782 passed
...@@ -13,6 +13,7 @@ Fixed ...@@ -13,6 +13,7 @@ Fixed
~~~~~ ~~~~~
* Status icon in single-lesson view showed 'Missing data' although the data were complete. * Status icon in single-lesson view showed 'Missing data' although the data were complete.
* The personal note tab of a lesson was not well usable on mobile devices.
`2.0` - 2022-02-06 `2.0` - 2022-02-06
------------------ ------------------
......
...@@ -15,12 +15,68 @@ ...@@ -15,12 +15,68 @@
} }
@media only screen and (max-width : 992px) { @media only screen and (max-width: 992px) {
table.responsive-table.alsijil-table th, .no-mobile-card {
table.responsive-table.alsijil-table td { border: unset;
margin: 0; padding: unset;
vertical-align: top; margin: unset;
height: 109px;} box-shadow: unset;
}
.no-mobile-card .card-content {
padding: unset;
}
table.alsijil-table.horizontal-on-small {
display: block;
max-width: calc(100vw - 40px);
}
table.alsijil-table.horizontal-on-small thead {
display: none;
}
table.alsijil-table.horizontal-on-small tbody {
overflow-x: scroll;
display: flex;
column-gap: 1rem;
flex-wrap: nowrap;
align-items: stretch;
scroll-snap-type: x proximity;
}
table.alsijil-table.horizontal-on-small tr {
flex-basis: min(75vw, 400px);
flex-shrink: 0;
flex-grow: 1;
border-radius: 8px;
display: flex;
flex-direction: column;
justify-content: space-between;
scroll-snap-align: center;
transition: all .5s;
margin: 0.5rem 0 1rem 0;
background-color: #fff!important;
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 3px 1px -2px rgba(0, 0, 0, 0.12), 0 1px 5px 0 rgba(0, 0, 0, 0.2);
padding: 24px;
}
table.alsijil-table.horizontal-on-small tr:first-of-type {
margin-inline-start: .4rem;
-moz-margin-start: .4rem;
-webkit-margin-start: .4rem;
}
table.alsijil-table.horizontal-on-small tr:last-of-type {
margin-inline-end: .4rem;
-moz-margin-end: .4rem;
-webkit-margin-end: .4rem;
}
table.alsijil-table.horizontal-on-small td.center-align {
text-align: left;
}
table.alsijil-table.horizontal-on-small .person-name {
font-size: 24px;
font-weight: 300;
display: block;
line-height: 32px;
margin-bottom: 8px;
}
} }
.alsijil-time-head, .alsijil-object-head { .alsijil-time-head, .alsijil-object-head {
......
...@@ -12,16 +12,17 @@ ...@@ -12,16 +12,17 @@
{% endif %} {% endif %}
{% endif %} {% endif %}
<div class="card"> {% if can_edit_register_object_personalnote %}
{% form form=personal_note_formset.management_form %}{% endform %}
{% endif %}
<div class="card no-mobile-card">
<div class="card-content"> <div class="card-content">
<span class="card-title"> <span class="card-title">
{% blocktrans %}Personal notes{% endblocktrans %} {% blocktrans %}Personal notes{% endblocktrans %}
</span> </span>
{% if can_edit_register_object_personalnote %}
{% form form=personal_note_formset.management_form %}{% endform %}
{% endif %}
<table class="striped responsive-table alsijil-table"> <table class="striped alsijil-table horizontal-on-small">
<thead> <thead>
<tr> <tr>
<th>{% blocktrans %}Person{% endblocktrans %}</th> <th>{% blocktrans %}Person{% endblocktrans %}</th>
...@@ -38,7 +39,7 @@ ...@@ -38,7 +39,7 @@
{% if can_edit_register_object_personalnote %} {% if can_edit_register_object_personalnote %}
<tr> <tr>
{{ form.id }} {{ form.id }}
<td>{{ form.person_name }}{{ form.person_name.value }} <td class="person-name">{{ form.person_name }}{{ form.person_name.value }}
<p> <p>
{% for assignment in form.instance.person.group_roles.all %} {% for assignment in form.instance.person.group_roles.all %}
{% include "alsijil/group_role/chip.html" with role=assignment.role %} {% include "alsijil/group_role/chip.html" with role=assignment.role %}
...@@ -48,7 +49,7 @@ ...@@ -48,7 +49,7 @@
<td class="center-align"> <td class="center-align">
<label> <label>
{{ form.absent }} {{ form.absent }}
<span></span> <span><span class="hide-on-large-only">{{ form.absent.label }}</span></span>
</label> </label>
</td> </td>
<td> <td>
...@@ -62,7 +63,7 @@ ...@@ -62,7 +63,7 @@
<td class="center-align"> <td class="center-align">
<label> <label>
{{ form.excused }} {{ form.excused }}
<span></span> <span><span class="hide-on-large-only">{{ form.excused.label }}</span></span>
</label> </label>
</td> </td>
<td> <td>
...@@ -112,9 +113,9 @@ ...@@ -112,9 +113,9 @@
</span> </span>
</td> </td>
<td><i class="material-icons center">{{ form.excused.value|yesno:"check,clear" }}</i></td> <td><i class="material-icons center">{{ form.excused.value|yesno:"check,clear" }}</i></td>
<td>{% firstof form.excuse_type.value "–" %}</td> <td>{% firstof form.instance.excuse_type "–" %}</td>
<td> <td>
{% for extra_mark in form.extra_marks.value %} {% for extra_mark in form.instance.extra_marks.all %}
{{ extra_mark }}{% if not forloop.last %},{% endif %} {{ extra_mark }}{% if not forloop.last %},{% endif %}
{% empty %} {% empty %}
......
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