diff --git a/admin/themes/default/js/history.js b/admin/themes/default/js/history.js index 7ad23d3a4..c7a0d3b08 100644 --- a/admin/themes/default/js/history.js +++ b/admin/themes/default/js/history.js @@ -301,7 +301,18 @@ function lineConstructor(line, id, imageDisplay) { fillHistoryResult(current_param); }); } - newLine.find(".edit-img").attr("href", line.EDIT_IMAGE) + + if (line.EDIT_IMAGE != "") { + newLine.find(".edit-img").attr("href", line.EDIT_IMAGE); + } else { + newLine.find(".edit-img") + .attr("href", "#") + .addClass("notClickable tiptip") + .attr('title', str_no_longer_exist_photo) + .on("click", (e) => { + e.preventDefault(); + }); + } switch (line.SECTION) { case "tags": diff --git a/admin/themes/default/template/history.tpl b/admin/themes/default/template/history.tpl index 6d21c8cef..de6752429 100644 --- a/admin/themes/default/template/history.tpl +++ b/admin/themes/default/template/history.tpl @@ -41,6 +41,7 @@ const str_favorites = "{'Your favorites'|translate}"; const str_recent_cats = "{'Recent albums'|translate}"; const str_recent_pics = "{'Recent photos'|translate}"; const str_memories = "{'Memories'|translate}"; +const str_no_longer_exist_photo = "{'This photo no longer exists'|@translate}"; const unit_MB = "{"%s MB"|@translate}"; const str_guest = '{'guest'|@translate}'; const guest_id = {$guest_id}; @@ -276,6 +277,10 @@ jQuery(document).ready( function() {