blob: e0852182de24a54b17961acb4b1a07ed217c4d07 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="iso-8859-1"%>
<%@ include file="include.jsp" %>
<%--
PARAMETERS
id: ID of file.
video: Whether the file is a video (default false).
playEnabled: Whether the current user is allowed to play songs (default true).
addEnabled: Whether the current user is allowed to add songs to the playlist (default true).
downloadEnabled: Whether the current user is allowed to download songs (default false).
starEnabled: Whether to show star/unstar controls (default false).
starred: Whether the file is currently starred.
asTable: Whether to put the images in td tags.
--%>
<sub:url value="/download.view" var="downloadUrl">
<sub:param name="id" value="${param.id}"/>
</sub:url>
<c:if test="${param.starEnabled}">
<c:if test="${param.asTable}"><td></c:if>
<a href="#" onclick="toggleStar(${param.id}, '#starImage${param.id}'); return false;">
<c:choose>
<c:when test="${param.starred}">
<img id="starImage${param.id}" src="<spring:theme code="ratingOnImage"/>" alt="">
</c:when>
<c:otherwise>
<img id="starImage${param.id}" src="<spring:theme code="ratingOffImage"/>" alt="">
</c:otherwise>
</c:choose>
</a>
<c:if test="${param.asTable}"></td></c:if>
</c:if>
<c:if test="${param.asTable}"><td></c:if>
<c:if test="${empty param.playEnabled or param.playEnabled}">
<c:choose>
<c:when test="${param.video}">
<sub:url value="/videoPlayer.view" var="videoUrl">
<sub:param name="id" value="${param.id}"/>
</sub:url>
<a href="${videoUrl}" target="main">
<img src="<spring:theme code="playImage"/>" alt="<fmt:message key="common.play"/>" title="<fmt:message key="common.play"/>"></a>
</c:when>
<c:otherwise>
<a href="javascript:noop()" onclick="top.playQueue.onPlay(${param.id});">
<img src="<spring:theme code="playImage"/>" alt="<fmt:message key="common.play"/>" title="<fmt:message key="common.play"/>"></a>
</c:otherwise>
</c:choose>
</c:if>
<c:if test="${param.asTable}"></td></c:if>
<c:if test="${param.asTable}"><td></c:if>
<c:if test="${(empty param.addEnabled or param.addEnabled) and not param.video}">
<a href="javascript:noop()" onclick="top.playQueue.onAdd(${param.id});">
<img src="<spring:theme code="addImage"/>" alt="<fmt:message key="common.add"/>" title="<fmt:message key="common.add"/>"></a>
</c:if>
<c:if test="${param.asTable}"></td></c:if>
<c:if test="${param.asTable}"><td></c:if>
<c:if test="${param.downloadEnabled}">
<a href="${downloadUrl}">
<img src="<spring:theme code="downloadImage"/>" alt="<fmt:message key="common.download"/>" title="<fmt:message key="common.download"/>"></a>
</c:if>
<c:if test="${param.asTable}"></td></c:if>
|