Add 'Vote not found'

This commit is contained in:
ricola 2026-01-09 16:05:03 -06:00
parent ec173f450d
commit 33bc3e1446
2 changed files with 17 additions and 10 deletions

View file

@ -319,17 +319,21 @@ end
get '/votes/:id' do get '/votes/:id' do
require_login require_login
find_vote find_vote
case @vote.state if not @vote
when 'draft' erb :votes_show_unknown
if @vote.users.exists?(current_user.id) else
erb :votes_edit case @vote.state
else when 'draft'
erb :votes_show_draft if @vote.users.exists?(current_user.id)
erb :votes_edit
else
erb :votes_show_draft
end
when 'open'
erb :votes_show_open
when 'closed'
erb :votes_show_closed
end end
when 'open'
erb :votes_show_open
when 'closed'
erb :votes_show_closed
end end
end end

View file

@ -0,0 +1,3 @@
<div class="mb-5">
<h1><%= _("Vote not found...") %></h1>
</div>