Add user photos
This commit is contained in:
parent
6dd372511f
commit
6d415d44e3
17 changed files with 32339 additions and 76 deletions
BIN
app/assets/images/person_large.png
Normal file
BIN
app/assets/images/person_large.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.2 KiB |
BIN
app/assets/images/person_small.png
Normal file
BIN
app/assets/images/person_small.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1 KiB |
BIN
app/assets/images/person_tiny.png
Normal file
BIN
app/assets/images/person_tiny.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 581 B |
|
|
@ -1,5 +1,5 @@
|
||||||
class Person < ActiveRecord::Base
|
class Person < ActiveRecord::Base
|
||||||
attr_accessible :email, :first_name, :last_name, :public_name, :biography, :company
|
attr_accessible :email, :first_name, :last_name, :public_name, :biography, :company, :avatar
|
||||||
|
|
||||||
has_many :event_people, :dependent => :destroy
|
has_many :event_people, :dependent => :destroy
|
||||||
has_many :events, :through => :event_people, :uniq => true
|
has_many :events, :through => :event_people, :uniq => true
|
||||||
|
|
@ -11,6 +11,10 @@ class Person < ActiveRecord::Base
|
||||||
before_create :generate_guid
|
before_create :generate_guid
|
||||||
before_save :set_public_name
|
before_save :set_public_name
|
||||||
|
|
||||||
|
has_attached_file :avatar,
|
||||||
|
:styles => {:tiny => "16x16>", :small => "32x32>", :large => "128x128>"},
|
||||||
|
:default_url => "person_:style.png"
|
||||||
|
validates_attachment_content_type :avatar, :content_type => [/jpg/, /jpeg/, /png/, /gif/]
|
||||||
def to_s
|
def to_s
|
||||||
if self.public_name.empty?
|
if self.public_name.empty?
|
||||||
self.first_name + " " + self.last_name
|
self.first_name + " " + self.last_name
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,8 @@
|
||||||
= f.fields_for :person do |p|
|
= f.fields_for :person do |p|
|
||||||
= p.inputs :first_name, :last_name, :public_name
|
= p.inputs :first_name, :last_name, :public_name
|
||||||
= p.input :company, :label => "Affiliation", :hint => "This could be a company, a user group, or nothing at all."
|
= p.input :company, :label => "Affiliation", :hint => "This could be a company, a user group, or nothing at all."
|
||||||
|
= image_tag current_user.person.avatar(:small)
|
||||||
|
= p.input :avatar, :label => "Picture", :hint => "Upload a new picture."
|
||||||
= p.input :biography, :input_html => {:rows => 5, "onkeyup" => "word_count(this, 'biography-count')"}, :for => :person
|
= p.input :biography, :input_html => {:rows => 5, "onkeyup" => "word_count(this, 'biography-count')"}, :for => :person
|
||||||
You have used
|
You have used
|
||||||
%span#biography-count #{current_user.person.biography_word_count}
|
%span#biography-count #{current_user.person.biography_word_count}
|
||||||
|
|
|
||||||
18
db/schema.rb
18
db/schema.rb
|
|
@ -60,14 +60,14 @@ ActiveRecord::Schema.define(:version => 20130107114930) do
|
||||||
|
|
||||||
create_table "event_attachments", :force => true do |t|
|
create_table "event_attachments", :force => true do |t|
|
||||||
t.integer "event_id"
|
t.integer "event_id"
|
||||||
t.string "title", :null => false
|
t.string "title", :null => false
|
||||||
t.string "attachment_file_name"
|
t.string "attachment_file_name"
|
||||||
t.string "attachment_content_type"
|
t.string "attachment_content_type"
|
||||||
t.integer "attachment_file_size"
|
t.integer "attachment_file_size"
|
||||||
t.datetime "attachment_updated_at"
|
t.datetime "attachment_updated_at"
|
||||||
t.boolean "public", :default => true
|
t.datetime "created_at", :null => false
|
||||||
t.datetime "created_at", :null => false
|
t.datetime "updated_at", :null => false
|
||||||
t.datetime "updated_at", :null => false
|
t.boolean "public"
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "event_people", :force => true do |t|
|
create_table "event_people", :force => true do |t|
|
||||||
|
|
@ -104,11 +104,11 @@ ActiveRecord::Schema.define(:version => 20130107114930) do
|
||||||
t.string "logo_content_type"
|
t.string "logo_content_type"
|
||||||
t.integer "logo_file_size"
|
t.integer "logo_file_size"
|
||||||
t.datetime "logo_updated_at"
|
t.datetime "logo_updated_at"
|
||||||
t.text "proposal_additional_speakers"
|
|
||||||
t.integer "track_id"
|
t.integer "track_id"
|
||||||
t.integer "room_id"
|
t.integer "room_id"
|
||||||
t.datetime "created_at", :null => false
|
t.datetime "created_at", :null => false
|
||||||
t.datetime "updated_at", :null => false
|
t.datetime "updated_at", :null => false
|
||||||
|
t.text "proposal_additional_speakers"
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "people", :force => true do |t|
|
create_table "people", :force => true do |t|
|
||||||
|
|
@ -137,6 +137,7 @@ ActiveRecord::Schema.define(:version => 20130107114930) do
|
||||||
t.boolean "using_affiliated_lodging", :default => true
|
t.boolean "using_affiliated_lodging", :default => true
|
||||||
t.date "arrival"
|
t.date "arrival"
|
||||||
t.date "departure"
|
t.date "departure"
|
||||||
|
t.text "additional_speakers"
|
||||||
t.datetime "created_at", :null => false
|
t.datetime "created_at", :null => false
|
||||||
t.datetime "updated_at", :null => false
|
t.datetime "updated_at", :null => false
|
||||||
end
|
end
|
||||||
|
|
@ -206,11 +207,12 @@ ActiveRecord::Schema.define(:version => 20130107114930) do
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "versions", :force => true do |t|
|
create_table "versions", :force => true do |t|
|
||||||
t.string "item_type", :null => false
|
t.string "item_type", :null => false
|
||||||
t.integer "item_id", :null => false
|
t.integer "item_id", :null => false
|
||||||
t.string "event", :null => false
|
t.string "event", :null => false
|
||||||
t.string "whodunnit"
|
t.string "whodunnit"
|
||||||
t.text "object"
|
t.text "object"
|
||||||
|
t.text "object_changes"
|
||||||
t.datetime "created_at"
|
t.datetime "created_at"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -1,53 +1,59 @@
|
||||||
---
|
---
|
||||||
rails.png: rails-a3386665c05a2d82f711a4aaa72d247c.png
|
person_large.png: person_large.png
|
||||||
rails/index.png: rails-a3386665c05a2d82f711a4aaa72d247c.png
|
person_large/index.png: person_large.png
|
||||||
ui-bg_flat_0_aaaaaa_40x100.png: ui-bg_flat_0_aaaaaa_40x100-7d1197a52442bc56fcad60d0390f4b32.png
|
person_small.png: person_small.png
|
||||||
ui-bg_flat_0_aaaaaa_40x100/index.png: ui-bg_flat_0_aaaaaa_40x100-7d1197a52442bc56fcad60d0390f4b32.png
|
person_small/index.png: person_small.png
|
||||||
ui-bg_flat_55_fbec88_40x100.png: ui-bg_flat_55_fbec88_40x100-6bd1905222cab173dc4996f12b7a07cb.png
|
person_tiny.png: person_tiny.png
|
||||||
ui-bg_flat_55_fbec88_40x100/index.png: ui-bg_flat_55_fbec88_40x100-6bd1905222cab173dc4996f12b7a07cb.png
|
person_tiny/index.png: person_tiny.png
|
||||||
ui-bg_glass_75_d0e5f5_1x400.png: ui-bg_glass_75_d0e5f5_1x400-d4e12d9ce6e2b20ae0aadf27c8dcd12c.png
|
rails.png: rails.png
|
||||||
ui-bg_glass_75_d0e5f5_1x400/index.png: ui-bg_glass_75_d0e5f5_1x400-d4e12d9ce6e2b20ae0aadf27c8dcd12c.png
|
rails/index.png: rails.png
|
||||||
ui-bg_glass_85_dfeffc_1x400.png: ui-bg_glass_85_dfeffc_1x400-d1dabcb9501a4ed8c9bfc1b19c966022.png
|
ui-bg_flat_0_aaaaaa_40x100.png: ui-bg_flat_0_aaaaaa_40x100.png
|
||||||
ui-bg_glass_85_dfeffc_1x400/index.png: ui-bg_glass_85_dfeffc_1x400-d1dabcb9501a4ed8c9bfc1b19c966022.png
|
ui-bg_flat_0_aaaaaa_40x100/index.png: ui-bg_flat_0_aaaaaa_40x100.png
|
||||||
ui-bg_glass_95_fef1ec_1x400.png: ui-bg_glass_95_fef1ec_1x400-ab58fbcd66af992f067fcbc7c6488996.png
|
ui-bg_flat_55_fbec88_40x100.png: ui-bg_flat_55_fbec88_40x100.png
|
||||||
ui-bg_glass_95_fef1ec_1x400/index.png: ui-bg_glass_95_fef1ec_1x400-ab58fbcd66af992f067fcbc7c6488996.png
|
ui-bg_flat_55_fbec88_40x100/index.png: ui-bg_flat_55_fbec88_40x100.png
|
||||||
ui-bg_gloss-wave_55_5c9ccc_500x100.png: ui-bg_gloss-wave_55_5c9ccc_500x100-b9ac529234515ff4971dee7e7281c14b.png
|
ui-bg_glass_75_d0e5f5_1x400.png: ui-bg_glass_75_d0e5f5_1x400.png
|
||||||
ui-bg_gloss-wave_55_5c9ccc_500x100/index.png: ui-bg_gloss-wave_55_5c9ccc_500x100-b9ac529234515ff4971dee7e7281c14b.png
|
ui-bg_glass_75_d0e5f5_1x400/index.png: ui-bg_glass_75_d0e5f5_1x400.png
|
||||||
ui-bg_inset-hard_100_f5f8f9_1x100.png: ui-bg_inset-hard_100_f5f8f9_1x100-ad5cffb7206618b1667599d7c6c24e00.png
|
ui-bg_glass_85_dfeffc_1x400.png: ui-bg_glass_85_dfeffc_1x400.png
|
||||||
ui-bg_inset-hard_100_f5f8f9_1x100/index.png: ui-bg_inset-hard_100_f5f8f9_1x100-ad5cffb7206618b1667599d7c6c24e00.png
|
ui-bg_glass_85_dfeffc_1x400/index.png: ui-bg_glass_85_dfeffc_1x400.png
|
||||||
ui-bg_inset-hard_100_fcfdfd_1x100.png: ui-bg_inset-hard_100_fcfdfd_1x100-9f0c2e70b06a9eaec77d569b25b04d7e.png
|
ui-bg_glass_95_fef1ec_1x400.png: ui-bg_glass_95_fef1ec_1x400.png
|
||||||
ui-bg_inset-hard_100_fcfdfd_1x100/index.png: ui-bg_inset-hard_100_fcfdfd_1x100-9f0c2e70b06a9eaec77d569b25b04d7e.png
|
ui-bg_glass_95_fef1ec_1x400/index.png: ui-bg_glass_95_fef1ec_1x400.png
|
||||||
ui-icons_217bc0_256x240.png: ui-icons_217bc0_256x240-2f9a30594e6475d5f34e3e43d6447b41.png
|
ui-bg_gloss-wave_55_5c9ccc_500x100.png: ui-bg_gloss-wave_55_5c9ccc_500x100.png
|
||||||
ui-icons_217bc0_256x240/index.png: ui-icons_217bc0_256x240-2f9a30594e6475d5f34e3e43d6447b41.png
|
ui-bg_gloss-wave_55_5c9ccc_500x100/index.png: ui-bg_gloss-wave_55_5c9ccc_500x100.png
|
||||||
ui-icons_2e83ff_256x240.png: ui-icons_2e83ff_256x240-2ea4c160a75c1992daa2eeac86255b99.png
|
ui-bg_inset-hard_100_f5f8f9_1x100.png: ui-bg_inset-hard_100_f5f8f9_1x100.png
|
||||||
ui-icons_2e83ff_256x240/index.png: ui-icons_2e83ff_256x240-2ea4c160a75c1992daa2eeac86255b99.png
|
ui-bg_inset-hard_100_f5f8f9_1x100/index.png: ui-bg_inset-hard_100_f5f8f9_1x100.png
|
||||||
ui-icons_469bdd_256x240.png: ui-icons_469bdd_256x240-232cd1e8416c1a5e7bbc316084708d2c.png
|
ui-bg_inset-hard_100_fcfdfd_1x100.png: ui-bg_inset-hard_100_fcfdfd_1x100.png
|
||||||
ui-icons_469bdd_256x240/index.png: ui-icons_469bdd_256x240-232cd1e8416c1a5e7bbc316084708d2c.png
|
ui-bg_inset-hard_100_fcfdfd_1x100/index.png: ui-bg_inset-hard_100_fcfdfd_1x100.png
|
||||||
ui-icons_6da8d5_256x240.png: ui-icons_6da8d5_256x240-d155be4d851213e810cb13fc5e009fbf.png
|
ui-icons_217bc0_256x240.png: ui-icons_217bc0_256x240.png
|
||||||
ui-icons_6da8d5_256x240/index.png: ui-icons_6da8d5_256x240-d155be4d851213e810cb13fc5e009fbf.png
|
ui-icons_217bc0_256x240/index.png: ui-icons_217bc0_256x240.png
|
||||||
ui-icons_cd0a0a_256x240.png: ui-icons_cd0a0a_256x240-c0c1ec6a8bcf48fec40303e975a4dfa6.png
|
ui-icons_2e83ff_256x240.png: ui-icons_2e83ff_256x240.png
|
||||||
ui-icons_cd0a0a_256x240/index.png: ui-icons_cd0a0a_256x240-c0c1ec6a8bcf48fec40303e975a4dfa6.png
|
ui-icons_2e83ff_256x240/index.png: ui-icons_2e83ff_256x240.png
|
||||||
ui-icons_d8e7f3_256x240.png: ui-icons_d8e7f3_256x240-e5dd5fb46ca349d167fbabdcb57e8f7c.png
|
ui-icons_469bdd_256x240.png: ui-icons_469bdd_256x240.png
|
||||||
ui-icons_d8e7f3_256x240/index.png: ui-icons_d8e7f3_256x240-e5dd5fb46ca349d167fbabdcb57e8f7c.png
|
ui-icons_469bdd_256x240/index.png: ui-icons_469bdd_256x240.png
|
||||||
ui-icons_f9bd01_256x240.png: ui-icons_f9bd01_256x240-08305efda447dd00f0eaf5e34994bc92.png
|
ui-icons_6da8d5_256x240.png: ui-icons_6da8d5_256x240.png
|
||||||
ui-icons_f9bd01_256x240/index.png: ui-icons_f9bd01_256x240-08305efda447dd00f0eaf5e34994bc92.png
|
ui-icons_6da8d5_256x240/index.png: ui-icons_6da8d5_256x240.png
|
||||||
application.js: application-9016673953cb4aa8c7ea06dc4da2482a.js
|
ui-icons_cd0a0a_256x240.png: ui-icons_cd0a0a_256x240.png
|
||||||
application/index.js: application-9016673953cb4aa8c7ea06dc4da2482a.js
|
ui-icons_cd0a0a_256x240/index.png: ui-icons_cd0a0a_256x240.png
|
||||||
application.css: application-35f07b325acce0c59f42ac76f4921a19.css
|
ui-icons_d8e7f3_256x240.png: ui-icons_d8e7f3_256x240.png
|
||||||
application/index.css: application-35f07b325acce0c59f42ac76f4921a19.css
|
ui-icons_d8e7f3_256x240/index.png: ui-icons_d8e7f3_256x240.png
|
||||||
fontawesome-webfont.eot: fontawesome-webfont-86a6da438b901860c3a54e21f9098bf8.eot
|
ui-icons_f9bd01_256x240.png: ui-icons_f9bd01_256x240.png
|
||||||
fontawesome-webfont/index.eot: fontawesome-webfont-86a6da438b901860c3a54e21f9098bf8.eot
|
ui-icons_f9bd01_256x240/index.png: ui-icons_f9bd01_256x240.png
|
||||||
fontawesome-webfont.svg: fontawesome-webfont-c3f3594758768fbb43eae746d18b3b50.svg
|
application.js: application.js
|
||||||
fontawesome-webfont/index.svg: fontawesome-webfont-c3f3594758768fbb43eae746d18b3b50.svg
|
application/index.js: application.js
|
||||||
fontawesome-webfont.ttf: fontawesome-webfont-89ca9bd89cea7c74302ae94f18d4ec3e.ttf
|
application.css: application.css
|
||||||
fontawesome-webfont/index.ttf: fontawesome-webfont-89ca9bd89cea7c74302ae94f18d4ec3e.ttf
|
application/index.css: application.css
|
||||||
fontawesome-webfont.woff: fontawesome-webfont-8255009c90d86ee3458a13f5db9a6ed0.woff
|
fontawesome-webfont.eot: fontawesome-webfont.eot
|
||||||
fontawesome-webfont/index.woff: fontawesome-webfont-8255009c90d86ee3458a13f5db9a6ed0.woff
|
fontawesome-webfont/index.eot: fontawesome-webfont.eot
|
||||||
twitter/bootstrap/glyphicons-halflings-white.png: twitter/bootstrap/glyphicons-halflings-white-6cccd17a7aed91dbc0157d343c68c0d9.png
|
fontawesome-webfont.svg: fontawesome-webfont.svg
|
||||||
twitter/bootstrap/glyphicons-halflings-white/index.png: twitter/bootstrap/glyphicons-halflings-white-6cccd17a7aed91dbc0157d343c68c0d9.png
|
fontawesome-webfont/index.svg: fontawesome-webfont.svg
|
||||||
twitter/bootstrap/glyphicons-halflings.png: twitter/bootstrap/glyphicons-halflings-2851b489e8c39f8fad44fc10efb99c3e.png
|
fontawesome-webfont.ttf: fontawesome-webfont.ttf
|
||||||
twitter/bootstrap/glyphicons-halflings/index.png: twitter/bootstrap/glyphicons-halflings-2851b489e8c39f8fad44fc10efb99c3e.png
|
fontawesome-webfont/index.ttf: fontawesome-webfont.ttf
|
||||||
loading.gif: loading-b7ff30d20adcf2b850f420d17048930c.gif
|
fontawesome-webfont.woff: fontawesome-webfont.woff
|
||||||
loading/index.gif: loading-b7ff30d20adcf2b850f420d17048930c.gif
|
fontawesome-webfont/index.woff: fontawesome-webfont.woff
|
||||||
progressbar.gif: progressbar-bc538af0ba6ff3d792217a96651cd58a.gif
|
twitter/bootstrap/glyphicons-halflings-white.png: twitter/bootstrap/glyphicons-halflings-white.png
|
||||||
progressbar/index.gif: progressbar-bc538af0ba6ff3d792217a96651cd58a.gif
|
twitter/bootstrap/glyphicons-halflings-white/index.png: twitter/bootstrap/glyphicons-halflings-white.png
|
||||||
|
twitter/bootstrap/glyphicons-halflings.png: twitter/bootstrap/glyphicons-halflings.png
|
||||||
|
twitter/bootstrap/glyphicons-halflings/index.png: twitter/bootstrap/glyphicons-halflings.png
|
||||||
|
loading.gif: loading.gif
|
||||||
|
loading/index.gif: loading.gif
|
||||||
|
progressbar.gif: progressbar.gif
|
||||||
|
progressbar/index.gif: progressbar.gif
|
||||||
|
|
|
||||||
BIN
public/assets/person_large.png
Normal file
BIN
public/assets/person_large.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.2 KiB |
BIN
public/assets/person_small.png
Normal file
BIN
public/assets/person_small.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1 KiB |
BIN
public/assets/person_tiny.png
Normal file
BIN
public/assets/person_tiny.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 581 B |
Loading…
Add table
Add a link
Reference in a new issue