mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-07 05:34:55 +08:00
Merge pull request #1412 from mlorb/ml-sci-2893
Fix download exported project from email link [SCI-2893]
This commit is contained in:
commit
33d5d2a1cc
1 changed files with 6 additions and 1 deletions
|
@ -25,7 +25,12 @@
|
||||||
<%= I18n.t("notifications.deliver.download_link") %>
|
<%= I18n.t("notifications.deliver.download_link") %>
|
||||||
<% # work around the problem with inserting the link of zipExport %>
|
<% # work around the problem with inserting the link of zipExport %>
|
||||||
<% zip_id = /data-id=('|")(\d*)('|")/.match(@notification.message)[2] %>
|
<% zip_id = /data-id=('|")(\d*)('|")/.match(@notification.message)[2] %>
|
||||||
<%= @notification.message.gsub(/href='.+'/, "href='#{zip_exports_download_url(zip_id)}'").html_safe %>
|
<% if /download_export_all_zip/.match(@notification.message) %>
|
||||||
|
<% download_url = zip_exports_download_export_all_url(zip_id) %>
|
||||||
|
<% else %>
|
||||||
|
<% download_url = zip_exports_download_url(zip_id) %>
|
||||||
|
<% end %>
|
||||||
|
<%= @notification.message.gsub(/href='.+'/, "href='#{download_url}'").html_safe %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= sanitize_input(prepend_server_url_to_links(@notification.message)) %>
|
<%= sanitize_input(prepend_server_url_to_links(@notification.message)) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
Loading…
Add table
Reference in a new issue