blob: 8792d60dfd937fe69b0e3e0ab26b635e08dca000 (
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
|
<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="iso-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head>
<%@ include file="head.jsp" %>
<%@ include file="jquery.jsp" %>
<link href="<c:url value="/style/shadow.css"/>" rel="stylesheet">
<script type="text/javascript" language="javascript">
function init() {
<c:if test="${model.listType eq 'random'}">
setTimeout("refresh()", 20000);
</c:if>
}
function refresh() {
top.main.location.href = top.main.location.href;
}
</script>
</head>
<body class="mainframe bgcolor1" onload="init();">
<h1>
<img src="<spring:theme code="homeImage"/>" alt="">
${model.welcomeTitle}
</h1>
<c:if test="${not empty model.welcomeSubtitle}">
<h2>${model.welcomeSubtitle}</h2>
</c:if>
<h2>
<c:forTokens items="random newest starred highest frequent recent alphabetical users" delims=" " var="cat" varStatus="loopStatus">
<c:if test="${loopStatus.count > 1}"> | </c:if>
<sub:url var="url" value="home.view">
<sub:param name="listSize" value="${model.listSize}"/>
<sub:param name="listType" value="${cat}"/>
</sub:url>
<c:choose>
<c:when test="${model.listType eq cat}">
<span class="headerSelected"><fmt:message key="home.${cat}.title"/></span>
</c:when>
<c:otherwise>
<a href="${url}"><fmt:message key="home.${cat}.title"/></a>
</c:otherwise>
</c:choose>
</c:forTokens>
</h2>
<c:if test="${model.isIndexBeingCreated}">
<p class="warning"><fmt:message key="home.scan"/></p>
</c:if>
<h2><fmt:message key="home.${model.listType}.text"/></h2>
<table width="100%">
<tr>
<td style="vertical-align:top;">
<c:choose>
<c:when test="${model.listType eq 'users'}">
<table>
<tr>
<th><fmt:message key="home.chart.total"/></th>
<th><fmt:message key="home.chart.stream"/></th>
</tr>
<tr>
<td><img src="<c:url value="/userChart.view"><c:param name="type" value="total"/></c:url>" alt=""></td>
<td><img src="<c:url value="/userChart.view"><c:param name="type" value="stream"/></c:url>" alt=""></td>
</tr>
<tr>
<th><fmt:message key="home.chart.download"/></th>
<th><fmt:message key="home.chart.upload"/></th>
</tr>
<tr>
<td><img src="<c:url value="/userChart.view"><c:param name="type" value="download"/></c:url>" alt=""></td>
<td><img src="<c:url value="/userChart.view"><c:param name="type" value="upload"/></c:url>" alt=""></td>
</tr>
</table>
</c:when>
<c:otherwise>
<table>
<c:forEach items="${model.albums}" var="album" varStatus="loopStatus">
<c:if test="${loopStatus.count % 5 == 1}">
<tr>
</c:if>
<td style="vertical-align:top">
<table>
<tr><td>
<c:import url="coverArt.jsp">
<c:param name="albumId" value="${album.id}"/>
<c:param name="albumName" value="${album.albumTitle}"/>
<c:param name="coverArtSize" value="110"/>
<c:param name="showLink" value="true"/>
<c:param name="showZoom" value="false"/>
<c:param name="showChange" value="false"/>
<c:param name="appearAfter" value="${loopStatus.count * 30}"/>
</c:import>
<div class="detail">
<c:if test="${not empty album.playCount}">
<fmt:message key="home.playcount"><fmt:param value="${album.playCount}"/></fmt:message>
</c:if>
<c:if test="${not empty album.lastPlayed}">
<fmt:formatDate value="${album.lastPlayed}" dateStyle="short" var="lastPlayedDate"/>
<fmt:message key="home.lastplayed"><fmt:param value="${lastPlayedDate}"/></fmt:message>
</c:if>
<c:if test="${not empty album.created}">
<fmt:formatDate value="${album.created}" dateStyle="short" var="creationDate"/>
<fmt:message key="home.created"><fmt:param value="${creationDate}"/></fmt:message>
</c:if>
<c:if test="${not empty album.rating}">
<c:import url="rating.jsp">
<c:param name="readonly" value="true"/>
<c:param name="rating" value="${album.rating}"/>
</c:import>
</c:if>
</div>
<c:choose>
<c:when test="${empty album.artist and empty album.albumTitle}">
<div class="detail"><fmt:message key="common.unknown"/></div>
</c:when>
<c:otherwise>
<div class="detail"><em><str:truncateNicely lower="15" upper="15">${album.artist}</str:truncateNicely></em></div>
<div class="detail"><str:truncateNicely lower="15" upper="15">${album.albumTitle}</str:truncateNicely></div>
</c:otherwise>
</c:choose>
</td></tr>
</table>
</td>
<c:if test="${loopStatus.count % 5 == 0}">
</tr>
</c:if>
</c:forEach>
</table>
<table>
<tr>
<td style="padding-right:1.5em">
<select name="listSize" onchange="location='home.view?listType=${model.listType}&listOffset=${model.listOffset}&listSize=' + options[selectedIndex].value;">
<c:forTokens items="5 10 15 20 30 40 50" delims=" " var="size">
<option ${size eq model.listSize ? "selected" : ""} value="${size}"><fmt:message key="home.listsize"><fmt:param value="${size}"/></fmt:message></option>
</c:forTokens>
</select>
</td>
<c:choose>
<c:when test="${model.listType eq 'random'}">
<td><div class="forward"><a href="home.view?listType=random&listSize=${model.listSize}"><fmt:message key="common.more"/></a></div></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="listSize" value="${model.listSize}"/>
</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="listSize" value="${model.listSize}"/>
</sub:url>
<td style="padding-right:1.5em"><fmt:message key="home.albums"><fmt:param value="${model.listOffset + 1}"/><fmt:param value="${model.listOffset + model.listSize}"/></fmt:message></td>
<td style="padding-right:1.5em"><div class="back"><a href="${previousUrl}"><fmt:message key="common.previous"/></a></div></td>
<td><div class="forward"><a href="${nextUrl}"><fmt:message key="common.next"/></a></div></td>
</c:otherwise>
</c:choose>
</tr>
</table>
</c:otherwise>
</c:choose>
</td>
<c:if test="${not empty model.welcomeMessage}">
<td style="vertical-align:top;width:20em">
<div style="padding:0 1em 0 1em;border-left:1px solid #<spring:theme code="detailColor"/>">
<sub:wiki text="${model.welcomeMessage}"/>
</div>
</td>
</c:if>
</tr>
</table>
</body></html>
|