diff options
Diffstat (limited to 'subsonic-main/src/main/webapp/WEB-INF/jsp/wap')
8 files changed, 303 insertions, 0 deletions
diff --git a/subsonic-main/src/main/webapp/WEB-INF/jsp/wap/browse.jsp b/subsonic-main/src/main/webapp/WEB-INF/jsp/wap/browse.jsp new file mode 100644 index 00000000..ac1ce096 --- /dev/null +++ b/subsonic-main/src/main/webapp/WEB-INF/jsp/wap/browse.jsp @@ -0,0 +1,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>
+
diff --git a/subsonic-main/src/main/webapp/WEB-INF/jsp/wap/head.jsp b/subsonic-main/src/main/webapp/WEB-INF/jsp/wap/head.jsp new file mode 100644 index 00000000..d902de1d --- /dev/null +++ b/subsonic-main/src/main/webapp/WEB-INF/jsp/wap/head.jsp @@ -0,0 +1,10 @@ +<%@ include file="../include.jsp" %>
+
+<head>
+ <meta http-equiv="Cache-Control" content="max-age=0" forua="true"/>
+ <meta http-equiv="Cache-Control" content="must-revalidate" forua="true"/>
+</head>
+
+<template>
+ <do type="prev" name="back" label="<fmt:message key="common.back"/>"><prev/></do>
+</template>
diff --git a/subsonic-main/src/main/webapp/WEB-INF/jsp/wap/index.jsp b/subsonic-main/src/main/webapp/WEB-INF/jsp/wap/index.jsp new file mode 100644 index 00000000..2773a55e --- /dev/null +++ b/subsonic-main/src/main/webapp/WEB-INF/jsp/wap/index.jsp @@ -0,0 +1,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>
+
diff --git a/subsonic-main/src/main/webapp/WEB-INF/jsp/wap/loadPlaylist.jsp b/subsonic-main/src/main/webapp/WEB-INF/jsp/wap/loadPlaylist.jsp new file mode 100644 index 00000000..2640cce0 --- /dev/null +++ b/subsonic-main/src/main/webapp/WEB-INF/jsp/wap/loadPlaylist.jsp @@ -0,0 +1,23 @@ +<?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:forEach items="${model.playlists}" var="playlist">
+ <sub:url var="url" value="/wap/playlist.view">
+ <sub:param name="load" value="${playlist.id}"/>
+ </sub:url>
+ <b><a href="${url}">${fn:escapeXml(playlist.name)}</a></b><br/>
+ </c:forEach>
+ </small></p>
+
+ </card>
+</wml>
+
diff --git a/subsonic-main/src/main/webapp/WEB-INF/jsp/wap/playlist.jsp b/subsonic-main/src/main/webapp/WEB-INF/jsp/wap/playlist.jsp new file mode 100644 index 00000000..481e00d3 --- /dev/null +++ b/subsonic-main/src/main/webapp/WEB-INF/jsp/wap/playlist.jsp @@ -0,0 +1,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" %>
+
+ <c:if test="${fn:length(model.players) eq 1}">
+ <c:choose>
+ <c:when test="${empty model.players[0].name}">
+ <c:set var="playerName" value=" - Player ${model.players[0].id}"/>
+ </c:when>
+ <c:otherwise>
+ <c:set var="playerName" value=" - ${model.players[0].name}"/>
+ </c:otherwise>
+ </c:choose>
+ </c:if>
+
+
+ <card id="main" title="Subsonic" newcontext="false">
+ <p><small><b><fmt:message key="wap.playlist.title"/>${playerName}</b></small></p>
+ <p><small>
+
+ <c:choose>
+ <c:when test="${empty model.players}">
+ <fmt:message key="wap.playlist.noplayer"/>
+ </c:when>
+ <c:otherwise>
+ <b><a href="<c:url value="/wap/index.view"/>">[<fmt:message key="common.home"/>]</a></b><br/>
+ <b><a href="<c:url value="/wap/loadPlaylist.view"/>">[<fmt:message key="wap.playlist.load"/>]</a></b><br/>
+ <b><a href="<c:url value="/wap/playlist.view?random"/>">[<fmt:message key="wap.playlist.random"/>]</a></b><br/>
+
+ <c:set var="playlist" value="${model.players[0].playlist}"/>
+
+ <c:if test="${not empty playlist.files}">
+ <b><a href="<c:url value="/play.m3u"/>">[<fmt:message key="wap.playlist.play"/>]</a></b><br/>
+ <b><a href="<c:url value="/wap/playlist.view?clear"/>">[<fmt:message key="wap.playlist.clear"/>]</a></b><br/>
+ </small></p>
+ <p><small>
+
+ <c:forEach items="${playlist.files}" var="file" varStatus="loopStatus">
+ <c:set var="isCurrent" value="${(file eq playlist.currentFile) and (loopStatus.count - 1 eq playlist.index)}"/>
+ ${isCurrent ? "<b>" : ""}
+ <a href="<c:url value="/wap/playlist.view?skip=${loopStatus.count - 1}"/>">${fn:escapeXml(file.title)}</a>
+ ${isCurrent ? "</b>" : ""}
+ <br/>
+ </c:forEach>
+ </c:if>
+ </c:otherwise>
+ </c:choose>
+ </small></p>
+ </card>
+</wml>
+
diff --git a/subsonic-main/src/main/webapp/WEB-INF/jsp/wap/search.jsp b/subsonic-main/src/main/webapp/WEB-INF/jsp/wap/search.jsp new file mode 100644 index 00000000..b35b04a3 --- /dev/null +++ b/subsonic-main/src/main/webapp/WEB-INF/jsp/wap/search.jsp @@ -0,0 +1,19 @@ +<?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>
+ <input name="query" value="" size="10"/>
+ <anchor><fmt:message key="wap.search.title"/>
+ <go href="<c:url value="/wap/searchResult.view"/>" method="get">
+ <postfield name="query" value="$query"/>
+ </go>
+ </anchor>
+ </p>
+ </card>
+</wml>
+
diff --git a/subsonic-main/src/main/webapp/WEB-INF/jsp/wap/searchResult.jsp b/subsonic-main/src/main/webapp/WEB-INF/jsp/wap/searchResult.jsp new file mode 100644 index 00000000..2267c069 --- /dev/null +++ b/subsonic-main/src/main/webapp/WEB-INF/jsp/wap/searchResult.jsp @@ -0,0 +1,30 @@ +<?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="${model.creatingIndex}">
+ <fmt:message key="wap.searchresult.index"/>
+ </c:when>
+
+ <c:otherwise>
+ <c:forEach items="${model.hits}" var="hit">
+ <sub:url var="url" value="/wap/browse.view">
+ <sub:param name="path" value="${hit.path}"/>
+ </sub:url>
+ <a href="${url}">${fn:escapeXml(hit.title)}</a><br/>
+ </c:forEach>
+ </c:otherwise>
+ </c:choose>
+ </small></p>
+ </card>
+
+</wml>
+
diff --git a/subsonic-main/src/main/webapp/WEB-INF/jsp/wap/settings.jsp b/subsonic-main/src/main/webapp/WEB-INF/jsp/wap/settings.jsp new file mode 100644 index 00000000..5c44e87d --- /dev/null +++ b/subsonic-main/src/main/webapp/WEB-INF/jsp/wap/settings.jsp @@ -0,0 +1,47 @@ +<?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><a href="<c:url value="/wap/index.view"/>">[<fmt:message key="common.home"/>]</a><br/></b>
+ <b><a href="#player">[<fmt:message key="wap.settings.selectplayer"/>]</a></b>
+ </small></p>
+ </card>
+
+ <card id="player" title="Subsonic" newcontext="false">
+ <p><small>
+
+ <b><a href="<c:url value="/wap/index.view"/>">[<fmt:message key="common.home"/>]</a><br/></b>
+ </small></p><p><small>
+
+ <c:choose>
+ <c:when test="${empty model.playerId}">
+ <fmt:message key="wap.settings.allplayers"/>
+ </c:when>
+ <c:otherwise>
+ <a href="<c:url value="/wap/selectPlayer.view"/>"><fmt:message key="wap.settings.allplayers"/></a>
+ </c:otherwise>
+ </c:choose>
+ <br/>
+
+ <c:forEach items="${model.players}" var="player">
+ <c:choose>
+ <c:when test="${player.id eq model.playerId}">
+ ${player}
+ </c:when>
+ <c:otherwise>
+ <a href="<c:url value="/wap/selectPlayer.view?playerId=${player.id}"/>">${player}</a>
+ </c:otherwise>
+ </c:choose>
+ <br/>
+ </c:forEach>
+ </small></p>
+ </card>
+
+</wml>
+
|