Skip to content

Commit 6e2c3e4

Browse files
committed
MOBILE-4616 course: Show availability section info in collapsed content
1 parent 258650a commit 6e2c3e4

File tree

2 files changed

+24
-9
lines changed

2 files changed

+24
-9
lines changed

src/core/features/course/components/course-section/course-section.html

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,11 @@
2222
<ion-label class="ion-text-wrap">
2323
<h2 *ngIf="section.name" class="big" [id]="'core-section-name-' + section.id">
2424
<core-format-text [text]="section.name" contextLevel="course" [contextInstanceId]="course.id" />
25+
<ion-icon *ngIf="section.availabilityinfo" name="fas-lock" [attr.aria-label]="'core.restricted' | translate" />
2526
</h2>
2627
<div *ngIf="section.visible === 0 && section.uservisible !== false">
27-
<ion-badge color="warning">
28+
<ion-badge color="secondary" class="ion-text-wrap">
29+
<ion-icon name="far-eye-slash" aria-hidden="true" />
2830
{{ 'core.course.hiddenfromstudents' | translate }}
2931
</ion-badge>
3032
</div>
@@ -33,20 +35,22 @@ <h2 *ngIf="section.name" class="big" [id]="'core-section-name-' + section.id">
3335
{{ 'core.notavailable' | translate }}
3436
</ion-badge>
3537
</div>
36-
<div *ngIf="section.availabilityinfo">
37-
<ion-chip class="clickable">
38-
<ion-icon name="fas-lock" [attr.aria-label]="'core.restricted' | translate" />
39-
<ion-label>
40-
<core-format-text [text]=" section.availabilityinfo" contextLevel="course" [contextInstanceId]="course.id" />
41-
</ion-label>
42-
</ion-chip>
43-
</div>
4438
</ion-label>
4539
<ion-badge *ngIf="section.highlighted && highlightedName" slot="end">{{highlightedName}}</ion-badge>
4640
</ion-item>
4741
</ng-template>
4842

4943
<ng-template #sectionContent>
44+
<ion-item class="ion-text-wrap section-summary" *ngIf="section.availabilityinfo">
45+
<ion-label>
46+
<ion-chip>
47+
<ion-icon name="fas-lock" [attr.aria-label]="'core.restricted' | translate" />
48+
<ion-label>
49+
<core-format-text [text]="section.availabilityinfo" contextLevel="course" [contextInstanceId]="course.id" />
50+
</ion-label>
51+
</ion-chip>
52+
</ion-label>
53+
</ion-item>
5054
<ion-item class="ion-text-wrap section-summary" *ngIf="section.summary">
5155
<ion-label>
5256
<core-format-text [text]="section.summary" contextLevel="course" [contextInstanceId]="course.id" />

src/core/features/course/components/course-section/course-section.scss

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,17 @@
1+
@use "theme/globals" as *;
2+
13
:host {
24
.course-section {
35
--inner-padding-end: var(--mdl-spacing-3);
6+
7+
ion-badge {
8+
@include margin-horizontal(null, 4px);
9+
font: var(--mdl-typography-body-font-sm);
10+
}
11+
12+
h2 ion-icon {
13+
@include margin-horizontal(4px, null);
14+
}
415
}
516

617
&.collapsible {

0 commit comments

Comments
 (0)