Skip to content

Commit

Permalink
Merge pull request #4147 from alfonso-salces/MOBILE-4070
Browse files Browse the repository at this point in the history
MOBILE-4070 attachments: Collapse mimetypes
  • Loading branch information
crazyserver authored Aug 14, 2024
2 parents 297cb57 + aa1bd53 commit 976de68
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 8 deletions.
19 changes: 17 additions & 2 deletions src/core/components/attachments/attachments.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
core-loading {
--loading-inline-min-height: 60px;
@use "theme/globals" as *;

:host {
core-loading {
--loading-inline-min-height: 60px;
}

.core-attachments {
@include margin-horizontal(null, var(--mdl-spacing-3));

&-header {
ion-icon {
@include margin-horizontal(null, var(--mdl-spacing-3));
font-size: var(--mdl-typography-icon-fontSize-sm);
}
}
}
}
24 changes: 18 additions & 6 deletions src/core/components/attachments/core-attachments.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,28 @@
<ion-icon name="fas-plus" slot="icon-only" aria-hidden="true" />
</ion-button>
</ion-item>
<ion-item class="ion-text-wrap" *ngIf="fileTypes && fileTypes.mimetypes && fileTypes.mimetypes.length">
<ion-label>
<p>{{ 'core.fileuploader.filesofthesetypes' | translate }}</p>
<ul class="list-with-style">

@if (fileTypes && fileTypes.mimetypes && fileTypes.mimetypes.length) {
<ion-accordion-group>
<ion-accordion toggleIconSlot="start">
<ion-item class="core-attachments-header ion-text-wrap" slot="header">
<ion-label>
<p class="item-heading">{{ 'core.fileuploader.filesofthesetypes' | translate }}</p>
</ion-label>
<ion-icon name="fas-circle-info" aria-hidden="true" slot="end" color="dark" />
</ion-item>

<ul class="core-attachments" slot="content">
<li *ngFor="let typeInfo of fileTypes.info">
<strong *ngIf="typeInfo.name">{{typeInfo.name}} </strong>{{typeInfo.extlist}}
</li>
</ul>
</ion-label>
</ion-item>
</ion-accordion>
</ion-accordion-group>
}



<ng-container *ngFor="let file of files; let index=index">
<!-- Files already attached to the submission, either in online or in offline. -->
<core-file *ngIf="!file.name" [file]="file" [component]="component" [componentId]="componentId" [canDelete]="true"
Expand Down

0 comments on commit 976de68

Please sign in to comment.