2024-08-05 00:23:17 +00:00
|
|
|
{{define "head"}}
|
2024-08-31 14:25:44 +00:00
|
|
|
<title>Editing {{.Title}} - ari melody 💫</title>
|
2024-08-05 00:23:17 +00:00
|
|
|
<link rel="shortcut icon" href="{{.GetArtwork}}" type="image/x-icon">
|
|
|
|
|
2024-08-31 00:30:30 +00:00
|
|
|
<link rel="stylesheet" href="/admin/static/edit-release.css">
|
2024-08-05 00:23:17 +00:00
|
|
|
{{end}}
|
|
|
|
|
|
|
|
{{define "content"}}
|
|
|
|
<main>
|
|
|
|
|
|
|
|
<div id="release" data-id="{{.ID}}">
|
|
|
|
<div class="release-artwork">
|
|
|
|
<img src="{{.Artwork}}" alt="" width="256" loading="lazy" id="artwork">
|
2024-08-31 00:30:30 +00:00
|
|
|
<input type="file" id="artwork-file" name="Artwork" accept=".png,.jpg,.jpeg" hidden>
|
2024-08-05 00:23:17 +00:00
|
|
|
</div>
|
|
|
|
<div class="release-info">
|
|
|
|
<h1 class="release-title">
|
2024-08-31 00:30:30 +00:00
|
|
|
<input type="text" id="title" name="Title" value="{{.Title}}">
|
2024-08-05 00:23:17 +00:00
|
|
|
</h1>
|
|
|
|
<table>
|
|
|
|
<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."
|
2024-08-31 00:30:30 +00:00
|
|
|
rows="1"
|
2024-08-05 00:23:17 +00:00
|
|
|
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}}
|
2024-08-31 00:30:30 +00:00
|
|
|
<a href="{{.URL}}" target="_blank" class="button" data-name="{{.Name}}">{{.Name}} <img src="/img/external-link.svg"/></a>
|
2024-08-23 22:08:28 +00:00
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
|
2024-08-31 14:25:44 +00:00
|
|
|
<div class="card-title" id="tracks">
|
2024-08-05 00:23:17 +00:00
|
|
|
<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}}">
|
2024-08-31 00:30:30 +00:00
|
|
|
<h2 class="track-title">
|
|
|
|
<span class="track-number">{{.Number}}</span>
|
|
|
|
<a href="/admin/track/{{.ID}}">{{.Title}}</a>
|
|
|
|
</h2>
|
|
|
|
|
|
|
|
<h3>Description</h3>
|
2024-08-23 22:08:28 +00:00
|
|
|
{{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-31 00:30:30 +00:00
|
|
|
|
|
|
|
<h3>Lyrics</h3>
|
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>
|
|
|
|
|
2024-08-31 14:25:44 +00:00
|
|
|
<div class="card-title">
|
|
|
|
<h2>Danger Zone</h2>
|
|
|
|
</div>
|
|
|
|
<div class="card danger">
|
|
|
|
<p>
|
|
|
|
Clicking the button below will delete this release.
|
|
|
|
This action is <strong>irreversible</strong>.
|
|
|
|
You will be prompted to confirm this decision.
|
|
|
|
</p>
|
|
|
|
<button class="delete" id="delete">Delete Release</button>
|
|
|
|
</div>
|
|
|
|
|
2024-08-05 00:23:17 +00:00
|
|
|
</main>
|
|
|
|
|
|
|
|
<script type="module" src="/admin/static/edit-release.js" defer></script>
|
|
|
|
{{end}}
|