aboutsummaryrefslogtreecommitdiff
path: root/subsonic-main/src/main/webapp/WEB-INF/jsp/wap/index.jsp
blob: 2773a55e2a7b1edf8d704fe301f7801f3a4b3900 (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
<?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>

                <c:choose>
                <c:when test="${empty model.artists}">

                <b>
                    <a href="<c:url value="/wap/playlist.view"/>">[<fmt:message key="wap.index.playlist"/>]</a>
                </b>
                <br/>
                <b>
                    <a href="<c:url value="/wap/search.view"/>">[<fmt:message key="wap.index.search"/>]</a>
                </b>
                <br/>
                <b>
                    <a href="<c:url value="/wap/settings.view"/>">[<fmt:message key="wap.index.settings"/>]</a>
                </b>
                <br/>
            </small>
        </p>
        <p>
            <small>
                <c:forEach items="${model.indexes}" var="index">
                    <sub:url var="url" value="/wap/index.view">
                        <sub:param name="index" value="${index.index}"/>
                    </sub:url>
                    <a href="${url}">${index.index}</a>
                </c:forEach>
                </c:when>

                <c:otherwise>
                    <c:forEach items="${model.artists}" var="artist">
                        <c:forEach items="${artist.musicFiles}" var="mediaFile">
                            <sub:url var="url" value="/wap/browse.view">
                                <sub:param name="path" value="${mediaFile.path}"/>
                            </sub:url>
                            <a href="${url}">${fn:escapeXml(mediaFile.title)}</a>
                            <br/>
                        </c:forEach>
                    </c:forEach>
                </c:otherwise>
                </c:choose>

                <c:if test="${model.noMusic}">
                    <fmt:message key="wap.index.missing"/>
                </c:if>

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