Begin album reviews
Album reviews would ideally allow you to rate tracks at the same time, so we'll have to work on that next. Also, disambiguation pages are becoming more and more necessary (Little Talks in inaccessible atm) Preferably, we start working on the `INDEX` for `/ratings` as well, and maybe use a unified language for these things (is it review, rating, rating_text, score,...?)
This commit is contained in:
parent
9f27fad235
commit
0b7efc3420
6 changed files with 98 additions and 22 deletions
|
|
@ -28,17 +28,17 @@
|
|||
<h2>Rating</h2>
|
||||
<div id="review-container">
|
||||
@zig {
|
||||
if (reviews.len == 0) {
|
||||
<form>
|
||||
<input type="number" name="score" id="score" style="width:50px;height:30px">
|
||||
<textarea name="review" id="review" style="width:350px;height:100px"></textarea>
|
||||
<button hx-post="/ratings/songs" hx-vals='{"song_id":"{{.song.song_id}}"}' hx-target="#review-container" style="width:50px;height:30px">Post</button>
|
||||
</form>
|
||||
} else {
|
||||
for (reviews) |review| {
|
||||
<b>{{review.score}}</b>: {{review.review}} ({{review.date}})
|
||||
}
|
||||
}
|
||||
if (reviews.len == 0) {
|
||||
<form>
|
||||
<input type="number" name="score" id="score" style="width:50px;height:30px">
|
||||
<textarea name="review" id="review" style="width:350px;height:100px"></textarea>
|
||||
<button hx-post="/ratings/songs" hx-vals='{"song_id":"{{.song.song_id}}"}' hx-target="#review-container" style="width:50px;height:30px">Post</button>
|
||||
</form>
|
||||
} else {
|
||||
for (reviews) |review| {
|
||||
<b>{{review.score}}</b>: {{review.review}} ({{review.date}})
|
||||
}
|
||||
}
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue