1<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="iso-8859-1"%> 2<%@ include file="include.jsp" %> 3 4<%-- 5PARAMETERS 6 id: ID of file. 7 album: Whether the file is a album, albumset. 8 video: Whether the file is a video (default false). 9 playEnabled: Whether the current user is allowed to play songs (default true). 10 playMoreEnabled: 11 addEnabled: Whether the current user is allowed to add songs to the playlist (default true). 12 addNextEnabled: Whether the current user is allowed to add songs to the playlist (default flase). 13 addLastEnabled: Whether the current user is allowed to add songs to the playlist (default false). 14 downloadEnabled: Whether the current user is allowed to download songs (default false). 15 starEnabled: Whether to show star/unstar controls (default false). 16 loveEnabled: Whether to show love/unlove controls (default false). 17 starred: Whether the file is currently starred. 18 loved: Whether the file is currently loved. 19 asTable: Whether to put the images in td tags. 20 YoutubeEnabled: Whether to show Youtube Control. 21 LyricEnabled: Whether to show LyricURL. 22 onPlay: Overrides the javascript used for the play action. 23--%> 24 25<madsonic:url value="/download.view" var="downloadUrl"> 26 <madsonic:param name="id" value="${param.id}"/> 27</madsonic:url> 28 29<c:if test="${param.loveEnabled}"> 30<c:if test="${param.asTable}"><td class="fit"></c:if> 31 32<c:choose> 33<c:when test="${param.album}"> 34<div class="icon-wrapper"> 35<i class="fa fa-ban custom-icon"></i></div> 36</c:when> 37<c:otherwise> 38<div class="icon-wrapper"> 39<i class="fa ${param.loved ? 'fa-heart loved' : 'fa-heart-o'} clickable custom-icon" onclick="toggleLoved(${param.id}, this)"title="<fmt:message key="common.love"/>"><span class="fix-editor"> </span></i></div> 40</c:otherwise> 41</c:choose> 42<c:if test="${param.asTable}"></td></c:if> 43</c:if> 44 45 46<c:if test="${param.starEnabled}"> 47<c:if test="${param.asTable}"><td class="fit"></c:if> 48<div class="icon-wrapper"> 49<i class="fa ${param.starred ? 'fa-star starred' : 'fa-star-o'} clickable custom-icon" onclick="toggleStar(${param.id}, this)"title="<fmt:message key="common.star"/>"><span class="fix-editor"> </span></i></div> 50<c:if test="${param.asTable}"></td></c:if> 51</c:if> 52 53 54<c:if test="${empty param.playEnabled or param.playEnabled}"> 55 <c:choose> 56 <c:when test="${param.video}"> 57 <madsonic:url value="/videoPlayer.view" var="videoUrl"> 58 <madsonic:param name="id" value="${param.id}"/> 59 </madsonic:url> 60 61 <%-- Open video in new window if Chromecast is already initialized in play queue. --%> 62 <c:if test="${param.asTable}"><td class="fit"></c:if> 63 <div class="icon-wrapper"><i class="fa fa-play clickable custom-icon" onclick="location.href='${videoUrl}'"title="<fmt:message key="common.play"/>"><span class="fix-editor"> </span></i></div> 64 <c:if test="${param.asTable}"></td></c:if> 65 </c:when> 66 67 <c:when test="${not empty param.onPlay}"> 68 <c:if test="${param.asTable}"><td class="fit"></c:if> 69 <i class="fa fa-play clickable icon custom-icon" onclick="${param.onPlay}" title="<fmt:message key="common.play"/>"></i> 70 <c:if test="${param.asTable}"></td></c:if> 71 </c:when> 72 73 <c:otherwise> 74 <c:if test="${param.asTable}"><td class="fit"></c:if> 75 <div class="icon-wrapper"><i class="fa fa-play clickable custom-icon" onclick="parent.playQueue.onPlay(${param.id})"title="<fmt:message key="common.play"/>"><span class="fix-editor"> </span></i></div> 76 <c:if test="${param.asTable}"></td></c:if> 77 78 <c:if test="${param.playAddEnabled}"> 79 <c:if test="${param.asTable}"><td class="fit"></c:if> 80 <div class="icon-wrapper"> 81 <span class="fa-stack custom-icon" onclick="parent.playQueue.onPlayAdd(${param.id})" title="<fmt:message key="common.playadd"/>"> 82 <i class="fa fa-play fa-stack-1x" style="margin-left:-2px;margin-top:-3px"></i> 83 <i class="fa fa-plus fa-stack-1x" style="margin-left:3px;margin-top:2px"></i> 84 </span> 85 </div> 86 87 88 <c:if test="${param.asTable}"></td></c:if> 89 </c:if> 90 91 <c:if test="${param.playMoreEnabled}"> 92 <c:if test="${param.asTable}"><td class="fit"></c:if> 93 <div class="icon-wrapper"> 94 <span class="fa-stack custom-icon" onclick="parent.playQueue.onPlayMore(${param.id})" title="<fmt:message key="common.playmore"/>"> 95 <i class="fa fa-play fa-stack-1x" style="margin-left:-2px;margin-top:-3px"></i> 96 <i class="fa fa-file-text-o fa-stack-1x" style="margin-left:3px;margin-top:2px"></i> 97 </span> 98 </div> 99 <c:if test="${param.asTable}"></td></c:if> 100 </c:if> 101 102 </c:otherwise> 103 </c:choose> 104</c:if> 105 106<c:if test="${(empty param.addEnabled or param.addEnabled) and not param.video}"> 107<c:if test="${param.asTable}"><td class="fit"></c:if> 108 <div class="icon-wrapper"><i class="fa fa-plus custom-icon" id="add${param.id}" title="<fmt:message key="common.add"/>"><span class="fix-editor"> </span></i></div> 109<c:if test="${param.asTable}"></td></c:if> 110</c:if> 111 112<c:if test="${(param.addNextEnabled) and not param.video}"> 113<c:if test="${param.asTable}"><td class="fit"></c:if> 114 <i class="fa fa-plus-circle clickable icon custom-icon" onclick="parent.playQueue.onAddNext(${param.id});" title="<fmt:message key="common.addnext"/>"></i> 115 <c:if test="${param.asTable}"></td></c:if> 116</c:if> 117 118<c:if test="${(param.addLastEnabled) and not param.video}"> 119<c:if test="${param.asTable}"><td class="fit"></c:if> 120 <i class="fa fa-plus-circle clickable icon custom-icon" onclick="parent.playQueue.onAdd(${param.id});" title="<fmt:message key="common.addlast"/>"></i> 121<c:if test="${param.asTable}"></td></c:if> 122</c:if> 123 124<c:if test="${param.video}"> 125<c:if test="${param.playAddEnabled and param.asTable}"><td></td></c:if> 126<c:if test="${param.playMoreEnabled and param.asTable}"><td></td></c:if> 127<c:if test="${param.addEnabled and param.asTable}"><td></td></c:if> 128<c:if test="${param.addNextEnabled and param.asTable}"><td></td></c:if> 129<c:if test="${param.addLastEnabled and param.asTable}"><td></td></c:if> 130</c:if> 131 132<c:if test="${param.downloadEnabled}"> 133<c:if test="${param.asTable}"><td class="fit"></c:if> 134 <div class="icon-wrapper"><i class="fa fa-download clickable custom-icon" onclick="location.href='${downloadUrl}'" title="<fmt:message key="common.download"/>"><span class="fix-editor"> </span></i></div> 135<c:if test="${param.asTable}"></td></c:if> 136</c:if> 137 138<c:if test="${model.dir.album}"> 139 <c:if test="${param.asTable}"><td class="fit"></c:if> 140 <c:if test="${param.YoutubeEnabled}"> 141 142 <madsonic:url value="http://www.youtube.com/results" var="YoutubeUrl" encoding="UTF-8"> 143 <madsonic:param name="search_query" value="${param.artist} ${param.title}"/> 144 </madsonic:url> 145 <div class="icon-wrapper"><i class="fa fa-youtube clickable custom-icon" onclick="window.open('${YoutubeUrl}', '_blank')" title="<fmt:message key="common.youtube"/>""><span class="fix-editor"> </span></i></div> 146 <c:if test="${param.asTable}"></td></c:if> 147 </c:if> 148</c:if> 149 150<c:if test="${model.dir.album}"> 151 <c:if test="${param.asTable}"><td></c:if> 152 <c:if test="${param.LyricEnabled}"> 153 <madsonic:url value="/lyrics.view" var="lyricUrl"> 154 <madsonic:param name="id" value="${param.id}"/> 155 </madsonic:url> 156 <a href="${lyricUrl}" class="lightview clickable" data-lightview-type="iframe" data-lightview-options="width: 600, height: 480"> 157 <div class="icon-wrapper"><i class="fa fa-file-text-o custom-icon control" title="<fmt:message key="common.lyric"/>""><span class="fix-editor"> </span></i></div> 158 </a> 159 <c:if test="${param.asTable}"></td></c:if> 160 </c:if> 161</c:if> 162 163<script type="text/javascript"> 164 jQuery(function () { 165 jQuery.contextMenu({ 166 selector:'#add${param.id}', 167 trigger:'left', 168 callback:function (key, options) { 169 if (key == "addnext") { 170 parent.playQueue.onAddNext(${param.id}); 171 } else { 172 parent.playQueue.onAdd(${param.id}); 173 } 174 }, 175 items:{ 176 "addnext":{name:"<fmt:message key="main.addnext"/>"}, 177 "addlast":{name:"<fmt:message key="main.addlast"/>"} 178 } 179 }); 180 }); 181</script> 182