diff --git a/scripts/langindex.json b/scripts/langindex.json index b714959c8..fa870638e 100644 --- a/scripts/langindex.json +++ b/scripts/langindex.json @@ -597,6 +597,8 @@ "addon.mod_data.timeadded": "data", "addon.mod_data.timemodified": "data", "addon.mod_data.usedate": "data", + "addon.mod_data_fields_file.fieldtypelabel": "datafield_file", + "addon.mod_data_fields_picture.fieldtypelabel": "datafield_picture", "addon.mod_feedback.analysis": "feedback", "addon.mod_feedback.anonymous": "feedback", "addon.mod_feedback.anonymous_entries": "feedback", @@ -1812,6 +1814,7 @@ "core.filenameexist": "local_moodlemobileapp", "core.filenotfound": "resource", "core.fileuploader.addfiletext": "repository", + "core.fileuploader.attachedfiles": "repository", "core.fileuploader.audio": "local_moodlemobileapp", "core.fileuploader.audiotitle": "tiny_recordrtc", "core.fileuploader.camera": "local_moodlemobileapp", @@ -1834,6 +1837,7 @@ "core.fileuploader.microphonepermissiondenied": "local_moodlemobileapp", "core.fileuploader.microphonepermissionrestricted": "local_moodlemobileapp", "core.fileuploader.more": "data", + "core.fileuploader.nofilesattached": "repository", "core.fileuploader.pauserecording": "local_moodlemobileapp", "core.fileuploader.photoalbums": "local_moodlemobileapp", "core.fileuploader.readingfile": "local_moodlemobileapp", diff --git a/src/addons/mod/data/fields/file/component/addon-mod-data-field-file.html b/src/addons/mod/data/fields/file/component/addon-mod-data-field-file.html index db44d6faa..38358cabf 100644 --- a/src/addons/mod/data/fields/file/component/addon-mod-data-field-file.html +++ b/src/addons/mod/data/fields/file/component/addon-mod-data-field-file.html @@ -1,6 +1,7 @@ + [allowOffline]="true" [courseId]="database?.course" [required]="field.required" + [title]="'addon.mod_data_fields_file.fieldtypelabel' | translate" /> diff --git a/src/addons/mod/data/fields/file/lang.json b/src/addons/mod/data/fields/file/lang.json new file mode 100644 index 000000000..b7153d180 --- /dev/null +++ b/src/addons/mod/data/fields/file/lang.json @@ -0,0 +1,3 @@ +{ + "fieldtypelabel": "File" +} diff --git a/src/addons/mod/data/fields/picture/component/addon-mod-data-field-picture.html b/src/addons/mod/data/fields/picture/component/addon-mod-data-field-picture.html index 2d198dac0..36136e9a2 100644 --- a/src/addons/mod/data/fields/picture/component/addon-mod-data-field-picture.html +++ b/src/addons/mod/data/fields/picture/component/addon-mod-data-field-picture.html @@ -1,6 +1,7 @@ + [allowOffline]="true" acceptedTypes="image" [courseId]="database?.course" [required]="field.required" + [title]="'addon.mod_data_fields_picture.fieldtypelabel' | translate" /> + {{ 'addon.mod_glossary.definition' | translate }} - + - + - - -

{{ 'addon.mod_glossary.attachment' | translate }}

-
-
+ + [courseId]="courseId" [title]="'addon.mod_glossary.attachment' | translate" /> + @@ -69,6 +67,7 @@
+ {{ 'core.save' | translate }} diff --git a/src/core/components/attachments/attachments.ts b/src/core/components/attachments/attachments.ts index d8b9ad346..ca67ff38a 100644 --- a/src/core/components/attachments/attachments.ts +++ b/src/core/components/attachments/attachments.ts @@ -55,6 +55,7 @@ export class CoreAttachmentsComponent implements OnInit { @Input() acceptedTypes?: string; // List of supported filetypes. If undefined, all types supported. @Input() required?: boolean; // Whether to display the required mark. @Input() courseId?: number; // Course ID. + @Input() title = Translate.instant('core.fileuploader.attachedfiles'); // Title to display. maxSizeReadable?: string; maxSubmissionsReadable?: string; diff --git a/src/core/components/attachments/core-attachments.html b/src/core/components/attachments/core-attachments.html index a86ff9e2c..c5035b61e 100644 --- a/src/core/components/attachments/core-attachments.html +++ b/src/core/components/attachments/core-attachments.html @@ -1,38 +1,42 @@ - - - - {{ 'core.maxsizeandattachments' | translate:{$a: {size: maxSizeReadable, attachments: maxSubmissionsReadable} } }} - - {{ 'core.maxfilesize' | translate:{$a: maxSizeReadable} }} - - - - - -

{{ 'core.fileuploader.filesofthesetypes' | translate }}

-
    -
  • - {{typeInfo.name}} {{typeInfo.extlist}} -
  • -
-
-
-
- - + + + +

{{ title }}

+ + {{ 'core.maxsizeandattachments' | translate:{$a: {size: maxSizeReadable, attachments: maxSubmissionsReadable} } }} + + {{ 'core.maxfilesize' | translate:{$a: maxSizeReadable} }} +
+ + +
+ + +

{{ 'core.fileuploader.filesofthesetypes' | translate }}

+
    +
  • + {{typeInfo.name}} {{typeInfo.extlist}} +
  • +
+
+
+ + + - - -
+ + + - - - + + +

{{ 'core.fileuploader.nofilesattached' | translate }}

+
+
+
diff --git a/src/core/features/fileuploader/lang.json b/src/core/features/fileuploader/lang.json index cc0b876cc..cf048dc46 100644 --- a/src/core/features/fileuploader/lang.json +++ b/src/core/features/fileuploader/lang.json @@ -1,5 +1,6 @@ { "addfiletext": "Add file", + "attachedfiles": "Attached files", "audio": "Audio", "audiotitle": "Record audio", "camera": "Camera", @@ -22,6 +23,7 @@ "microphonepermissiondenied": "Permission to access the microphone has been denied.", "microphonepermissionrestricted": "Microphone access is restricted.", "more": "More", + "nofilesattached": "No files attached", "pauserecording": "Pause recording", "photoalbums": "Photo albums", "readingfile": "Reading file",