2024-08-05 00:23:17 +00:00
|
|
|
{{define "head"}}
|
|
|
|
<title>editing {{.Title}} - ari melody 💫</title>
|
|
|
|
<link rel="shortcut icon" href="{{.GetArtwork}}" type="image/x-icon">
|
|
|
|
|
|
|
|
<link rel="stylesheet" href="/admin/static/release.css">
|
|
|
|
{{end}}
|
|
|
|
|
|
|
|
{{define "content"}}
|
|
|
|
<main>
|
|
|
|
|
|
|
|
<div id="release" data-id="{{.ID}}">
|
|
|
|
<div class="release-artwork">
|
|
|
|
<img src="{{.Artwork}}" alt="" width="256" loading="lazy" id="artwork">
|
|
|
|
</div>
|
|
|
|
<div class="release-info">
|
|
|
|
<h1 class="release-title">
|
|
|
|
<!-- <input type="text" name="Title" value="{{.Title}}"> -->
|
|
|
|
<span id="title" editable="true">{{.Title}}</span>
|
|
|
|
<small>{{.GetReleaseYear}}</small>
|
|
|
|
</h1>
|
|
|
|
<table>
|
|
|
|
<tr>
|
|
|
|
<td>Artists</td>
|
|
|
|
<td>{{.PrintArtists true true}}</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>Type</td>
|
|
|
|
<td>
|
|
|
|
{{$t := .ReleaseType}}
|
|
|
|
<select name="Type" id="type">
|
|
|
|
<option value="single" {{if eq $t "single"}}selected{{end}}>
|
|
|
|
Single
|
|
|
|
</option>
|
|
|
|
<option value="album" {{if eq $t "album"}}selected{{end}}>
|
|
|
|
Album
|
|
|
|
</option>
|
|
|
|
<option value="ep" {{if eq $t "ep"}}selected{{end}}>
|
|
|
|
EP
|
|
|
|
</option>
|
|
|
|
<option value="compilation" {{if eq $t "compilation"}}selected{{end}}>
|
|
|
|
Compilation
|
|
|
|
</option>
|
|
|
|
</select>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>Description</td>
|
|
|
|
<td>
|
|
|
|
<textarea
|
|
|
|
name="Description"
|
|
|
|
value="{{.Description}}"
|
|
|
|
placeholder="No description provided."
|
|
|
|
rows="3"
|
|
|
|
id="description"
|
2024-08-23 22:08:28 +00:00
|
|
|
>{{.Description}}</textarea>
|
2024-08-05 00:23:17 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>Release Date</td>
|
|
|
|
<td>
|
|
|
|
<input type="datetime-local" name="Release Date" id="release-date" value="{{.TextReleaseDate}}">
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>Buy Name</td>
|
|
|
|
<td>
|
|
|
|
<input type="text" name="Buy Name" id="buyname" value="{{.Buyname}}">
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>Buy Link</td>
|
|
|
|
<td>
|
|
|
|
<input type="text" name="Buy Link" id="buylink" value="{{.Buylink}}">
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>Visible</td>
|
|
|
|
<td>
|
|
|
|
<select name="Visibility" id="visibility">
|
|
|
|
<option value="true" {{if .Visible}}selected{{end}}>True</option>
|
|
|
|
<option value="false" {{if not .Visible}}selected{{end}}>False</option>
|
|
|
|
</select>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
<div class="release-actions">
|
2024-08-23 22:08:28 +00:00
|
|
|
<a href="/music/{{.ID}}" class="button" target="_blank">Gateway <img src="/img/external-link.svg"/></a>
|
2024-08-05 00:23:17 +00:00
|
|
|
<button type="submit" class="save" id="save" disabled>Save</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="card-title">
|
|
|
|
<h2>Credits ({{len .Credits}})</h2>
|
2024-08-23 22:08:28 +00:00
|
|
|
<a class="button edit"
|
|
|
|
href="/admin/release/{{.ID}}/editcredits"
|
|
|
|
hx-get="/admin/release/{{.ID}}/editcredits"
|
|
|
|
hx-target="body"
|
|
|
|
hx-swap="beforeend"
|
|
|
|
>Edit</a>
|
2024-08-05 00:23:17 +00:00
|
|
|
</div>
|
|
|
|
<div class="card credits">
|
2024-08-23 22:08:28 +00:00
|
|
|
{{range .Credits}}
|
2024-08-05 00:23:17 +00:00
|
|
|
<div class="credit">
|
2024-08-23 22:08:28 +00:00
|
|
|
<img src="{{.Artist.GetAvatar}}" alt="" width="64" loading="lazy" class="artist-avatar">
|
2024-08-05 00:23:17 +00:00
|
|
|
<div class="credit-info">
|
2024-08-23 22:08:28 +00:00
|
|
|
<p class="artist-name"><a href="/admin/artists/{{.Artist.ID}}">{{.Artist.Name}}</a></p>
|
2024-08-05 00:23:17 +00:00
|
|
|
<p class="artist-role">
|
2024-08-23 22:08:28 +00:00
|
|
|
{{.Role}}
|
|
|
|
{{if .Primary}}
|
2024-08-05 00:23:17 +00:00
|
|
|
<small>(Primary)</small>
|
|
|
|
{{end}}
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
{{if not .Credits}}
|
|
|
|
<p>There are no credits.</p>
|
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
|
2024-08-23 22:08:28 +00:00
|
|
|
<div class="card-title">
|
|
|
|
<h2>Links ({{len .Links}})</h2>
|
|
|
|
<a class="button edit"
|
|
|
|
href="/admin/release/{{.ID}}/editlinks"
|
|
|
|
hx-get="/admin/release/{{.ID}}/editlinks"
|
|
|
|
hx-target="body"
|
|
|
|
hx-swap="beforeend"
|
|
|
|
>Edit</a>
|
|
|
|
</div>
|
|
|
|
<div class="card links">
|
|
|
|
{{range .Links}}
|
|
|
|
<div class="release-link" data-id="{{.Name}}">
|
|
|
|
<a href="{{.URL}}" class="button">{{.Name}} <img src="/img/external-link.svg"/></a></p>
|
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
|
2024-08-05 00:23:17 +00:00
|
|
|
<div class="card-title">
|
|
|
|
<h2>Tracklist ({{len .Tracks}})</h2>
|
2024-08-23 22:08:28 +00:00
|
|
|
<a class="button edit"
|
|
|
|
href="/admin/release/{{.ID}}/edittracks"
|
|
|
|
hx-get="/admin/release/{{.ID}}/edittracks"
|
|
|
|
hx-target="body"
|
|
|
|
hx-swap="beforeend"
|
|
|
|
>Edit</a>
|
2024-08-05 00:23:17 +00:00
|
|
|
</div>
|
|
|
|
<div class="card tracks">
|
2024-08-23 22:08:28 +00:00
|
|
|
{{range .Tracks}}
|
|
|
|
<div class="track" data-id="{{.ID}}">
|
|
|
|
<h2 class="track-title">{{.Number}}. {{.Title}}</h2>
|
|
|
|
<p class="track-id">{{.ID}}</p>
|
|
|
|
{{if .Description}}
|
|
|
|
<p class="track-description">{{.Description}}</p>
|
2024-08-05 00:23:17 +00:00
|
|
|
{{else}}
|
|
|
|
<p class="track-description empty">No description provided.</p>
|
|
|
|
{{end}}
|
2024-08-23 22:08:28 +00:00
|
|
|
{{if .Lyrics}}
|
|
|
|
<p class="track-lyrics">{{.Lyrics}}</p>
|
2024-08-05 00:23:17 +00:00
|
|
|
{{else}}
|
|
|
|
<p class="track-lyrics empty">There are no lyrics.</p>
|
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</main>
|
|
|
|
|
|
|
|
<script type="module" src="/admin/static/edit-release.js" defer></script>
|
|
|
|
{{end}}
|