Skip to content

Commit 05b5990

Browse files
moved learners to same column as learner groups and changed column header; only show learners if exist
1 parent 321d95b commit 05b5990

8 files changed

Lines changed: 63 additions & 65 deletions

File tree

packages/ilios-common/addon/components/offering-manager.gjs

Lines changed: 57 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -157,62 +157,66 @@ export default class OfferingManagerComponent extends Component {
157157
@scrollToBottom={{false}}
158158
/>
159159
{{else}}
160-
<div class="offering-manager-learners">
161-
<FadeText
162-
@text={{this.sortedIndividualLearners}}
163-
@forceExpanded={{@fadeTextExpanded}}
164-
@setExpanded={{@setFadeTextExpanded}}
165-
as |ft|
166-
>
167-
{{#if this.individualLearners.length}}
168-
<strong>({{this.individualLearners.length}})</strong>
169-
{{/if}}
170-
{{ft.text}}
171-
{{ft.controls}}
172-
</FadeText>
173-
</div>
174-
<div class="offering-manager-learner-groups">
175-
<ul>
176-
{{#each this.sortedLearnerGroups as |learnerGroup|}}
177-
<li
178-
{{this.setLearnerGroupElement learnerGroup.id}}
179-
{{mouseHoverToggle (fn this.toggleHover learnerGroup.id)}}
160+
<div class="offering-manager-learners-and-learner-groups">
161+
{{#if this.sortedIndividualLearners.length}}
162+
<div class="offering-manager-learners">
163+
<FadeText
164+
@text={{this.sortedIndividualLearners}}
165+
@forceExpanded={{@fadeTextExpanded}}
166+
@setExpanded={{@setFadeTextExpanded}}
167+
as |ft|
180168
>
181-
{{learnerGroup.title}}
182-
{{#if learnerGroup.needsAccommodation}}
183-
<FaIcon
184-
@icon="universal-access"
185-
@title={{t "general.accommodationIsRequiredForLearnersInThisGroup"}}
186-
/>
169+
{{#if this.individualLearners.length}}
170+
<strong>({{this.individualLearners.length}})</strong>
187171
{{/if}}
188-
{{#unless learnerGroup.isTopLevelGroup}}
189-
{{#if
190-
(and
191-
(get this (concat "learnerGroupElement" learnerGroup.id))
192-
(includes learnerGroup.id this.hoveredGroups)
193-
)
194-
}}
195-
<IliosTooltip
196-
@target={{get this (concat "learnerGroupElement" learnerGroup.id)}}
197-
>
198-
<strong>
199-
{{if
200-
(eq learnerGroup.allParents.length 1)
201-
(t "general.parentGroup")
202-
(t "general.parentGroups")
203-
}}:
204-
</strong>
205-
{{join " » " (reverse (mapBy0 "title" learnerGroup.allParents))}}
206-
</IliosTooltip>
172+
{{ft.text}}
173+
{{ft.controls}}
174+
</FadeText>
175+
</div>
176+
{{/if}}
177+
<div class="offering-manager-learner-groups">
178+
<ul>
179+
{{#each this.sortedLearnerGroups as |learnerGroup|}}
180+
<li
181+
{{this.setLearnerGroupElement learnerGroup.id}}
182+
{{mouseHoverToggle (fn this.toggleHover learnerGroup.id)}}
183+
>
184+
{{learnerGroup.title}}
185+
{{#if learnerGroup.needsAccommodation}}
186+
<FaIcon
187+
@icon="universal-access"
188+
@title={{t "general.accommodationIsRequiredForLearnersInThisGroup"}}
189+
/>
207190
{{/if}}
208-
{{/unless}}
209-
</li>
210-
{{else}}
211-
<li>
212-
<FaIcon @icon="users" />
213-
</li>
214-
{{/each}}
215-
</ul>
191+
{{#unless learnerGroup.isTopLevelGroup}}
192+
{{#if
193+
(and
194+
(get this (concat "learnerGroupElement" learnerGroup.id))
195+
(includes learnerGroup.id this.hoveredGroups)
196+
)
197+
}}
198+
<IliosTooltip
199+
@target={{get this (concat "learnerGroupElement" learnerGroup.id)}}
200+
>
201+
<strong>
202+
{{if
203+
(eq learnerGroup.allParents.length 1)
204+
(t "general.parentGroup")
205+
(t "general.parentGroups")
206+
}}:
207+
</strong>
208+
{{join " » " (reverse (mapBy0 "title" learnerGroup.allParents))}}
209+
</IliosTooltip>
210+
{{/if}}
211+
{{/unless}}
212+
</li>
213+
{{else}}
214+
<li>
215+
<FaIcon @icon="users" />
216+
</li>
217+
{{/each}}
218+
</ul>
219+
</div>
216220
</div>
217221
<div class="offering-manager-location">
218222
<TruncateText @text={{@offering.room}} @length={{10}} data-test-location />

packages/ilios-common/addon/components/session-offerings.gjs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,7 @@ export default class SessionOfferingsComponent extends Component {
5858
{{t "general.dateTime"}}
5959
</div>
6060
<div>
61-
{{t "general.individualLearners"}}
62-
</div>
63-
<div>
64-
{{t "general.learnerGroups"}}
61+
{{t "general.learnersAndLearnerGroups"}}
6562
</div>
6663
<div>
6764
{{t "general.location"}}

packages/ilios-common/app/styles/ilios-common/components/offering-manager.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
.offering-manager {
44
@include m.font-size("small");
55
display: grid;
6-
grid-template-columns: repeat(5, 1fr);
6+
grid-template-columns: repeat(3, 2fr) 1fr;
77
margin-bottom: 0.5rem;
88
padding-bottom: 0.5rem;
99

1010
.offering-manager-learners {
11-
padding-right: 1rem;
11+
padding: 0 1rem 1rem 0;
1212
}
1313

1414
.offering-manager-learner-groups {

packages/ilios-common/app/styles/ilios-common/components/session-offerings-list.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
.offering-block {
77
display: grid;
8-
grid-template-columns: repeat(5, 1fr);
8+
grid-template-columns: 1.5fr repeat(3, 2fr) 1fr;
99
margin-top: 1rem;
1010

1111
.offering-form {
@@ -32,7 +32,7 @@
3232
border-bottom: 1px dotted var(--grey);
3333
display: grid;
3434
grid-column: 1 / -1;
35-
grid-template-columns: repeat(6, 1fr);
35+
grid-template-columns: 1.5fr repeat(3, 2fr) 1fr;
3636
margin-top: 1rem;
3737

3838
.offering-block-time-time {

packages/ilios-common/app/styles/ilios-common/components/session-offerings.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
background-color: var(--lightest-grey);
2828
display: grid;
2929
font-weight: 600;
30-
grid-template-columns: repeat(6, 1fr);
30+
grid-template-columns: 1.5fr repeat(3, 2fr) 1fr;
3131

3232
div {
3333
background-color: var(--blue);

packages/ilios-common/translations/en-us.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,6 @@ general:
190190
superscript: Superscript
191191
undo: Undo (⌘Z)
192192
icsInstructions: "To add your Ilios calendar to another application or service, use this URL. This URL is like a password. Anyone who knows it can view your calendar!"
193-
individualLearners: Individual Learners
194193
ilios: Ilios
195194
iliosUserGuide: Ilios User Guide
196195
ilm: ILM

packages/ilios-common/translations/es.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,6 @@ general:
190190
superscript: Sobrescrita
191191
undo: Deshacer (⌘Z)
192192
icsInstructions: "Para agregar tu calendario a otra aplicación o servicio, utiliza esta URL. Esta URL es como una contraseña. ¡Cualquiera persona que la sepa puede ver tu calendario!"
193-
individualLearners: Aprendedores Individuales
194193
ilios: Ilios
195194
iliosUserGuide: Ilios Guía de usuario
196195
ilm: ILM

packages/ilios-common/translations/fr.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,6 @@ general:
191191
superscript: Exposante
192192
undo: Annuler (⌘Z)
193193
icsInstructions: "Pour ajouter votre calendrier à des services ou applications autre, utilisez cette URL. Cette URL comme un mot de passe. Toutes les personnes qui le connaissent pouvez voir votre calendrier!"
194-
individualLearners: Étudiants Individuels
195194
ilios: Ilios
196195
iliosUserGuide: Ilios Guide d'utilisation
197196
ilm: ILM

0 commit comments

Comments
 (0)