Add a very basic custom_css property to a conference.
It is loaded on all pages for that conference.
This commit is contained in:
parent
a1775674ce
commit
4c29d57aae
5 changed files with 18 additions and 3 deletions
|
|
@ -182,7 +182,7 @@ module Admin
|
|||
:vpositions_attributes, :use_volunteers, :color,
|
||||
:sponsorship_levels_attributes, :sponsors_attributes,
|
||||
:registration_limit, :organization_id, :ticket_layout,
|
||||
:booth_limit)
|
||||
:booth_limit, :custom_css)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -17,6 +17,11 @@
|
|||
= image_tag @conference.picture.thumb.url
|
||||
= f.input :picture, label: false, hint: 'This will be displayed on the front page.'
|
||||
= f.hidden_field :picture_cache
|
||||
|
||||
= f.input :custom_css,
|
||||
hint: "Add Custon CSS to the main page. You might find the class '.conference-#{@conference.short_title}' useful.",
|
||||
input_html: { rows: 5 }
|
||||
|
||||
= f.input :ticket_layout, as: :select, collection: Conference.ticket_layouts.keys, hint: "Layout type for tickets of the conference."
|
||||
= f.inputs name: 'Scheduling' do
|
||||
= f.input :timezone, as: :time_zone, hint: 'The conference time zone'
|
||||
|
|
|
|||
|
|
@ -21,6 +21,10 @@
|
|||
= javascript_include_tag "//cdn.transifex.com/live.js"
|
||||
|
||||
= yield(:head)
|
||||
- if @conference && @conference.custom_css?
|
||||
%style{type: 'text/css'}
|
||||
= @conference.custom_css
|
||||
|
||||
%body{ class: ("conference-#{@conference.short_title}" if @conference) }
|
||||
= render 'layouts/navigation', conference: @conference
|
||||
-# Admin area
|
||||
|
|
|
|||
|
|
@ -0,0 +1,5 @@
|
|||
class AddCustomCssToConfereneces < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_column :conferences, :custom_css, :text
|
||||
end
|
||||
end
|
||||
|
|
@ -10,7 +10,7 @@
|
|||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(version: 2020_07_10_215300) do
|
||||
ActiveRecord::Schema.define(version: 2020_07_15_001812) do
|
||||
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "plpgsql"
|
||||
|
|
@ -107,6 +107,7 @@ ActiveRecord::Schema.define(version: 2020_07_10_215300) do
|
|||
t.integer "ticket_layout", default: 0
|
||||
t.string "custom_domain"
|
||||
t.integer "booth_limit", default: 0
|
||||
t.text "custom_css"
|
||||
t.index ["organization_id"], name: "index_conferences_on_organization_id"
|
||||
end
|
||||
|
||||
|
|
@ -406,7 +407,7 @@ ActiveRecord::Schema.define(version: 2020_07_10_215300) do
|
|||
t.string "name", null: false
|
||||
t.integer "size"
|
||||
t.integer "venue_id", null: false
|
||||
t.string "url"
|
||||
t.text "url"
|
||||
end
|
||||
|
||||
create_table "schedules", force: :cascade do |t|
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue