Skip to content
Snippets Groups Projects
Commit aa0769bc authored by Elmar Ludwig's avatar Elmar Ludwig
Browse files

avoid use of `tfoot` in nested tables in MVV, fixes #90

Closes #90

Merge request studip/studip!812
parent 1c22d5c2
No related branches found
No related tags found
No related merge requests found
Showing
with 24 additions and 27 deletions
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<? if (count($perm_institutes) === 0 <? if (count($perm_institutes) === 0
|| array_intersect($perm_institutes, array_keys($abschluss->getAssignedInstitutes()))) : ?> || array_intersect($perm_institutes, array_keys($abschluss->getAssignedInstitutes()))) : ?>
<tbody id="<?= $kategorie->id . '_' . $abschluss->id ?>"<?= MvvPerm::haveFieldPermPosition('AbschlussZuord', MvvPerm::PERM_WRITE) ? ' class="sort_items"' : '' ?>> <tbody id="<?= $kategorie->id . '_' . $abschluss->id ?>"<?= MvvPerm::haveFieldPermPosition('AbschlussZuord', MvvPerm::PERM_WRITE) ? ' class="sort_items"' : '' ?>>
<tr class="header-row"> <tr class="header-row sort_item">
<td> <td>
<?= htmlReady($abschluss->name) ?> <?= htmlReady($abschluss->name) ?>
</td> </td>
...@@ -13,4 +13,4 @@ ...@@ -13,4 +13,4 @@
<? endif; ?> <? endif; ?>
<? endforeach; ?> <? endforeach; ?>
</table> </table>
</td> </td>
\ No newline at end of file
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
<? $abschluesse = $kategorie->abschluesse; ?> <? $abschluesse = $kategorie->abschluesse; ?>
<tbody id="<?= $kategorie->id ?>" <tbody id="<?= $kategorie->id ?>"
class="<?= count($abschluesse) ? '' : 'empty' ?> collapsed<?= $perm->haveFieldPerm('position') ? ' sort_items' : '' ?>"> class="<?= count($abschluesse) ? '' : 'empty' ?> collapsed<?= $perm->haveFieldPerm('position') ? ' sort_items' : '' ?>">
<tr class="header-row"> <tr class="header-row sort_item">
<td class="toggle-indicator"> <td class="toggle-indicator">
<? if (count($abschluesse) < 1): ?> <? if (count($abschluesse) < 1): ?>
<?= htmlReady($kategorie->name) ?> <?= htmlReady($kategorie->name) ?>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<? $perm = MvvPerm::get($modulteil) ?> <? $perm = MvvPerm::get($modulteil) ?>
<tbody class="<?= ($modulteil_id === $modulteil->getId() ? 'not-collapsed' : 'collapsed') ?><?= $perm->haveFieldPerm('position') ? ' sort_items' : '' ?>" <tbody class="<?= ($modulteil_id === $modulteil->getId() ? 'not-collapsed' : 'collapsed') ?><?= $perm->haveFieldPerm('position') ? ' sort_items' : '' ?>"
id="<?= $modulteil->getId() ?>"> id="<?= $modulteil->getId() ?>">
<tr class="header-row"> <tr class="header-row sort_item">
<td class="toggle-indicator"> <td class="toggle-indicator">
<? if (count($modulteil->lvgruppen) || $perm->haveFieldPermLvgruppen(MvvPerm::PERM_CREATE)) : ?> <? if (count($modulteil->lvgruppen) || $perm->haveFieldPermLvgruppen(MvvPerm::PERM_CREATE)) : ?>
<a class="mvv-load-in-new-row" <a class="mvv-load-in-new-row"
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<? foreach ($modulteil->lvgruppen as $lvgruppe) : ?> <? foreach ($modulteil->lvgruppen as $lvgruppe) : ?>
<? $lvgruppe_modulteil = LvgruppeModulteil::get([$lvgruppe->getId(), $modulteil->getId()]) ?> <? $lvgruppe_modulteil = LvgruppeModulteil::get([$lvgruppe->getId(), $modulteil->getId()]) ?>
<tbody id="<?= $modulteil_id . '_' . $lvgruppe->getId() ?>"<?= MvvPerm::haveFieldPermPosition($lvgruppe_modulteil) ? 'class="sort_items"' : '' ?>> <tbody id="<?= $modulteil_id . '_' . $lvgruppe->getId() ?>"<?= MvvPerm::haveFieldPermPosition($lvgruppe_modulteil) ? 'class="sort_items"' : '' ?>>
<tr class="header-row"> <tr class="sort_item">
<td><?= htmlReady($lvgruppe->getDisplayName()) ?></td> <td><?= htmlReady($lvgruppe->getDisplayName()) ?></td>
<td class="actions"> <td class="actions">
<form method="post"> <form method="post">
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
</tbody> </tbody>
<? endforeach; ?> <? endforeach; ?>
<? if (MvvPerm::haveFieldPermLvgruppen($modulteil, MvvPerm::PERM_CREATE)) : ?> <? if (MvvPerm::haveFieldPermLvgruppen($modulteil, MvvPerm::PERM_CREATE)) : ?>
<tfoot> <tbody>
<tr> <tr>
<td colspan="2"> <td colspan="2">
<form action="<?= $controller->url_for('/add_lvgruppe/' . $modulteil->id) ?>" method="post"> <form action="<?= $controller->url_for('/add_lvgruppe/' . $modulteil->id) ?>" method="post">
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
</form> </form>
</td> </td>
</tr> </tr>
</tfoot> </tbody>
<? endif; ?> <? endif; ?>
</table> </table>
</td> </td>
<table class="default nohover collapsable"> <table class="default collapsable">
<colgroup> <colgroup>
<col width="70%"> <col width="70%">
<col width="29%"> <col width="29%">
......
<table class="default nohover collapsable"> <table class="default collapsable">
<colgroup> <colgroup>
<col style="width: 70%"> <col style="width: 70%">
<col style="width: 29%"> <col style="width: 29%">
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
<? $perm = MvvPerm::get($stgteilbezeichnung) ?> <? $perm = MvvPerm::get($stgteilbezeichnung) ?>
<tbody id="<?= $stgteilbezeichnung->id ?>" <tbody id="<?= $stgteilbezeichnung->id ?>"
class="collapsed <?php if ($perm->haveFieldPerm('position')) echo 'sort_items'; ?>"> class="collapsed <?php if ($perm->haveFieldPerm('position')) echo 'sort_items'; ?>">
<tr class="header-row"> <tr class="header-row sort_item">
<td class="toggle-indicator"> <td class="toggle-indicator">
<a class="mvv-load-in-new-row" <a class="mvv-load-in-new-row"
href="<?= $controller->url_for('/details/' . $stgteilbezeichnung->id) ?>"> href="<?= $controller->url_for('/details/' . $stgteilbezeichnung->id) ?>">
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
</tbody> </tbody>
<? endforeach; ?> <? endforeach; ?>
<? if ($studiengang->typ === 'mehrfach' && MvvPerm::haveFieldPermStudiengangteil($studiengang, MvvPerm::PERM_CREATE)) : ?> <? if ($studiengang->typ === 'mehrfach' && MvvPerm::haveFieldPermStudiengangteil($studiengang, MvvPerm::PERM_CREATE)) : ?>
<tfoot> <tbody>
<tr> <tr>
<td colspan="3"> <td colspan="3">
<form style="width: 100%;" <form style="width: 100%;"
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
</form> </form>
</td> </td>
</tr> </tr>
</tfoot> </tbody>
<? endif; ?> <? endif; ?>
</table> </table>
</td> </td>
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
</colgroup> </colgroup>
<? foreach ($stgteile as $stgteil) : ?> <? foreach ($stgteile as $stgteil) : ?>
<tbody id="<?= $stg_stgbez_id . '_' . $stgteil->id ?>"<?= MvvPerm::haveFieldPermStudiengangteil($studiengang, MvvPerm::PERM_WRITE) ? 'class="sort_items"' : '' ?>> <tbody id="<?= $stg_stgbez_id . '_' . $stgteil->id ?>"<?= MvvPerm::haveFieldPermStudiengangteil($studiengang, MvvPerm::PERM_WRITE) ? 'class="sort_items"' : '' ?>>
<tr class="header-row"> <tr class="sort_item">
<td width="90%"><?= htmlReady($stgteil->getDisplayName()) ?></td> <td width="90%"><?= htmlReady($stgteil->getDisplayName()) ?></td>
<td class="actions"> <td class="actions">
<? if (MvvPerm::haveFieldPermStudiengangteil($studiengang, MvvPerm::PERM_CREATE)) : ?> <? if (MvvPerm::haveFieldPermStudiengangteil($studiengang, MvvPerm::PERM_CREATE)) : ?>
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
</tbody> </tbody>
<? endforeach; ?> <? endforeach; ?>
<? if (MvvPerm::haveFieldPermStudiengangteil($studiengang, MvvPerm::PERM_CREATE)) : ?> <? if (MvvPerm::haveFieldPermStudiengangteil($studiengang, MvvPerm::PERM_CREATE)) : ?>
<tfoot> <tbody>
<tr> <tr>
<td colspan="2"> <td colspan="2">
<form style="width: 100%;" <form style="width: 100%;"
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
</form> </form>
</td> </td>
</tr> </tr>
</tfoot> </tbody>
<? endif; ?> <? endif; ?>
</table> </table>
</td> </td>
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<? foreach ($abschnitte as $abschnitt) : ?> <? foreach ($abschnitte as $abschnitt) : ?>
<tbody id="<?= $abschnitt->id ?>" <tbody id="<?= $abschnitt->id ?>"
class="<?= ($abschnitt_id === $abschnitt->id ? 'not-collapsed' : 'collapsed') ?><?= MvvPerm::haveFieldPermPosition($abschnitt, MvvPerm::PERM_WRITE) ? ' sort_items' : '' ?>"> class="<?= ($abschnitt_id === $abschnitt->id ? 'not-collapsed' : 'collapsed') ?><?= MvvPerm::haveFieldPermPosition($abschnitt, MvvPerm::PERM_WRITE) ? ' sort_items' : '' ?>">
<tr class="header-row" id="abschnittt_<?= $abschnitt->id ?>"> <tr class="header-row sort_item" id="abschnittt_<?= $abschnitt->id ?>">
<td class="toggle-indicator"> <td class="toggle-indicator">
<a class="mvv-load-in-new-row" <a class="mvv-load-in-new-row"
href="<?= $controller->url_for('/details_abschnitt/' . $abschnitt->id) ?>"> href="<?= $controller->url_for('/details_abschnitt/' . $abschnitt->id) ?>">
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
TextHelper::reset_cycle(); ?> TextHelper::reset_cycle(); ?>
<? if (count($version->abschnitte) > 0 && MvvPerm::haveFieldPermModul_zuordnungen('StgteilAbschnitt', MvvPerm::PERM_CREATE) <? if (count($version->abschnitte) > 0 && MvvPerm::haveFieldPermModul_zuordnungen('StgteilAbschnitt', MvvPerm::PERM_CREATE)
) : ?> ) : ?>
<tfoot> <tbody>
<tr> <tr>
<td colspan="3"> <td colspan="3">
<form class="mvv-qsform" action="<?= $controller->link_for('/add_modul/' . $version->id) ?>" <form class="mvv-qsform" action="<?= $controller->link_for('/add_modul/' . $version->id) ?>"
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
</form> </form>
</td> </td>
</tr> </tr>
</tfoot> </tbody>
<? endif; ?> <? endif; ?>
</table> </table>
</td> </td>
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
</colgroup> </colgroup>
<? foreach ($assignments as $assignment) : ?> <? foreach ($assignments as $assignment) : ?>
<tbody class="<?= count($assignment->modul->modulteile) ? '' : 'empty' ?> <?= ($modul_id == $assignment->modul->id ? 'not-collapsed' : 'collapsed') ?><?= MvvPerm::haveFieldPermPosition($assignment, MvvPerm::PERM_WRITE) ? ' sort_items' : '' ?>" id="<?= $assignment->id ?>"> <tbody class="<?= count($assignment->modul->modulteile) ? '' : 'empty' ?> <?= ($modul_id == $assignment->modul->id ? 'not-collapsed' : 'collapsed') ?><?= MvvPerm::haveFieldPermPosition($assignment, MvvPerm::PERM_WRITE) ? ' sort_items' : '' ?>" id="<?= $assignment->id ?>">
<tr id="modul_<?= $assignment->modul->id ?>" class="header-row"> <tr id="modul_<?= $assignment->modul->id ?>" class="header-row sort_item">
<td class="toggle-indicator"> <td class="toggle-indicator">
<? if (count($assignment->modul->modulteile)) : ?> <? if (count($assignment->modul->modulteile)) : ?>
<a class="mvv-load-in-new-row" href="<?= $controller->url_for('/modulteile', $assignment->id) ?>"><?= htmlReady($assignment->getDisplayName()) ?></a> <a class="mvv-load-in-new-row" href="<?= $controller->url_for('/modulteile', $assignment->id) ?>"><?= htmlReady($assignment->getDisplayName()) ?></a>
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
</tbody> </tbody>
<? endforeach; TextHelper::reset_cycle(); ?> <? endforeach; TextHelper::reset_cycle(); ?>
<? if (MvvPerm::haveFieldPermModul_zuordnungen($abschnitt, MvvPerm::PERM_CREATE)) : ?> <? if (MvvPerm::haveFieldPermModul_zuordnungen($abschnitt, MvvPerm::PERM_CREATE)) : ?>
<tfoot> <tbody>
<tr> <tr>
<td colspan="2"> <td colspan="2">
<?= _('Modul hinzufügen') ?> <?= _('Modul hinzufügen') ?>
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
); ?> ); ?>
</td> </td>
</tr> </tr>
</tfoot> </tbody>
<? endif; ?> <? endif; ?>
</table> </table>
</form> </form>
......
...@@ -116,13 +116,13 @@ table { ...@@ -116,13 +116,13 @@ table {
} }
> tbody.sort_items { > tbody.sort_items {
> tr.header-row > td:first-child { > tr.sort_item > td:first-child {
background: #fff url("@{image-path}/anfasser_24.png") no-repeat left center; background: #fff url("@{image-path}/anfasser_24.png") no-repeat left center;
cursor: move; cursor: move;
padding-left: 10px; padding-left: 10px;
} }
&.empty > tr.header-row > td:first-child { &.empty > tr.sort_item > td:first-child {
&:extend(& > tr.header-row > td:first-child); &:extend(& > tr.sort_item > td:first-child);
padding-left: 30px; padding-left: 30px;
} }
} }
......
...@@ -463,9 +463,6 @@ table.default { ...@@ -463,9 +463,6 @@ table.default {
} }
} }
> tbody:last-of-type > tr:last-child > td { > tbody:last-of-type > tr:last-child > td {
> table > tbody > tr > td {
border-bottom: 1px solid @table-header-color;
}
border-bottom: 1px solid @brand-color-darker; border-bottom: 1px solid @brand-color-darker;
} }
// Hover effect // Hover effect
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment