Added quick link to create new project from channel page

This commit is contained in:
2023-03-06 23:44:51 -05:00
parent 4735047682
commit 9b6e38a313
3 changed files with 11 additions and 2 deletions

View File

@ -14,10 +14,17 @@ namespace '/video' do
end
get '/create' do
# check if there's a channel specified
selected_channel = false
if params.has_key?(:channel)
selected_channel = params[:channel].to_i()
end
channels = Channel.all()
erb :'video/create', :locals => {
:title => 'Create new video',
:channels => channels
:channels => channels,
:selected_channel => selected_channel
}
end
post '/create' do