1<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="iso-8859-1"%> 2<%--@elvariable id="command" type="org.madsonic.command.SearchCommand"--%> 3 4<html><head> 5 <%@ include file="head.jsp" %> 6 <%@ include file="jquery.jsp" %> 7 8 <script type="text/javascript" language="javascript"> 9 function showMoreArtists() { 10 $('.artistRow').show(); $('#moreArtists').hide(); 11 } 12 function showMoreAlbums() { 13 $('.albumRow').show(); $('#moreAlbums').hide(); 14 } 15 function showMoreSongs() { 16 $('.songRow').show();$('#moreSongs').hide(); 17 } 18 </script> 19</head> 20<body class="mainframe bgcolor1"> 21 22<h1> 23 <img src="<spring:theme code="searchImage"/>" width="32" alt=""/> 24 <fmt:message key="search.title"/> 25</h1> 26 27<div class="searchbox"> 28 29<c:if test="${command.inputVisible}"> 30<form:form commandName="command" method="post" action="search.view?&input=visible" name="searchForm"> 31 <table> 32 <tr> 33 <td><fmt:message key="search.query"/></td> 34 <td style="padding-left:0.25em"><form:input path="query" size="50" style="width: 300px;"/></td> 35 <td style="padding-left:0.25em"><input type="submit" onclick="search(0)" value="<fmt:message key="search.search"/>"/></td> 36 </tr> 37 </table> 38</form:form> 39</c:if> 40 41<c:if test="${command.indexBeingCreated}"> 42 <p class="warning"><fmt:message key="search.index"/></p> 43</c:if> 44 45<c:if test="${not command.indexBeingCreated and empty command.artists and empty command.albums and empty command.songs and empty command.videos}"> 46 <p class="warning"><fmt:message key="search.hits.none"/></p> 47</c:if> 48 49<c:if test="${not empty command.artists}"> 50 <h1 style="padding:20px 0 20px 0;"><fmt:message key="search.hits.artists"/></h1> 51 52 <table class="music content" style="border-collapse:collapse"> 53 <c:forEach items="${command.artists}" var="match" varStatus="loopStatus"> 54 55 <madsonic:url value="/main.view" var="mainUrl"> 56 <madsonic:param name="id" value="${match.id}"/> 57 </madsonic:url> 58 59 <tr class="artistRow" ${loopStatus.count > 6 ? "style='display:none'" : ""}> 60 <td class="fit" style="padding-left:0.5em;padding-right:1.5em;"> 61 <c:import url="playAddDownload.jsp"> 62 <c:param name="id" value="${match.id}"/> 63 <c:param name="playEnabled" value="${command.user.streamRole and not command.partyModeEnabled}"/> 64 <c:param name="addEnabled" value="${command.user.streamRole and (not command.partyModeEnabled or not match.directory)}"/> 65 <c:param name="downloadEnabled" value="${command.user.downloadRole and not command.partyModeEnabled}"/> 66 <c:param name="starEnabled" value="false"/> 67 <c:param name="starred" value="${not empty match.starredDate}"/> 68 <c:param name="video" value="${match.video and model.player.web}"/> 69 <c:param name="asTable" value="false"/> 70 </c:import> 71 </td> 72 <td class="fit bgcolor2"> 73 <c:import url="coverArtThumb.jsp"> 74 <c:param name="albumId" value="${match.id}"/> 75 <c:param name="auth" value="${match.hash}"/> 76 <c:param name="artistName" value="${match.name}"/> 77 <c:param name="coverArtSize" value="80"/> 78 <c:param name="scale" value="0.5"/> 79 <c:param name="showLink" value="true"/> 80 <c:param name="showZoom" value="false"/> 81 <c:param name="showChange" value="false"/> 82 <c:param name="showArtist" value="false"/> 83 <c:param name="typArtist" value="true"/> 84 <c:param name="appearAfter" value="5"/> 85 86 </c:import> 87 </td> 88 89 <td ${loopStatus.count % 2 == 1 ? "class='bgcolor2'" : ""} style="padding-left:1.75em;padding-right:1.25em"> 90 <a href="${mainUrl}">${match.name}</a> 91 </td> 92 </tr> 93 94 </c:forEach> 95 </table> 96 <c:if test="${fn:length(command.artists) gt 6}"> 97 <div id="moreArtists" class="forward" style="margin-left:8px;"><a href="javascript:showMoreArtists()"><fmt:message key="search.hits.more"/></a></div> 98 </c:if> 99</c:if> 100 101<c:if test="${not empty command.albums}"> 102 <h1 style="padding:30px 0 15px 0;"><fmt:message key="search.hits.albums"/></h1> 103 104 <table class="music content" style="border-collapse:collapse"> 105 <c:forEach items="${command.albums}" var="match" varStatus="loopStatus"> 106 107 <madsonic:url value="/main.view" var="mainUrl"> 108 <madsonic:param name="id" value="${match.id}"/> 109 </madsonic:url> 110 111 <tr class="albumRow" ${loopStatus.count > 8 ? "style='display:none'" : ""}> 112 <td class="fit" style="padding-left:0.5em;padding-right:1.5em;"> 113 <c:import url="playAddDownload.jsp"> 114 <c:param name="id" value="${match.id}"/> 115 <c:param name="playEnabled" value="${command.user.streamRole and not command.partyModeEnabled}"/> 116 <c:param name="addEnabled" value="${command.user.streamRole and (not command.partyModeEnabled or not match.directory)}"/> 117 <c:param name="downloadEnabled" value="${command.user.downloadRole and not command.partyModeEnabled}"/> 118 <c:param name="starEnabled" value="false"/> 119 <c:param name="starred" value="${not empty match.starredDate}"/> 120 <c:param name="video" value="${match.video and model.player.web}"/> 121 <c:param name="asTable" value="false"/> 122 </c:import> 123 </td> 124 <td class="fit bgcolor2"> 125 <c:import url="coverArtThumb.jsp"> 126 <c:param name="albumId" value="${match.id}"/> 127 <c:param name="auth" value="${match.hash}"/> 128 <c:param name="artistName" value="${match.name}"/> 129 <c:param name="coverArtSize" value="80"/> 130 <c:param name="scale" value="0.5"/> 131 <c:param name="showLink" value="true"/> 132 <c:param name="showZoom" value="false"/> 133 <c:param name="showChange" value="false"/> 134 <c:param name="showArtist" value="false"/> 135 <c:param name="typArtist" value="true"/> 136 <c:param name="appearAfter" value="5"/> 137 138 </c:import> 139 </td> 140 <td ${loopStatus.count % 2 == 1 ? "class='fit bgcolor2'" : "class='fit'"} style="padding-left:1.75em;padding-right:1.25em"> 141 <a href="${mainUrl}"><str:truncateNicely upper="55">${match.albumSetName}</str:truncateNicely></a> 142 </td> 143 <td ${loopStatus.count % 2 == 1 ? "class='bgcolor2'" : ""} style="padding-left:1.75em;padding-right:1.25em"> 144 <span class="detail"><str:truncateNicely upper="55">${match.artist}</str:truncateNicely></span> 145 </td> 146 </tr> 147 </c:forEach> 148 </table> 149 <c:if test="${fn:length(command.albums) gt 8}"> 150 <div id="moreAlbums" class="forward" style="margin-left:8px;"><a href="javascript:showMoreAlbums()"><fmt:message key="search.hits.more"/></a></div> 151 </c:if> 152</c:if> 153 154<c:if test="${not empty command.songs}"> 155 <h1 style="padding:30px 0 15px 0;"><fmt:message key="search.hits.songs"/></h1> 156 157 <table class="music content" style="border-collapse:collapse; empty-cells: show;"> 158 <c:forEach items="${command.songs}" var="match" varStatus="loopStatus"> 159 160 <madsonic:url value="/main.view" var="mainUrl"> 161 <madsonic:param name="path" value="${match.parentPath}"/> 162 </madsonic:url> 163 <tr class="songRow" ${loopStatus.count > 20 ? "style='display:none'" : ""}> 164 <td class="fit" style="padding-left:0.5em;padding-right:1.5em;"> 165 <c:import url="playAddDownload.jsp"> 166 <c:param name="id" value="${match.id}"/> 167 <c:param name="playEnabled" value="${command.user.streamRole and not command.partyModeEnabled}"/> 168 <c:param name="addEnabled" value="${command.user.streamRole and (not command.partyModeEnabled or not match.directory)}"/> 169 <c:param name="downloadEnabled" value="${command.user.downloadRole and not command.partyModeEnabled}"/> 170 <c:param name="starEnabled" value="false"/> 171 <c:param name="starred" value="${not empty match.starredDate}"/> 172 <c:param name="video" value="${match.video}"/> 173 <c:param name="asTable" value="false"/> 174 </c:import> 175 </td> 176 <td class="fit bgcolor2"> 177 <c:import url="coverArtThumb.jsp"> 178 <c:param name="albumId" value="${match.id}"/> 179 <c:param name="auth" value="${match.hash}"/> 180 <c:param name="artistName" value="${match.name}"/> 181 <c:param name="coverArtSize" value="80"/> 182 <c:param name="scale" value="0.5"/> 183 <c:param name="showLink" value="true"/> 184 <c:param name="showZoom" value="false"/> 185 <c:param name="showChange" value="false"/> 186 <c:param name="showArtist" value="false"/> 187 <c:param name="typArtist" value="true"/> 188 <c:param name="appearAfter" value="5"/> 189 190 </c:import> 191 </td> 192 <td ${loopStatus.count % 2 == 1 ? "class='fit bgcolor2'" : "class='fit'"} style="padding-left:1.75em;padding-right:1.25em"> 193 <str:truncateNicely upper="60">${match.title}</str:truncateNicely> 194 </td> 195 196 <td ${loopStatus.count % 2 == 1 ? "class='fit bgcolor2'" : "class='fit'"} style="padding-right:1.75em"> 197 <a href="${mainUrl}"><span class="detail"><str:truncateNicely upper="60">${match.albumName}</str:truncateNicely></span></a> 198 </td> 199 200 <td ${loopStatus.count % 2 == 1 ? "class='bgcolor2'" : ""} style="padding-right:1.75em"> 201 <span class="detail"><str:truncateNicely upper="60">${match.artist}</str:truncateNicely></span> 202 </td> 203 </tr> 204 205 </c:forEach> 206 </table> 207<c:if test="${fn:length(command.songs) gt 15}"> 208 <div id="moreSongs" class="forward" style="margin-left:8px;"><a href="javascript:showMoreSongs()"><fmt:message key="search.hits.more"/></a></div> 209</c:if> 210</c:if> 211 212<c:if test="${not empty command.videos}"> 213 <h1 style="padding:30px 0 15px 0;">Videos</h1> 214 215 <table class="music content" style="border-collapse:collapse; empty-cells: show;"> 216 <c:forEach items="${command.videos}" var="match" varStatus="loopStatus"> 217 218 <madsonic:url value="/main.view" var="mainUrl"> 219 <madsonic:param name="path" value="${match.parentPath}"/> 220 </madsonic:url> 221 222 <tr class="songRow" ${loopStatus.count > 20 ? "style='display:none'" : ""}> 223 <td class="fit" style="padding-left:0.5em;width:83px;"> 224 <c:import url="playAddDownload.jsp"> 225 <c:param name="id" value="${match.id}"/> 226 <c:param name="playEnabled" value="${command.user.streamRole and not command.partyModeEnabled}"/> 227 <c:param name="addEnabled" value="${command.user.streamRole and (not command.partyModeEnabled or not match.directory)}"/> 228 <c:param name="downloadEnabled" value="${command.user.downloadRole and not command.partyModeEnabled}"/> 229 <c:param name="starEnabled" value="false"/> 230 <c:param name="starred" value="${not empty match.starredDate}"/> 231 <c:param name="video" value="${match.video and command.player.web}"/> 232 <c:param name="asTable" value="false"/> 233 </c:import> 234 </td> 235 <td class="fit bgcolor2"> 236 <c:import url="coverArtThumb.jsp"> 237 <c:param name="albumId" value="${match.id}"/> 238 <c:param name="auth" value="${match.hash}"/> 239 <c:param name="artistName" value="${match.name}"/> 240 <c:param name="coverArtSize" value="80"/> 241 <c:param name="scale" value="0.5"/> 242 <c:param name="showLink" value="true"/> 243 <c:param name="showZoom" value="false"/> 244 <c:param name="showChange" value="false"/> 245 <c:param name="showArtist" value="false"/> 246 <c:param name="typArtist" value="true"/> 247 <c:param name="appearAfter" value="5"/> 248 </c:import> 249 </td> 250 251 <td ${loopStatus.count % 2 == 1 ? "class='fit bgcolor2'" : "class='fit'"} style="padding-left:1.75em;padding-right:1.25em"> 252 <str:truncateNicely upper="60">${match.title}</str:truncateNicely> 253 </td> 254 255 <td ${loopStatus.count % 2 == 1 ? "class='fit bgcolor2'" : "class='fit'"} style="padding-right:1.75em"> 256 <a href="${mainUrl}"><span class="detail"><str:truncateNicely upper="60">${match.albumName}</str:truncateNicely></span></a> 257 </td> 258 259 <td ${loopStatus.count % 2 == 1 ? "class='bgcolor2'" : ""} style="padding-right:1.75em"> 260 <span class="detail"><str:truncateNicely upper="60">${match.artist}</str:truncateNicely></span> 261 </td> 262 </tr> 263 264 </c:forEach> 265 </table> 266 <c:if test="${fn:length(command.videos) gt 15}"> 267 <div id="moreVideos" class="forward" style="margin-left:8px;"><a href="#" onclick="$('.songRow').show();$('#moreVideos').hide(); "><fmt:message key="search.hits.more"/></a></div> 268 </c:if> 269</c:if> 270 271<div> 272 273</body></html>