Skip to content
Snippets Groups Projects
Commit ccbcc9c6 authored by Jan-Hendrik Willms's avatar Jan-Hendrik Willms
Browse files

fixes #3528

Closes #3528

Merge request studip/studip!2417
parent 56df1c1a
No related branches found
No related tags found
No related merge requests found
......@@ -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; ?>
......
......@@ -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 ?>
......
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment