Skip to content

Commit 976de68

Browse files
authored
Merge pull request #4147 from alfonso-salces/MOBILE-4070
MOBILE-4070 attachments: Collapse mimetypes
2 parents 297cb57 + aa1bd53 commit 976de68

File tree

2 files changed

+35
-8
lines changed

2 files changed

+35
-8
lines changed
Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1-
core-loading {
2-
--loading-inline-min-height: 60px;
1+
@use "theme/globals" as *;
2+
3+
:host {
4+
core-loading {
5+
--loading-inline-min-height: 60px;
6+
}
7+
8+
.core-attachments {
9+
@include margin-horizontal(null, var(--mdl-spacing-3));
10+
11+
&-header {
12+
ion-icon {
13+
@include margin-horizontal(null, var(--mdl-spacing-3));
14+
font-size: var(--mdl-typography-icon-fontSize-sm);
15+
}
16+
}
17+
}
318
}

src/core/components/attachments/core-attachments.html

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,28 @@
1313
<ion-icon name="fas-plus" slot="icon-only" aria-hidden="true" />
1414
</ion-button>
1515
</ion-item>
16-
<ion-item class="ion-text-wrap" *ngIf="fileTypes && fileTypes.mimetypes && fileTypes.mimetypes.length">
17-
<ion-label>
18-
<p>{{ 'core.fileuploader.filesofthesetypes' | translate }}</p>
19-
<ul class="list-with-style">
16+
17+
@if (fileTypes && fileTypes.mimetypes && fileTypes.mimetypes.length) {
18+
<ion-accordion-group>
19+
<ion-accordion toggleIconSlot="start">
20+
<ion-item class="core-attachments-header ion-text-wrap" slot="header">
21+
<ion-label>
22+
<p class="item-heading">{{ 'core.fileuploader.filesofthesetypes' | translate }}</p>
23+
</ion-label>
24+
<ion-icon name="fas-circle-info" aria-hidden="true" slot="end" color="dark" />
25+
</ion-item>
26+
27+
<ul class="core-attachments" slot="content">
2028
<li *ngFor="let typeInfo of fileTypes.info">
2129
<strong *ngIf="typeInfo.name">{{typeInfo.name}} </strong>{{typeInfo.extlist}}
2230
</li>
2331
</ul>
24-
</ion-label>
25-
</ion-item>
32+
</ion-accordion>
33+
</ion-accordion-group>
34+
}
35+
36+
37+
2638
<ng-container *ngFor="let file of files; let index=index">
2739
<!-- Files already attached to the submission, either in online or in offline. -->
2840
<core-file *ngIf="!file.name" [file]="file" [component]="component" [componentId]="componentId" [canDelete]="true"

0 commit comments

Comments
 (0)