Skip to content

Commit

Permalink
courses: smoother titles (fixes #7664) (#7922)
Browse files Browse the repository at this point in the history
Co-authored-by: dogi <[email protected]>
  • Loading branch information
jessewashburn and dogi authored Dec 12, 2024
1 parent 297cd4d commit ea37462
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "planet",
"license": "AGPL-3.0",
"version": "0.15.97",
"version": "0.15.98",
"myplanet": {
"latest": "v0.21.34",
"min": "v0.20.34"
"latest": "v0.21.35",
"min": "v0.20.35"
},
"scripts": {
"ng": "ng",
Expand Down
5 changes: 3 additions & 2 deletions src/app/courses/courses.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,9 @@ <h3 class="header">
</ng-container>
<ng-container *ngTemplateOutlet="headerText"></ng-container>
<ng-template #headerText>
<a *ngIf="!isDialog && !isForm; else newTabLink" [routerLink]="['view', element._id]">{{ element.doc.courseTitle.length > 180 ? element.doc.courseTitle.slice(0, 180) + '...' : element.doc.courseTitle }}</a>
<ng-template #newTabLink><a class="cursor-pointer" (click)="openCourseViewDialog(element._id)">{{ element.doc.courseTitle.length > 180 ? element.doc.courseTitle.slice(0, 180) + '...' : element.doc.courseTitle }}</a></ng-template>
<a *ngIf="!isDialog && !isForm; else newTabLink" [routerLink]="['view', element._id]" class="break-word">{{ element.doc.courseTitle.length > 180 ? element.doc.courseTitle.slice(0, 180) + '...' : element.doc.courseTitle }}</a>
<ng-template #newTabLink><a class="cursor-pointer break-word" (click)="openCourseViewDialog(element._id)">{{ element.doc.courseTitle.length > 180 ? element.doc.courseTitle.slice(0, 180) + '...' : element.doc.courseTitle }}</a>
</ng-template>
<span *ngIf="!parent && !isDialog" [ngClass]="{ 'cursor-pointer': !isForm }">
<mat-icon class="margin-lr-3" i18n-matTooltip matTooltip="In myCourses" [inline]="true" *ngIf="element.admission" (click)="courseToggle(element._id, 'resign')">bookmark</mat-icon>
<mat-icon class="margin-lr-3" i18n-matTooltip matTooltip="Not in myCourses" [inline]="true" *ngIf="!element.admission && element.doc.steps.length" (click)="courseToggle(element._id, 'admission')">bookmark_border</mat-icon>
Expand Down
4 changes: 4 additions & 0 deletions src/app/courses/courses.scss
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ $label-height: 1rem;
height: $toolbar-height;
}

.break-word {
word-break: break-word;
}

@media(max-width: $screen-md) {
.mat-column-info {
max-width: 120px;
Expand Down

0 comments on commit ea37462

Please sign in to comment.