Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #399: UI changes for optional content #400

Closed
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ <h4 class="sbchapter__item__title sbchapter__item__title text-left sb__ellipsis
attr.aria-pressed="{{activeContent?.sbUniqueIdentifier === content?.sbUniqueIdentifier}}" tabindex="0"
[ngClass]="{'active': activeContent?.sbUniqueIdentifier === content?.sbUniqueIdentifier}">

<div mat-line>{{content?.name}}</div>
<div mat-line>{{content?.relationalMetadata?.optional? "Addition Material: ":""}}{{content?.name}}</div>
<div mat-line *ngIf="content?.relationalMetadata?.optional" style="color: gray; font-size: smaller;"> This material is optional and will not impact your course progress% or final score</div>
<img width="32" height="32" [src]="content?.appIcon || fallbackImg" (error)="img.src = fallbackImg" alt="" #img />

</mat-list-item>
Expand Down Expand Up @@ -62,7 +63,8 @@ <h4 *ngIf="bestScoreLabel" class="sbchapter__item__score pr-8 ml-auto" title="{{
class="sb_success_check" alt="Complated Icon" mat-list-icon>
<img width="32" height="32" [src]="content?.appIcon || fallbackImg" (error)="img.src = fallbackImg"
alt="{{content?.name}} Image" #img mat-list-icon />
<div mat-line>{{content?.name}}</div>
<div mat-line>{{content?.relationalMetadata?.optional? "Addition Material: ":""}}{{content?.name}}</div>
<div mat-line *ngIf="content?.relationalMetadata?.optional" style="color: gray; font-size: smaller;"> This material is optional and will not impact your course progress% or final score</div>
<div mat-line *ngIf="bestScoreLabel">{{bestScoreLabel}}</div>
<button class="sbchapter__play__btn" *ngIf="!isTrackable(content) && playBtnConfig.show"
(click)="$event.stopImmediatePropagation(); $event.preventDefault(); onPlayButtonClick($event)" tabindex="0">
Expand Down Expand Up @@ -111,7 +113,8 @@ <h4 *ngIf="bestScoreLabel" class="sbchapter__item__score pr-8 ml-auto" title="{{
</i>
<img [src]="fallbackImg" width="32" height="32" *ngIf="!content?.appIcon" alt="image" #img />
</div>
<div mat-line>{{content?.name}}</div>
<div mat-line>{{content?.relationalMetadata?.optional? "Addition Material: ":""}}{{content?.name}}</div>
<div mat-line *ngIf="content?.relationalMetadata?.optional" style="color: gray; font-size: smaller;"> This material is optional and will not impact your course progress% or final score</div>
<div mat-line *ngIf="bestScoreLabel && displayScore">{{bestScoreLabel}}</div>

</mat-list-item>
Expand Down Expand Up @@ -163,7 +166,8 @@ <h4 *ngIf="bestScoreLabel" class="sbchapter__item__score pr-8 ml-auto" title="{{
</i>
<img [src]="fallbackImg" width="32" height="32" *ngIf="!content?.appIcon" alt="image" #img />
</div>
<div >{{content?.name}}</div>
<div mat-line>{{content?.relationalMetadata?.optional? "Addition Material: ":""}}{{content?.name}}</div>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Saurabhbalke why u have added this

{{content?.relationalMetadata?.optional? "Addition Material: ":""}}{{content?.name}}
two time {{}}
why we can use like this {{content?.relationalMetadata?.optional ? "Addition Material: " + content?.name : content?.name}}

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hi @princegupta1131
added req changes, Thanks !!

<div mat-line *ngIf="content?.relationalMetadata?.optional" style="color: gray; font-size: smaller;"> This material is optional and will not impact your course progress% or final score</div>
<div mat-line *ngIf="bestScoreLabel && displayScore">{{bestScoreLabel}}</div>
<button class="sbchapter__play__btn"
*ngIf="!(content?.contentData?.trackable?.enabled === 'Yes') && playBtnConfig.show"
Expand Down