Skip to content

Commit 506bc7c

Browse files
committed
removes deprecated conference tile bg image and font color
1 parent 6392abf commit 506bc7c

File tree

8 files changed

+16
-23
lines changed

8 files changed

+16
-23
lines changed

app/controllers/admin/conferences_controller.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,6 @@ def conference_params
181181
:rooms_attributes, :tracks_attributes,
182182
:tickets_attributes, :event_types_attributes,
183183
:picture, :picture_cache, :background, :background_cache,
184-
:tile_background, :tile_background_cache, :tile_font_color,
185184
:policies_attributes,:policy_ids,
186185
:questions_attributes,:question_ids, :answers_attributes,
187186
:answer_ids, :difficulty_levels_attributes,

app/models/conference.rb

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ class Conference < ActiveRecord::Base
7070

7171
mount_uploader :picture, PictureUploader, mount_on: :logo_file_name
7272
mount_uploader :background, BackgroundUploader, mount_on: :background_file_name
73-
mount_uploader :tile_background, BackgroundUploader, mount_on: :tile_background_file_name
7473

7574
validates_presence_of :title,
7675
:short_title,
@@ -719,7 +718,7 @@ def highlighted_speakers
719718
def previous_conferences
720719
Conference.where("conference_group_id = ? AND start_date < ?", conference_group_id, start_date).order('start_date')
721720
end
722-
721+
723722
private
724723

725724
# Returns a different html colour for every i and consecutive colors are
@@ -1177,7 +1176,7 @@ def self.calculate_user_submission_hash(submitters, counter)
11771176

11781177

11791178
def create_email_settings
1180-
build_email_settings(EMAIL_SETTINGS_DEFAULTS)
1179+
build_email_settings(EMAIL_SETTINGS_DEFAULTS)
11811180
true
11821181
end
11831182

@@ -1250,7 +1249,7 @@ def handle_timezone_change
12501249
tz_old = ActiveSupport::TimeZone.new(tzchanges[0])
12511250
tz_new = ActiveSupport::TimeZone.new(tzchanges[1])
12521251
tzdiff = tz_old.utc_offset - tz_new.utc_offset
1253-
if tzdiff != 0
1252+
if tzdiff != 0
12541253
program.selected_schedule.event_schedules.destroy_all if program.selected_schedule
12551254
end
12561255
end

app/uploaders/background_uploader.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ def object_class_name
2828

2929
# compatibility with our paperclip storage paths..
3030
def extra_store_dir
31-
return 'backgrounds' if mounted_as == :background
32-
'tile_backgrounds'
31+
'backgrounds'
3332
end
3433

3534
# Returns the id of the instance in a split path form. e.g. returns

app/views/admin/conferences/edit.html.haml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,6 @@
2929
= f.input :background, :label => false, :hint => "This image will be used as the splashpage background."
3030
= f.hidden_field :background_cache
3131

32-
= f.input :tile_font_color, :hint => "The color to be used for the conference tile font", :input_html => {:size => 6, :type => "color", :class => 'color-picker'}
33-
34-
= f.label 'Conference Tile Background Image'
35-
%br
36-
- if @conference.tile_background?
37-
= image_tag @conference.tile_background.thumb.url
38-
= f.input :tile_background, :label => false, :hint => "This image will be used as conference tile background."
39-
= f.hidden_field :tile_background_cache
40-
41-
4232
= f.input :ticket_layout, as: :select, collection: Conference.ticket_layouts.keys, hint: "Layout type for tickets of the conference."
4333

4434
= f.inputs :name => "Scheduling" do

app/views/refinery/pages/home.html.haml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,8 @@
3030
$(document).ready(function() {
3131
//override background if conference has one
3232
var banner_bg = "#{::Refinery::Setting.find_or_set(:banner_background, '')}"
33-
console.log(banner_bg)
3433
if(banner_bg !== '') {
3534
$('.home-banner').css('background', banner_bg);
3635
}
3736
});
3837
});
39-

app/views/refinery/pages/shared/_conference_block_tile.haml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
- card_style = conference.tile_background? ? "background: url(#{conference.tile_background.url}) no-repeat scroll 0px 0px / cover;" : "background-color: #{conference.color};"
2-
.card.conference-card.text-white{style: "#{card_style}"}
1+
.card.conference-card.text-white
32
%img.card-img-top{src: "#{conference.picture? ? conference.picture.url : 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7'}"}
4-
.card-block{style: "color: #{conference.tile_font_color}"}
3+
.card-block
54
.card-text.h3
65
= date_string(conference.start_date, conference.end_date)
76
.card-text.h4
@@ -16,7 +15,6 @@
1615
= link_to "Register", main_app.conference_buytickets_path(conference.short_title), class: "btn btn-success btn-block", disabled: conference.registration_limit_exceeded?
1716
- elsif conference.splashpage.include_sponsors && !conference.ended?
1817
= link_to "Sponsor!", main_app.conference_sponsorships_path(conference.short_title), :class =>"btn btn-warning btn-block"
19-
2018

2119
.col-md-6
2220
= link_to "Learn More", main_app.conference_path(conference.short_title), :class =>"btn btn-info btn-block"
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
class RemoveTileFontColorFromConference < ActiveRecord::Migration
2+
def change
3+
remove_column :conferences, :tile_font_color, :string
4+
end
5+
end
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
class RemoveTileBackgroundImageFromConference < ActiveRecord::Migration
2+
def change
3+
remove_column :conferences, :tile_background_file_name, :string
4+
end
5+
end

0 commit comments

Comments
 (0)