First pass at basic functionality.
This PR introduces the beginnings of Sprint Padawan. Reviewed-on: #1
This commit was merged in pull request #1.
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
{{$userVote := .UserVote}} {{$roomID := .RoomID}} {{$storyID := .Story.ID}}
|
||||
<div class="vote-form" id="vote-form-{{$storyID}}">
|
||||
{{range scaleToOptions .Scale}}
|
||||
<button
|
||||
type="button"
|
||||
hx-post="/rooms/{{$roomID}}/vote"
|
||||
hx-target="#vote-form-{{$storyID}}"
|
||||
hx-swap="outerHTML"
|
||||
hx-vals='{"story_id":"{{$storyID}}","value":"{{.}}"}'
|
||||
class="vote-option {{if eq . $userVote}}vote-selected{{end}}"
|
||||
>
|
||||
{{.}}
|
||||
</button>
|
||||
{{end}}
|
||||
</div>
|
||||
Reference in New Issue
Block a user