diff --git a/changelog/60_UNRELEASED_2020-xx-xx.md b/changelog/60_UNRELEASED_2020-xx-xx.md index 18e68f9d..e47533bd 100644 --- a/changelog/60_UNRELEASED_2020-xx-xx.md +++ b/changelog/60_UNRELEASED_2020-xx-xx.md @@ -107,6 +107,7 @@ ### Equipment improvements - The equipment page now will never automatically reload, even when `Auto reload on external changes` is on and a change was detected (because you most probably have that page open longer to read the manual) (thanks @fipwmaqzufheoxq92ebc) +- There is now a button to download the instruction manual (next to the "expand to fullscreen"-button) ### Calendar improvements/fixes - Events are now links to the corresponding page (thanks @zsarnett) diff --git a/localization/strings.pot b/localization/strings.pot index 7845fdd8..d1551eb0 100644 --- a/localization/strings.pot +++ b/localization/strings.pot @@ -1990,3 +1990,6 @@ msgstr "" msgid "Sort number" msgstr "" + +msgid "Download file" +msgstr "" diff --git a/public/viewjs/equipment.js b/public/viewjs/equipment.js index f2a3e308..77d102ef 100644 --- a/public/viewjs/equipment.js +++ b/public/viewjs/equipment.js @@ -40,7 +40,9 @@ function DisplayEquipment(id) { var pdfUrl = U('/api/files/equipmentmanuals/' + btoa(equipmentItem.instruction_manual_file_name)); $("#selected-equipment-instruction-manual").attr("src", pdfUrl); + $("#selectedEquipmentInstructionManualDownloadButton").attr("href", pdfUrl); $("#selected-equipment-instruction-manual").removeClass("d-none"); + $("#selectedEquipmentInstructionManualDownloadButton").removeClass("d-none"); $("#selected-equipment-has-no-instruction-manual-hint").addClass("d-none"); $("a[href='#instruction-manual-tab']").tab("show"); @@ -49,6 +51,7 @@ function DisplayEquipment(id) else { $("#selected-equipment-instruction-manual").addClass("d-none"); + $("#selectedEquipmentInstructionManualDownloadButton").addClass("d-none"); $("#selected-equipment-has-no-instruction-manual-hint").removeClass("d-none"); $("a[href='#description-tab']").tab("show"); diff --git a/views/equipment.blade.php b/views/equipment.blade.php index d0a45702..22c50dde 100644 --- a/views/equipment.blade.php +++ b/views/equipment.blade.php @@ -131,12 +131,20 @@
+ + +