Skip to content
This repository has been archived by the owner on Oct 27, 2022. It is now read-only.

Commit

Permalink
Merge pull request #22 from privatmamtora/bug/attachments
Browse files Browse the repository at this point in the history
Bug/timeline-attachments
  • Loading branch information
alainv committed Oct 8, 2014
2 parents b89918c + 8d5f67e commit fcdd3e4
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/main/webapp/index.jsp
Expand Up @@ -109,9 +109,12 @@ limitations under the License.
<%
if (timelineItem.getAttachments() != null) {
for (Attachment attachment : timelineItem.getAttachments()) {
if (MirrorClient.getAttachmentContentType(credential, timelineItem.getId(), attachment.getId()).startsWith("")) { %>
<img src="<%= appBaseUrl + "attachmentproxy?attachment=" +
attachment.getId() + "&timelineItem=" + timelineItem.getId() %>">
if (MirrorClient.getAttachmentContentType(credential, timelineItem.getId(), attachment.getId()).startsWith("image")) { %>
<a href="<%= appBaseUrl + "attachmentproxy?attachment=" +
attachment.getId() + "&timelineItem=" + timelineItem.getId() %>">
<img src="<%= appBaseUrl + "attachmentproxy?attachment=" +
attachment.getId() + "&timelineItem=" + timelineItem.getId() %>"/>
</a>
<% } else { %>
<a href="<%= appBaseUrl + "attachmentproxy?attachment=" +
attachment.getId() + "&timelineItem=" + timelineItem.getId() %>">
Expand Down

0 comments on commit fcdd3e4

Please sign in to comment.