diff --git a/app/views/course/dates/details-edit.php b/app/views/course/dates/details-edit.php index 8991002e5af4b909a2f0885b97588c295e03a81a..2fec69cb07be8a5072abc8914be2d899cfe448f9 100644 --- a/app/views/course/dates/details-edit.php +++ b/app/views/course/dates/details-edit.php @@ -39,101 +39,105 @@ </fieldset> <? if (count($teachers) > 1): ?> - <fieldset class="studip-selection <?= $metadata_locked ? 'disabled' : ''?>" data-attribute-name="assigned_teachers"> + <fieldset> <legend><?= _('Durchführende Lehrende') ?></legend> - <section class="studip-selection-selected"> - <h2><?= _('Zugewiesene Lehrende') ?></h2> - - <ul> - <? foreach ($assigned_teachers as $teacher): ?> - <li data-selection-id="<?= htmlReady($teacher->user_id) ?>"> - <input type="hidden" name="assigned_teachers[]" - value="<?= htmlReady($teacher->user_id) ?>"> - - <span class="studip-selection-image"> - <?= Avatar::getAvatar($teacher->user_id)->getImageTag(Avatar::SMALL) ?> - </span> - <span class="studip-selection-label"> - <?= htmlReady($teacher->getFullname()) ?> - </span> - </li> + <div class="studip-selection <?= $metadata_locked ? 'disabled' : ''?>" data-attribute-name="assigned_teachers"> + <section class="studip-selection-selected"> + <h2><?= _('Zugewiesene Lehrende') ?></h2> + + <ul> + <? foreach ($assigned_teachers as $teacher): ?> + <li data-selection-id="<?= htmlReady($teacher->user_id) ?>"> + <input type="hidden" name="assigned_teachers[]" + value="<?= htmlReady($teacher->user_id) ?>"> + + <span class="studip-selection-image"> + <?= Avatar::getAvatar($teacher->user_id)->getImageTag(Avatar::SMALL) ?> + </span> + <span class="studip-selection-label"> + <?= htmlReady($teacher->getFullname()) ?> + </span> + </li> + <? endforeach; ?> + <li class="empty-placeholder"> + <?= _('Kein spezieller Lehrender zugewiesen') ?> + </li> + </ul> + </section> + + <section class="studip-selection-selectable"> + <h2><?= _('Lehrende der Veranstaltung') ?></h2> + + <ul> + <? foreach ($teachers as $teacher): ?> + <? if (!$assigned_teachers->find($teacher->user_id)): ?> + <li data-selection-id="<?= htmlReady($teacher->id) ?>" > + <span class="studip-selection-image"> + <?= Avatar::getAvatar($teacher->id)->getImageTag(Avatar::SMALL) ?> + </span> + <span class="studip-selection-label"> + <?= htmlReady($teacher->getFullname()) ?> + </span> + </li> + <? endif; ?> <? endforeach; ?> - <li class="empty-placeholder"> - <?= _('Kein spezieller Lehrender zugewiesen') ?> - </li> - </ul> - </section> - - <section class="studip-selection-selectable"> - <h2><?= _('Lehrende der Veranstaltung') ?></h2> - - <ul> - <? foreach ($teachers as $teacher): ?> - <? if (!$assigned_teachers->find($teacher->user_id)): ?> - <li data-selection-id="<?= htmlReady($teacher->id) ?>" > - <span class="studip-selection-image"> - <?= Avatar::getAvatar($teacher->id)->getImageTag(Avatar::SMALL) ?> - </span> - <span class="studip-selection-label"> - <?= htmlReady($teacher->getFullname()) ?> - </span> - </li> - <? endif; ?> - <? endforeach; ?> - <li class="empty-placeholder"> - <?= sprintf( - _('Ihre Auswahl entspricht dem Zustand "%s" und wird beim Speichern zurückgesetzt'), - _('Kein spezieller Lehrender zugewiesen') - ) ?> - </li> - </ul> - </section> + <li class="empty-placeholder"> + <?= sprintf( + _('Ihre Auswahl entspricht dem Zustand "%s" und wird beim Speichern zurückgesetzt'), + _('Kein spezieller Lehrender zugewiesen') + ) ?> + </li> + </ul> + </section> + </div> </fieldset> <? endif; ?> <? if (count($groups) > 0): ?> - <fieldset class="studip-selection <?= $metadata_locked ? 'disabled' : ''?>" data-attribute-name="assigned_groups"> + <fieldset> <legend><?= _('Beteiligte Gruppen') ?></legend> - <section class="studip-selection-selected"> - <h2><?= _('Zugewiesene Gruppen') ?></h2> - - <ul> - <? foreach ($assigned_groups as $group) : ?> - <li data-selection-id="<?= htmlReady($group->id) ?>"> - <input type="hidden" name="assigned_groups[]" - value="<?= htmlReady($group->id) ?>"> - - <span class="studip-selection-label"> - <?= htmlReady($group->name) ?> - </span> - </li> - <? endforeach ?> - <li class="empty-placeholder"> - <?= _('Keine spezielle Gruppe zugewiesen') ?> - </li> - </ul> - </section> - - <section class="studip-selection-selectable"> - <h2><?= _('Gruppen der Veranstaltung') ?></h2> - - <ul> - <? foreach ($groups as $group): ?> - <? if (!$assigned_groups->find($group->id)): ?> - <li data-selection-id="<?= htmlReady($group->id) ?>" > - <span class="studip-selection-label"> - <?= htmlReady($group->name) ?> - </span> - </li> - <? endif; ?> - <? endforeach; ?> - <li class="empty-placeholder"> - <?= _('Alle Gruppen wurden dem Termin zugewiesen') ?> - </li> - </ul> - </section> + <div class="studip-selection <?= $metadata_locked ? 'disabled' : ''?>" data-attribute-name="assigned_groups"> + <section class="studip-selection-selected"> + <h2><?= _('Zugewiesene Gruppen') ?></h2> + + <ul> + <? foreach ($assigned_groups as $group) : ?> + <li data-selection-id="<?= htmlReady($group->id) ?>"> + <input type="hidden" name="assigned_groups[]" + value="<?= htmlReady($group->id) ?>"> + + <span class="studip-selection-label"> + <?= htmlReady($group->name) ?> + </span> + </li> + <? endforeach ?> + <li class="empty-placeholder"> + <?= _('Keine spezielle Gruppe zugewiesen') ?> + </li> + </ul> + </section> + + <section class="studip-selection-selectable"> + <h2><?= _('Gruppen der Veranstaltung') ?></h2> + + <ul> + <? foreach ($groups as $group): ?> + <? if (!$assigned_groups->find($group->id)): ?> + <li data-selection-id="<?= htmlReady($group->id) ?>" > + <span class="studip-selection-label"> + <?= htmlReady($group->name) ?> + </span> + </li> + <? endif; ?> + <? endforeach; ?> + <li class="empty-placeholder"> + <?= _('Alle Gruppen wurden dem Termin zugewiesen') ?> + </li> + </ul> + </section> + </div> </fieldset> <? endif; ?> diff --git a/app/views/course/timesrooms/editDate.php b/app/views/course/timesrooms/editDate.php index 695559ab91445d3ddafbd3e60996a43e54efa015..13a699ada9b3dac2528d9f4c2ee0d7b4dfe3cae1 100644 --- a/app/views/course/timesrooms/editDate.php +++ b/app/views/course/timesrooms/editDate.php @@ -114,96 +114,101 @@ </fieldset> <? if (count($teachers) > 1): ?> - <fieldset class="collapsed studip-selection" data-attribute-name="assigned_teachers"> + <fieldset class="collapsed"> <legend><?= _('Durchführende Lehrende') ?></legend> - <section class="studip-selection-selected"> - <p><strong><?= _('Zugewiesene Lehrende') ?></strong></p> - <ul> - <? foreach ($assigned_teachers as $teacher): ?> - <li data-selection-id="<?= htmlReady($teacher->user_id) ?>"> - <input type="hidden" name="assigned_teachers[]" - value="<?= htmlReady($teacher->user_id) ?>"> + <div class="studip-selection" data-attribute-name="assigned_teachers"> + <section class="studip-selection-selected"> + <p><strong><?= _('Zugewiesene Lehrende') ?></strong></p> + <ul> + <? foreach ($assigned_teachers as $teacher): ?> + <li data-selection-id="<?= htmlReady($teacher->user_id) ?>"> + <input type="hidden" name="assigned_teachers[]" + value="<?= htmlReady($teacher->user_id) ?>"> - <span class="studip-selection-image"> - <?= Avatar::getAvatar($teacher->user_id)->getImageTag(Avatar::SMALL) ?> - </span> - <span class="studip-selection-label"> - <?= htmlReady($teacher->getFullname()) ?> - </span> - </li> - <? endforeach ?> - <li class="empty-placeholder"> - <?= _('Kein spezieller Lehrender zugewiesen') ?> - </li> - </ul> - </section> - - <section class="studip-selection-selectable"> - <p><strong><?= _('Lehrende der Veranstaltung') ?></strong></p> - <ul> - <? foreach ($teachers as $teacher): ?> - <? if (!$assigned_teachers->find($teacher->user_id)): ?> - <li data-selection-id="<?= htmlReady($teacher->user_id) ?>" > <span class="studip-selection-image"> <?= Avatar::getAvatar($teacher->user_id)->getImageTag(Avatar::SMALL) ?> </span> <span class="studip-selection-label"> - <?= htmlReady($teacher->getUserFullname()) ?> + <?= htmlReady($teacher->getFullname()) ?> </span> </li> - <? endif ?> - <? endforeach ?> - <li class="empty-placeholder"> - <?= sprintf( - _('Ihre Auswahl entspricht dem Zustand "%s" und wird beim Speichern zurückgesetzt'), - _('Kein spezieller Lehrender zugewiesen') - ) ?> - </li> - </ul> - </section> + <? endforeach ?> + <li class="empty-placeholder"> + <?= _('Kein spezieller Lehrender zugewiesen') ?> + </li> + </ul> + </section> + + <section class="studip-selection-selectable"> + <p><strong><?= _('Lehrende der Veranstaltung') ?></strong></p> + <ul> + <? foreach ($teachers as $teacher): ?> + <? if (!$assigned_teachers->find($teacher->user_id)): ?> + <li data-selection-id="<?= htmlReady($teacher->user_id) ?>" > + <span class="studip-selection-image"> + <?= Avatar::getAvatar($teacher->user_id)->getImageTag(Avatar::SMALL) ?> + </span> + <span class="studip-selection-label"> + <?= htmlReady($teacher->getUserFullname()) ?> + </span> + </li> + <? endif ?> + <? endforeach ?> + <li class="empty-placeholder"> + <?= sprintf( + _('Ihre Auswahl entspricht dem Zustand "%s" und wird beim Speichern zurückgesetzt'), + _('Kein spezieller Lehrender zugewiesen') + ) ?> + </li> + </ul> + </section> + </div> </fieldset> <? endif ?> <? if (count($groups) > 0): ?> - <fieldset class="collapsed studip-selection" data-attribute-name="assigned_groups"> + <fieldset class="collapsed"> <legend><?= _('Beteiligte Gruppen') ?></legend> - <section class="studip-selection-selected"> - <p><strong><?= _('Zugewiesene Gruppen') ?></strong></p> - <ul> - <? foreach ($assigned_groups as $group) : ?> - <li data-selection-id="<?= htmlReady($group->id) ?>"> - <input type="hidden" name="assigned_groups[]" - value="<?= htmlReady($group->id) ?>"> - <span class="studip-selection-label"> - <?= htmlReady($group->name) ?> - </span> - </li> - <? endforeach ?> - <li class="empty-placeholder"> - <?= _('Keine spezielle Gruppe zugewiesen') ?> - </li> - </ul> - </section> + <div class="studip-selection" data-attribute-name="assigned-groups"> + <section class="studip-selection-selected"> + <p><strong><?= _('Zugewiesene Gruppen') ?></strong></p> + <ul> + <? foreach ($assigned_groups as $group) : ?> + <li data-selection-id="<?= htmlReady($group->id) ?>"> + <input type="hidden" name="assigned_groups[]" + value="<?= htmlReady($group->id) ?>"> - <section class="studip-selection-selectable"> - <p><strong><?= _('Gruppen der Veranstaltung') ?></strong></p> - <ul> - <? foreach ($groups as $group): ?> - <? if (!$assigned_groups->find($group->id)): ?> - <li data-selection-id="<?= htmlReady($group->id) ?>" > <span class="studip-selection-label"> <?= htmlReady($group->name) ?> </span> </li> - <? endif ?> - <? endforeach ?> - <li class="empty-placeholder"> - <?= _('Alle Gruppen wurden dem Termin zugewiesen') ?> - </li> - </ul> - </section> + <? endforeach ?> + <li class="empty-placeholder"> + <?= _('Keine spezielle Gruppe zugewiesen') ?> + </li> + </ul> + </section> + + <section class="studip-selection-selectable"> + <p><strong><?= _('Gruppen der Veranstaltung') ?></strong></p> + <ul> + <? foreach ($groups as $group): ?> + <? if (!$assigned_groups->find($group->id)): ?> + <li data-selection-id="<?= htmlReady($group->id) ?>" > + <span class="studip-selection-label"> + <?= htmlReady($group->name) ?> + </span> + </li> + <? endif ?> + <? endforeach ?> + <li class="empty-placeholder"> + <?= _('Alle Gruppen wurden dem Termin zugewiesen') ?> + </li> + </ul> + </section> + </div> </fieldset> <? endif ?> diff --git a/resources/assets/stylesheets/scss/studip-selection.scss b/resources/assets/stylesheets/scss/studip-selection.scss index 615c53308995942972dce63bd0a65beaf681ff84..a2bbcc71371bc8f8a8dd7a8d0cef6c7123740bce 100644 --- a/resources/assets/stylesheets/scss/studip-selection.scss +++ b/resources/assets/stylesheets/scss/studip-selection.scss @@ -3,14 +3,6 @@ flex-direction: row; flex-wrap: wrap; - > * { - flex: 1 0 100%; - } - - > legend { - margin-bottom: 0 !important; - } - // General list item styles and placeholders ul, li { list-style: none;