Skip to content
Snippets Groups Projects
Commit 3e1a8e4a authored by Elmar Ludwig's avatar Elmar Ludwig Committed by David Siegfried
Browse files

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

Closes #90

Merge request studip/studip!812
parent 8fabce22
No related branches found
No related tags found
No related merge requests found
Showing
with 24 additions and 27 deletions
......@@ -4,7 +4,7 @@
<? if (count($perm_institutes) === 0
|| array_intersect($perm_institutes, array_keys($abschluss->getAssignedInstitutes()))) : ?>
<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>
<?= htmlReady($abschluss->name) ?>
</td>
......@@ -13,4 +13,4 @@
<? endif; ?>
<? endforeach; ?>
</table>
</td>
\ No newline at end of file
</td>
......@@ -22,7 +22,7 @@
<? $abschluesse = $kategorie->abschluesse; ?>
<tbody id="<?= $kategorie->id ?>"
class="<?= count($abschluesse) ? '' : 'empty' ?> collapsed<?= $perm->haveFieldPerm('position') ? ' sort_items' : '' ?>">
<tr class="header-row">
<tr class="header-row sort_item">
<td class="toggle-indicator">
<? if (count($abschluesse) < 1): ?>
<?= htmlReady($kategorie->name) ?>
......
......@@ -8,7 +8,7 @@
<? $perm = MvvPerm::get($modulteil) ?>
<tbody class="<?= ($modulteil_id === $modulteil->getId() ? 'not-collapsed' : 'collapsed') ?><?= $perm->haveFieldPerm('position') ? ' sort_items' : '' ?>"
id="<?= $modulteil->getId() ?>">
<tr class="header-row">
<tr class="header-row sort_item">
<td class="toggle-indicator">
<? if (count($modulteil->lvgruppen) || $perm->haveFieldPermLvgruppen(MvvPerm::PERM_CREATE)) : ?>
<a class="mvv-load-in-new-row"
......
......@@ -7,7 +7,7 @@
<? foreach ($modulteil->lvgruppen as $lvgruppe) : ?>
<? $lvgruppe_modulteil = LvgruppeModulteil::get([$lvgruppe->getId(), $modulteil->getId()]) ?>
<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 class="actions">
<form method="post">
......@@ -46,7 +46,7 @@
</tbody>
<? endforeach; ?>
<? if (MvvPerm::haveFieldPermLvgruppen($modulteil, MvvPerm::PERM_CREATE)) : ?>
<tfoot>
<tbody>
<tr>
<td colspan="2">
<form action="<?= $controller->url_for('/add_lvgruppe/' . $modulteil->id) ?>" method="post">
......@@ -60,7 +60,7 @@
</form>
</td>
</tr>
</tfoot>
</tbody>
<? endif; ?>
</table>
</td>
<table class="default nohover collapsable">
<table class="default collapsable">
<colgroup>
<col width="70%">
<col width="29%">
......
<table class="default nohover collapsable">
<table class="default collapsable">
<colgroup>
<col style="width: 70%">
<col style="width: 29%">
......
......@@ -19,7 +19,7 @@
<? $perm = MvvPerm::get($stgteilbezeichnung) ?>
<tbody id="<?= $stgteilbezeichnung->id ?>"
class="collapsed <?php if ($perm->haveFieldPerm('position')) echo 'sort_items'; ?>">
<tr class="header-row">
<tr class="header-row sort_item">
<td class="toggle-indicator">
<a class="mvv-load-in-new-row"
href="<?= $controller->url_for('/details/' . $stgteilbezeichnung->id) ?>">
......
......@@ -28,7 +28,7 @@
</tbody>
<? endforeach; ?>
<? if ($studiengang->typ === 'mehrfach' && MvvPerm::haveFieldPermStudiengangteil($studiengang, MvvPerm::PERM_CREATE)) : ?>
<tfoot>
<tbody>
<tr>
<td colspan="3">
<form style="width: 100%;"
......@@ -63,7 +63,7 @@
</form>
</td>
</tr>
</tfoot>
</tbody>
<? endif; ?>
</table>
</td>
......@@ -6,7 +6,7 @@
</colgroup>
<? foreach ($stgteile as $stgteil) : ?>
<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 class="actions">
<? if (MvvPerm::haveFieldPermStudiengangteil($studiengang, MvvPerm::PERM_CREATE)) : ?>
......@@ -48,7 +48,7 @@
</tbody>
<? endforeach; ?>
<? if (MvvPerm::haveFieldPermStudiengangteil($studiengang, MvvPerm::PERM_CREATE)) : ?>
<tfoot>
<tbody>
<tr>
<td colspan="2">
<form style="width: 100%;"
......@@ -80,7 +80,7 @@
</form>
</td>
</tr>
</tfoot>
</tbody>
<? endif; ?>
</table>
</td>
......
......@@ -7,7 +7,7 @@
<? foreach ($abschnitte as $abschnitt) : ?>
<tbody id="<?= $abschnitt->id ?>"
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">
<a class="mvv-load-in-new-row"
href="<?= $controller->url_for('/details_abschnitt/' . $abschnitt->id) ?>">
......@@ -53,7 +53,7 @@
TextHelper::reset_cycle(); ?>
<? if (count($version->abschnitte) > 0 && MvvPerm::haveFieldPermModul_zuordnungen('StgteilAbschnitt', MvvPerm::PERM_CREATE)
) : ?>
<tfoot>
<tbody>
<tr>
<td colspan="3">
<form class="mvv-qsform" action="<?= $controller->link_for('/add_modul/' . $version->id) ?>"
......@@ -83,7 +83,7 @@
</form>
</td>
</tr>
</tfoot>
</tbody>
<? endif; ?>
</table>
</td>
......@@ -8,7 +8,7 @@
</colgroup>
<? 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 ?>">
<tr id="modul_<?= $assignment->modul->id ?>" class="header-row">
<tr id="modul_<?= $assignment->modul->id ?>" class="header-row sort_item">
<td class="toggle-indicator">
<? if (count($assignment->modul->modulteile)) : ?>
<a class="mvv-load-in-new-row" href="<?= $controller->url_for('/modulteile', $assignment->id) ?>"><?= htmlReady($assignment->getDisplayName()) ?></a>
......@@ -50,7 +50,7 @@
</tbody>
<? endforeach; TextHelper::reset_cycle(); ?>
<? if (MvvPerm::haveFieldPermModul_zuordnungen($abschnitt, MvvPerm::PERM_CREATE)) : ?>
<tfoot>
<tbody>
<tr>
<td colspan="2">
<?= _('Modul hinzufügen') ?>
......@@ -68,7 +68,7 @@
); ?>
</td>
</tr>
</tfoot>
</tbody>
<? endif; ?>
</table>
</form>
......
......@@ -116,13 +116,13 @@ table {
}
> 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;
cursor: move;
padding-left: 10px;
}
&.empty > tr.header-row > td:first-child {
&:extend(& > tr.header-row > td:first-child);
&.empty > tr.sort_item > td:first-child {
&:extend(& > tr.sort_item > td:first-child);
padding-left: 30px;
}
}
......
......@@ -463,9 +463,6 @@ table.default {
}
}
> 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;
}
// Hover effect
......
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