Adds domain support to OSEM

- This is a very basic support. All it affects is the listings
  on the homepage. Every conference can set a domain, and as
  long as the request host matches this domain, the conference
  will be shown on the list
- If a conference does not have a domain set (which will be the
  case for older conferences), such conferences are shown
  always
- Conference creation and edits now have an optional domain field
- Also adds corresponding migrations (+index)
This commit is contained in:
Abhay Rana 2017-02-02 02:12:49 +05:30
parent 945b4aac60
commit 92750a4a2b
8 changed files with 21 additions and 4 deletions

View file

@ -9,6 +9,7 @@
= semantic_form_for(@conference, :url => admin_conference_path(@conference.short_title),:html => {:multipart => true}) do |f|
= f.input :title, :hint => "The full title of the conference, e.g. 'openSUSE Conference 2014'"
= f.input :short_title, :hint => "A short title, e.g. 'oSC14', to be used in URLs"
= f.input :domain, hint: "Optional domain on which the conference will be visible. This only affects the conference listings."
= f.input :description, hint: markdown_hint('A description of the conference.'), input_html: { rows: 5, data: { provide: 'markdown-editable' } }
= f.input :color, :hint => "The color will be used eg for the dashboard.", :input_html => {:size => 6, :type => "color"}
= f.label 'Conference Logo'

View file

@ -6,6 +6,7 @@
input_html: { required: 'required' }
= f.input :short_title, hint: "A short and unique handle for your conference, using only lower-case letters, numbers and underscores. This will be used to identify your conference in URLs etc. Example: 'froscon2011'",
input_html: { required: 'required' }
= f.input :domain, hint: "Optional domain on which the conference will be visible. This only affects the conference listings."
= f.inputs 'Scheduling' do
= f.input :timezone, as: :time_zone, default: Time.zone.name, hint: 'Please select in what time zone your conference will take place.'
= f.input :start_date, as: :string, input_html: { id: 'conference-start-datepicker', required: 'required' }