Skip to content

Commit

Permalink
Evarisk#845 [SaturneMediaLib] add: zoom icon on picture we can zoom on
Browse files Browse the repository at this point in the history
  • Loading branch information
evarisk-charles committed Feb 21, 2024
1 parent 92f2803 commit f3db183
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions lib/medias.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -227,11 +227,15 @@ function saturne_show_medias_linked(string $modulepart = 'ecm', string $sdir, $s

$relativefile = preg_replace('/^\//', '', $pdir . $photo);
if (empty($nolink)) {
$relativefile = preg_replace("/'/", "\\'", $relativefile);
$urladvanced = getAdvancedPreviewUrl($modulepart, $relativefile, 0, 'entity=' . $conf->entity);
if ($urladvanced) $return .= '<a class="wpeo-button button-transparent button-square-' . $maxWidth . ' clicked-photo-preview" href="' . $urladvanced . '">';
else $return .= '<a href="' . DOL_URL_ROOT . '/viewimage.php?modulepart=' . $modulepart . '&entity=' . $conf->entity . '&file=' . urlencode($pdir . $photo) . '" class="aphoto" target="_blank">';
$return .= '<i style="color: black;" class="fas fa-search-plus button-add"></i>';
$relativefile = preg_replace("/'/", "\\'", $relativefile);
$urladvanced = getAdvancedPreviewUrl($modulepart, $relativefile, 0, 'entity=' . $conf->entity);
if ($urladvanced) {
$return .= '<a class="wpeo-button button-transparent button-square-' . $maxWidth . ' clicked-photo-preview" href="' . $urladvanced . '">';
}
else {
$return .= '<a href="' . DOL_URL_ROOT . '/viewimage.php?modulepart=' . $modulepart . '&entity=' . $conf->entity . '&file=' . urlencode($pdir . $photo) . '" class="aphoto" target="_blank">';
}
$return .= '<i style="color: black;" class="fas fa-search-plus button-add"></i>';
}

// Show image (width height=$maxHeight)
Expand Down

0 comments on commit f3db183

Please sign in to comment.