MOBILE-3814 module: Improve module card additional info
parent
b5c0275a44
commit
1c9b196682
|
@ -4,7 +4,7 @@
|
|||
</ion-label>
|
||||
</ion-item-divider>
|
||||
<core-loading [hideUntil]="loaded" [fullscreen]="false">
|
||||
<ion-item class="ion-text-wrap item-media" *ngFor="let entry of entries" detail="true" button (click)="gotoCoureListModType(entry)">
|
||||
<ion-item class="ion-text-wrap" *ngFor="let entry of entries" detail="true" button (click)="gotoCoureListModType(entry)">
|
||||
<core-mod-icon slot="start" [modicon]="entry.icon" [modname]="entry.modName" [showAlt]="false">
|
||||
</core-mod-icon>
|
||||
<ion-label>{{ entry.name }}</ion-label>
|
||||
|
|
|
@ -14,8 +14,7 @@
|
|||
<div class="safe-area-pseudo-padding-start"></div>
|
||||
<div *ngFor="let item of items" class="core-horizontal-scroll-item">
|
||||
<ion-card>
|
||||
<ion-item class="core-course-module-handler item-media ion-text-wrap" detail="false" (click)="action($event, item)"
|
||||
button>
|
||||
<ion-item class="core-course-module-handler ion-text-wrap" detail="false" (click)="action($event, item)" button>
|
||||
<core-mod-icon slot="start" *ngIf="item.iconUrl" [modicon]="item.iconUrl" [modname]="item.modname"
|
||||
[componentId]="item.cmid" [showAlt]="false">
|
||||
</core-mod-icon>
|
||||
|
|
|
@ -114,8 +114,8 @@
|
|||
<p *ngIf="competency.coursemodules.length == 0">
|
||||
{{ 'addon.competency.noactivities' | translate }}
|
||||
</p>
|
||||
<ion-item class="ion-text-wrap core-course-module-handler item-media" [attr.aria-label]="activity.name"
|
||||
core-link *ngFor="let activity of competency.coursemodules" [href]="activity.url" capture="true">
|
||||
<ion-item class="ion-text-wrap core-course-module-handler" [attr.aria-label]="activity.name" core-link
|
||||
*ngFor="let activity of competency.coursemodules" [href]="activity.url" capture="true">
|
||||
<core-mod-icon slot="start" [modicon]="activity.iconurl" [showAlt]="false" *ngIf="activity.iconurl">
|
||||
</core-mod-icon>
|
||||
<ion-label>
|
||||
|
|
|
@ -211,6 +211,7 @@ export class CoreCollapsibleHeaderDirective implements OnDestroy {
|
|||
parseInt(getComputedStyle(this.contentH1.parentElement).marginTop || '0', 10)) + 'px',
|
||||
);
|
||||
this.contentH1.style.setProperty('position', 'absolute');
|
||||
this.contentH1.parentElement.style.setProperty('position', 'relative');
|
||||
|
||||
this.setupContent();
|
||||
}
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
<ion-item id="core-course-module-{{module.id}}" detail="false"
|
||||
class="ion-text-wrap core-course-module-handler core-module-main-item {{module.handlerData.class}}"
|
||||
(click)="moduleClicked($event)" [attr.aria-label]="module.handlerData.a11yTitle" [ngClass]="{
|
||||
'item-media': module.handlerData.icon,
|
||||
'item-dimmed': module.visible === 0 || module.uservisible === false
|
||||
}" [button]="module.handlerData.action && module.uservisible">
|
||||
|
||||
|
@ -16,6 +15,8 @@
|
|||
<core-format-text [text]="module.handlerData.title" contextLevel="module" [contextInstanceId]="module.id"
|
||||
[courseId]="module.course" [attr.aria-label]="module.handlerData.a11yTitle + ', ' + modNameTranslated">
|
||||
</core-format-text>
|
||||
<ion-icon name="fas-lock" *ngIf="module.visible === 0 || module.uservisible === false"
|
||||
[attr.aria-label]="'core.restricted' | translate"></ion-icon>
|
||||
</p>
|
||||
|
||||
<div class="core-module-additional-info">
|
||||
|
@ -31,7 +32,7 @@
|
|||
</ion-chip>
|
||||
|
||||
<!-- Hidden badges -->
|
||||
<ion-badge color="warning" *ngIf="module.visible === 0 && (!section || section.visible)">
|
||||
<ion-badge color="warning" *ngIf="module.visible === 0">
|
||||
{{ 'core.course.hiddenfromstudents' | translate }}
|
||||
</ion-badge>
|
||||
<ion-badge color="warning" *ngIf="module.visible !== 0 && module.isStealth">
|
||||
|
@ -60,7 +61,6 @@
|
|||
</ion-item>
|
||||
<ion-item *ngIf="hasInfo" id="core-course-module-{{module.id}}-info" detail="false"
|
||||
class="ion-text-wrap core-course-module-handler core-course-module-info {{module.handlerData.class}}" [ngClass]="{
|
||||
'item-media': module.handlerData.icon,
|
||||
'item-dimmed': module.visible === 0 || module.uservisible === false
|
||||
}">
|
||||
<ion-label collapsible-item>
|
||||
|
|
|
@ -11,6 +11,10 @@
|
|||
ion-item.core-module-main-item {
|
||||
--min-height: 52px;
|
||||
|
||||
.core-module-title .item-heading ion-icon {
|
||||
@include margin-horizontal(8px, null);
|
||||
}
|
||||
|
||||
.core-module-buttons,
|
||||
.buttons.core-module-buttons {
|
||||
margin: 0;
|
||||
|
@ -39,6 +43,7 @@
|
|||
.core-module-additional-info {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
@import '~theme/globals.scss';
|
||||
|
||||
:host {
|
||||
.core-format-progress-list {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.core-course-thumb {
|
||||
height: var(--core-courseimage-on-course-size);
|
||||
min-height: var(--core-courseimage-on-course-size);
|
||||
|
@ -9,9 +13,9 @@
|
|||
--border-radius: var(--core-courseimage-radius);
|
||||
}
|
||||
|
||||
@if ($core-show-courseimage-on-course) {
|
||||
@if ($core-hide-courseimage-on-course) {
|
||||
.core-course-thumb {
|
||||
display: block;
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -90,7 +90,7 @@ $core-dashboard-logo: false !default;
|
|||
$core-always-show-main-menu: false !default;
|
||||
$core-format-text-never-shorten: false !default;
|
||||
|
||||
$core-show-courseimage-on-course: false !default;
|
||||
$core-hide-courseimage-on-course: false !default;
|
||||
$core-hide-progress-on-course: false !default;
|
||||
$core-hide-progress-on-section-selector: false !default;
|
||||
|
||||
|
|
Loading…
Reference in New Issue