Add 'Vote not found'
This commit is contained in:
parent
ec173f450d
commit
33bc3e1446
2 changed files with 17 additions and 10 deletions
4
vedia.rb
4
vedia.rb
|
|
@ -319,6 +319,9 @@ end
|
||||||
get '/votes/:id' do
|
get '/votes/:id' do
|
||||||
require_login
|
require_login
|
||||||
find_vote
|
find_vote
|
||||||
|
if not @vote
|
||||||
|
erb :votes_show_unknown
|
||||||
|
else
|
||||||
case @vote.state
|
case @vote.state
|
||||||
when 'draft'
|
when 'draft'
|
||||||
if @vote.users.exists?(current_user.id)
|
if @vote.users.exists?(current_user.id)
|
||||||
|
|
@ -331,6 +334,7 @@ get '/votes/:id' do
|
||||||
when 'closed'
|
when 'closed'
|
||||||
erb :votes_show_closed
|
erb :votes_show_closed
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
get '/votes/:id/edit' do
|
get '/votes/:id/edit' do
|
||||||
|
|
|
||||||
3
views/votes_show_unknown.erb
Normal file
3
views/votes_show_unknown.erb
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
<div class="mb-5">
|
||||||
|
<h1><%= _("Vote not found...") %></h1>
|
||||||
|
</div>
|
||||||
Loading…
Add table
Add a link
Reference in a new issue