Skip to content

Commit

Permalink
Fix presentation when there is no image thumbnail
Browse files Browse the repository at this point in the history
  • Loading branch information
stcarrez committed Dec 31, 2018
1 parent 54aedc3 commit f42e36b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
12 changes: 10 additions & 2 deletions awa/plugins/awa-images/web/storages/lists/image-list.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,16 @@
<div class='wiki-image-grid' id="i_#{image.id}">
<div class='wiki-image-grid-info'>
<a href="#{contextPath}/storages/image-info/#{image.id}">
<img src="#{contextPath}/storages/images/#{image.thumbnail_id}" width="64" height="64"
alt="#{image.name}"/>
<h:panelGroup rendered="#{image.thumbnail_id ge 0}">
<img src="#{contextPath}/storages/images/#{image.thumbnail_id}"
width="64" height="64"
alt="#{image.name}"/>
</h:panelGroup>
<h:panelGroup rendered="#{image.thumbnail_id lt 0}">
<img src="#{contextPath}/images/storages/icon-gallery-64.png"
width="64" height="64"
alt="#{image.name}"/>
</h:panelGroup>
<span class="wiki-image-name">#{image.name}</span>
</a>
</div>
Expand Down
4 changes: 2 additions & 2 deletions awa/plugins/awa-images/web/storages/views/image-info.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@
</h:form>
</div>
<util:script>
init_upload('#document-upload', #{imageInfo.folder_id}, #{imageInfo.id},
"#{contextPath}/storages/forms/upload-image.html");
/* init_upload('#document-upload', #{imageInfo.folder_id}, #{imageInfo.id},
"#{contextPath}/storages/forms/upload-image.html"); */
</util:script>
</div>
<h:panelGroup rendered="#{imageInfo.id ne 0}">
Expand Down

0 comments on commit f42e36b

Please sign in to comment.