Merge pull request #3065 from crazyserver/MOBILE-3881

MOBILE-3881 timeline: Improve multiple lines on activity string
main
Dani Palou 2022-01-21 16:26:27 +01:00 committed by GitHub
commit 4bb3a81a26
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 35 additions and 9 deletions

View File

@ -33,21 +33,24 @@
<ion-badge *ngIf="event.overdue" color="danger">{{ 'addon.block_timeline.overdue' | translate }}
</ion-badge>
</p>
<p *ngIf="(showCourse && event.course) || event.activitystr">
<p *ngIf="(showCourse && event.course) || event.activitystr"
class="addon-block-timeline-activity-course-activity">
<span *ngIf="showCourse && event.course">
<core-format-text [text]="event.course.fullnamedisplay" contextLevel="course"
[contextInstanceId]="event.course.id">
</core-format-text> ·
</core-format-text>
</span>
<span *ngIf="event.activitystr">
<core-format-text *ngIf="event.activitystr" [text]="event.activitystr" contextLevel="module"
[contextInstanceId]="event.id">
</core-format-text>
</span>
<core-format-text [text]="event.activitystr" contextLevel="module" [contextInstanceId]="event.id">
</core-format-text>
</p>
</ion-col>
</ion-row>
</ion-col>
<ion-col class="addon-block-timeline-activity-action ion-no-padding">
<ion-button fill="clear" (click)="action($event, event.action.url)" [title]="event.action.name"
[disabled]="!event.action.actionable" *ngIf="event.action">
<ion-col class="addon-block-timeline-activity-action ion-no-padding" *ngIf="event.action?.actionable">
<ion-button fill="clear" (click)="action($event, event.action.url)" [title]="event.action.name">
{{event.action.name}}
<ion-badge slot="end" class="ion-margin-start" *ngIf="event.action.showitemcount">
{{event.action.itemcount}}

View File

@ -22,11 +22,34 @@ h4.core-bold {
--margin-vertical: 0;
}
.addon-block-timeline-activity-time,
.addon-block-timeline-activity-action {
.addon-block-timeline-activity-time {
flex-grow: 0;
}
.addon-block-timeline-activity-action {
display: flex;
justify-content: flex-end;
}
.addon-block-timeline-activity-course-activity {
display: flex;
flex-wrap: wrap;
span {
overflow: hidden;
text-overflow: ellipsis;
}
span::after {
content: "·";
display: inline;
padding-left: .3rem;
padding-right: .3rem;
}
span:last-child::after {
display: none;
}
}
.addon-block-timeline-activity-main,
.addon-block-timeline-activity-name {
flex-grow: 1;