<% import com.jdbernard.nlsongs.servlet.NLSongsContext import static com.jdbernard.nlsongs.model.ServiceType.* songsDB = NLSongsContext.songsDB pathInfo = ((request.pathInfo?:"").split('/') as List).findAll() if (pathInfo.size() != 1 || !pathInfo[0].isInteger()) { response.sendError(response.SC_NOT_FOUND); return } service = songsDB.findService(pathInfo[0] as int) if (!service) { response.sendError(response.SC_NOT_FOUND); return } %> <%= service.localDate.toString("yyyy-MM-dd") %> (<%= service.serviceType.displayName %>) - New Life Songs Database

New Life Songs

<%= service.localDate.toString("yyyy-MM-dd") %>: (<%= service.description ?: service.serviceType.displayName %>)

Performances

<% songsDB.findPerformancesForServiceId(service.id). collect { [perf: it, song: songsDB.findSong(it.songId)] }. sort { it.song.name }.sort { it.perf.rank }.each { row -> %> <% } %>
Song Artists Worship Leader Piano Organ Bass Drums Guitar
<%= row.song.name %> <%= row.song.artists.join(", ") %> <%= row.perf.leader ?: "" %> <%= row.perf.pianist ?: "" %> <%= row.perf.organist ?: "" %> <%= row.perf.bassist ?: "" %> <%= row.perf.drummer ?: "" %> <%= row.perf.guitarist ?: "" %>