mirror of
https://github.com/grocy/grocy.git
synced 2025-04-29 09:39:57 +00:00
Added a button to download equipment instruction manuals (closes #833)
This commit is contained in:
parent
d2d09cf928
commit
604629ed5e
@ -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)
|
||||
|
@ -1990,3 +1990,6 @@ msgstr ""
|
||||
|
||||
msgid "Sort number"
|
||||
msgstr ""
|
||||
|
||||
msgid "Download file"
|
||||
msgstr ""
|
||||
|
@ -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");
|
||||
|
@ -131,12 +131,20 @@
|
||||
<div class="card-header card-header-fullscreen">
|
||||
<span class="selected-equipment-name"></span>
|
||||
<a id="selectedEquipmentInstructionManualToggleFullscreenButton"
|
||||
class="btn btn-sm btn-outline-secondary py-0 float-right"
|
||||
class="btn btn-sm btn-outline-secondary py-0 float-right mr-1"
|
||||
href="#"
|
||||
data-toggle="tooltip"
|
||||
title="{{ $__t('Expand to fullscreen') }}">
|
||||
<i class="fas fa-expand-arrows-alt"></i>
|
||||
</a>
|
||||
<a id="selectedEquipmentInstructionManualDownloadButton"
|
||||
class="btn btn-sm btn-outline-secondary py-0 float-right mr-1"
|
||||
href="#"
|
||||
target="_blank"
|
||||
data-toggle="tooltip"
|
||||
title="{{ $__t('Download file') }}">
|
||||
<i class="fas fa-file-download"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="card-body py-0 px-0">
|
||||
<p id="selected-equipment-has-no-instruction-manual-hint"
|
||||
|
Loading…
x
Reference in New Issue
Block a user