diff --git a/CHANGELOG.md b/CHANGELOG.md index b48f78dfa34c31328062cd7343d175ba6276f879..5b1de71c169f368698ce09c5ae84dad05b4a235c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,7 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Deprecated (for soon-to-be removed features) -### Removed (for now removed features) +### Removed (for now removed features) ### Security (in case of vulnerabilities) @@ -92,6 +92,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Deprecated (for soon-to-be removed features) +* Image Preview in the FileSystem. The functionality is to be replaced by real + thumbnails, which cover also non-image data-formats. The thumbnails resource + is part of the new file system API of the CaosDB Server which is currently + under development. + ### Removed (for now removed features) * Removed non-informative tests for webcaosdb.css diff --git a/src/core/xsl/filesystem.xsl b/src/core/xsl/filesystem.xsl index 95362ee7820f67c822acce796641eea7e6e2f0eb..93028ed2f9667f5f7b673483cb87dacb2591d5ac 100644 --- a/src/core/xsl/filesystem.xsl +++ b/src/core/xsl/filesystem.xsl @@ -48,6 +48,21 @@ </xsl:choose> </xsl:if> </xsl:template> + <!-- Thumbnails of images (Deprecated)--> + <xsl:template name="entity-body-thumbnail"> + <xsl:param name="path"/> + <xsl:if test="contains('.jpg.gif.png.svg',translate(substring($path, string-length($path) - 3), 'JPGIFNSV', 'jpgifnsv'))"> + <div class="row"> + <div class="col-sm-12"> + <img class="entity-image-preview" style="max-width: 200px; max-height: 140px;"> + <xsl:attribute name="src"> + <xsl:value-of select="concat($filesystempath,$path)"/> + </xsl:attribute> + </img> + </div> + </div> + </xsl:if> + </xsl:template> <xsl:template match="dir" mode="filesystem-item"> <li class="list-group-item"> <a class="caosdb-fs-dir"> @@ -84,6 +99,9 @@ </a> </div> </div> + <xsl:call-template name="entity-body-thumbnail"> + <xsl:with-param name="path" select="substring-after($file-uri,$filesystempath)"/> + </xsl:call-template> </li> </xsl:template> <xsl:template match="/Response/dir" mode="top-level-data">