mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Unlint CfP views #BetterPlace
This commit is contained in:
parent
195d7e08ac
commit
21c5b842b1
11 changed files with 89 additions and 55 deletions
19
app/helpers/admin/cfps_helper.rb
Normal file
19
app/helpers/admin/cfps_helper.rb
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Admin
|
||||
module CfpsHelper
|
||||
def cfp_form_url(cfp, conference)
|
||||
if cfp.new_record?
|
||||
admin_conference_program_cfps_path
|
||||
else
|
||||
admin_conference_program_cfp_path(conference, cfp)
|
||||
end
|
||||
end
|
||||
|
||||
def select_cfp_types(cfp, program)
|
||||
cfp_types = program.remaining_cfp_types
|
||||
cfp_types.unshift(cfp.cfp_type) unless cfp.new_record?
|
||||
cfp_types.map { |cfp_type| ["#{cfp_type.capitalize}", cfp_type] }
|
||||
end
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue