[Koha-bugs] [Bug 25475] upload.pl should provide a "Copy link" option

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu May 14 04:05:39 CEST 2020


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25475

--- Comment #1 from David Cook <dcook at prosentient.com.au> ---
Created attachment 104858
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=104858&action=edit
Bug 25475: add "Copy link" button to upload.pl

This patch adds a "Copy link" button to /cgi-bin/koha/tools/upload.pl.

It will create a modal that displays a URL like the following:
http://kohadev.myDNSname.org:8080/cgi-bin/koha/opac-retrieve-file.pl?
id=beb928969032f980056ea8269bc816fe
Users can then copy the URL from that modal.

If the browser supports the Clipboard API, the URL is also written to
the browser's clipboard, making manually copying from the modal redundant.

Test plan:
0) Apply patch
1) Go to http://localhost:8081/cgi-bin/koha/tools/upload.pl
2) Upload a file with the "Allow public downloads" box checked
3) Note the "Copy link" button in the "Actions" column
4) Click "Copy link"
5) Note that a modal is created with contents like the following:
http://kohadev.myDNSname.org:8080/cgi-bin/koha/opac-retrieve-file.pl?
id=beb928969032f980056ea8269bc816fe
5b) If you're using a modern browser, try Ctrl+V somewhere and note
that the URL has already been copied to your clipboard
6) Manually highlight the text in the modal and Ctrl+C
7) Click outside the modal
8) Paste the URL somewhere useful like a system preference or News item
9) Profit

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.


More information about the Koha-bugs mailing list