@ -12,37 +12,28 @@
</div>
</div>
</td>
</td>
</c:if>
</c:if>
<c:choose>
<c:when test="${model.listType eq 'random'}">
<td style="padding-left: 2em;">
<a href="home.view?listType=random">
<img src="<spring:theme code="refreshImage"/>" alt="Refresh" style="height:16px;">
<fmt:message key="common.refresh"/>
</a>
</td>
</c:when>
<c:otherwise>
<sub:url value="home.view" var="previousUrl">
<sub:param name="listType" value="${model.listType}"/>
<sub:param name="listOffset" value="${model.listOffset - model.listSize}"/>
<sub:param name="genre" value="${model.genre}"/>
<sub:param name="decade" value="${model.decade}"/>
</sub:url>
<sub:url value="home.view" var="nextUrl">
<sub:param name="listType" value="${model.listType}"/>
<sub:param name="listOffset" value="${model.listOffset + model.listSize}"/>
<sub:param name="genre" value="${model.genre}"/>
<sub:param name="decade" value="${model.decade}"/>
</sub:url>
<c:if test="${fn:length(model.albums) gt 0}">
<c:if test="${model.listType ne 'random'}">
<td style="padding-right:0.5em">
<sub:url value="home.view" var="previousUrl">
<fmt:message key="home.albums">
<sub:param name="listType" value="${model.listType}"/>
<fmt:param value="${model.listOffset + 1}"/>
<sub:param name="listOffset" value="${model.listOffset - model.listSize}"/>
<fmt:param value="${model.listOffset + fn:length(model.albums)}"/>
<sub:param name="genre" value="${model.genre}"/>
</fmt:message>
<sub:param name="decade" value="${model.decade}"/>
</td>
</sub:url>
</c:if>
<sub:url value="home.view" var="nextUrl">
<sub:param name="listType" value="${model.listType}"/>
<sub:param name="listOffset" value="${model.listOffset + model.listSize}"/>
<sub:param name="genre" value="${model.genre}"/>
<sub:param name="decade" value="${model.decade}"/>
</sub:url>
<c:if test="${fn:length(model.albums) gt 0}">
<td style="padding-right:0.5em">
<fmt:message key="home.albums">
<fmt:param value="${model.listOffset + 1}"/>
<fmt:param value="${model.listOffset + fn:length(model.albums)}"/>
</fmt:message>
</td>
<c:if test="${model.listOffset gt 0}">
<c:if test="${model.listOffset gt 0}">
<td><a href="${previousUrl}"><img src="<spring:theme code='backImage'/>" alt=""></a></td>
<td><a href="${previousUrl}"><img src="<spring:theme code='backImage'/>" alt=""></a></td>
@ -51,37 +42,46 @@
<c:if test="${fn:length(model.albums) eq model.listSize}">
<c:if test="${fn:length(model.albums) eq model.listSize}">
<td><a href="${nextUrl}"><img src="<spring:theme code='forwardImage'/>" alt=""></a></td>
<td><a href="${nextUrl}"><img src="<spring:theme code='forwardImage'/>" alt=""></a></td>
</c:if>
</c:if>
<td style="padding-right: 2em">
</td>
</c:if>
<c:if test="${model.listType eq 'decade'}">
<c:if test="${model.listType eq 'decade'}">
<td style="padding-left: 2em">
<td>
<fmt:message key="home.decade.text"/>
<fmt:message key="home.decade.text"/>
</td>
</td>
<td>
<td style="padding-right: 2em">
<select name="decade" onchange="location='home.view?listType=${model.listType}&decade=' + options[selectedIndex].value">
<select name="decade" onchange="location='home.view?listType=${model.listType}&decade=' + options[selectedIndex].value">
<c:forEach items="${model.decades}" var="decade">
<c:forEach items="${model.decades}" var="decade">
<option
<option
${decade eq model.decade ? "selected" : ""} value="${decade}">${decade}</option>
${decade eq model.decade ? "selected" : ""} value="${decade}">${decade}</option>
</c:forEach>
</c:forEach>
</select>
</select>
</td>
</td>
</c:if>
</c:if>
<c:if test="${model.listType eq 'genre'}">
<c:if test="${model.listType eq 'genre'}">
<td style="padding-left: 2em">
<td>
<fmt:message key="home.genre.text"/>
<fmt:message key="home.genre.text"/>
</td>
</td>
<td>
<td style="padding-right: 2em">
<select name="genre" onchange="location='home.view?listType=${model.listType}&genre=' + encodeURIComponent(options[selectedIndex].value)">
<select name="genre" onchange="location='home.view?listType=${model.listType}&genre=' + encodeURIComponent(options[selectedIndex].value)">
<c:forEach items="${model.genres}" var="genre">
<c:forEach items="${model.genres}" var="genre">
<option ${genre.name eq model.genre ? "selected" : ""} value="${genre.name}">${genre.name} (${genre.albumCount})</option>
<option ${genre.name eq model.genre ? "selected" : ""} value="${genre.name}">${genre.name} (${genre.albumCount})</option>
</c:forEach>
</c:forEach>
</select>
</select>
</td>
</td>
</c:if>
</c:if>
</c:otherwise>
</c:if>
</c:choose>
<td style="padding-right: 2em;">
<a href="javascript:refresh()">
<img src="<spring:theme code='refreshImage'/>" alt="Refresh" style="height:16px;">
<fmt:message key="common.refresh"/>
</a>
</td>
<c:if test="${not empty model.albums}">
<c:if test="${not empty model.albums}">
<td style="padding-left: 2em">
<td>
<a href="javascript:playShuffle()">
<a href="javascript:playShuffle()">
<img src="<spring:theme code='shuffleImage'/>" alt="Shuffle" style="height:16px;">
<img src="<spring:theme code='shuffleImage'/>" alt="Shuffle" style="height:16px;">
<fmt:message key="home.shuffle"/>
<fmt:message key="home.shuffle"/>