aboutsummaryrefslogtreecommitdiff
path: root/subsonic-main/src/main/webapp/WEB-INF/jsp/wap/browse.jsp
blob: ac1ce096660d4c20d9f665669112db6383bb9f4a (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
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">

<%@ page language="java" contentType="text/vnd.wap.wml; charset=utf-8" pageEncoding="iso-8859-1"%>

<wml>

    <%@ include file="head.jsp" %>

    <card id="main" title="Subsonic" newcontext="false">

        <p><small><b>

            <sub:url value="/wap/playlist.view" var="playUrl">
                <sub:param name="play" value="${model.parent.path}"/>
            </sub:url>
            <sub:url value="/wap/playlist.view" var="addUrl">
                <sub:param name="add" value="${model.parent.path}"/>
            </sub:url>
            <sub:url value="/wap/download.view" var="downloadUrl">
                <sub:param name="path" value="${model.parent.path}"/>
            </sub:url>

            <c:choose>
                <c:when test="${fn:length(model.children) eq 1 and model.children[0].file}">
                    <a href="${playUrl}">[<fmt:message key="wap.browse.playone"/>]</a><br/>
                    <a href="${addUrl}">[<fmt:message key="wap.browse.addone"/>]</a><br/>
                    <c:if test="${model.user.downloadRole}">
                        <a href="${downloadUrl}">[<fmt:message key="wap.browse.downloadone"/>]</a><br/>
                    </c:if>
                </c:when>
                <c:otherwise>
                    <a href="${playUrl}">[<fmt:message key="wap.browse.playall"/>]</a><br/>
                    <a href="${addUrl}">[<fmt:message key="wap.browse.addall"/>]</a><br/>
                    <c:if test="${model.user.downloadRole}">
                        <a href="${downloadUrl}">[<fmt:message key="wap.browse.downloadall"/>]</a><br/>
                    </c:if>
                </c:otherwise>
            </c:choose>

            <a href="<c:url value="/wap/index.view"/>">[<fmt:message key="common.home"/>]</a><br/>
        </b></small></p>

        <p><small>

            <c:forEach items="${model.children}" var="child">
                <sub:url value="/wap/browse.view" var="browseUrl">
                    <sub:param name="path" value="${child.path}"/>
                </sub:url>
                <a href="${browseUrl}">${fn:escapeXml(child.title)}</a><br/>
            </c:forEach>

        </small></p>
    </card>
</wml>