mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
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
|
||||
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 :events, :through => :event_people, :uniq => true
|
||||
|
|
@ -11,6 +11,10 @@ class Person < ActiveRecord::Base
|
|||
before_create :generate_guid
|
||||
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
|
||||
if self.public_name.empty?
|
||||
self.first_name + " " + self.last_name
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@
|
|||
= f.fields_for :person do |p|
|
||||
= 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."
|
||||
= 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
|
||||
You have used
|
||||
%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|
|
||||
t.integer "event_id"
|
||||
t.string "title", :null => false
|
||||
t.string "title", :null => false
|
||||
t.string "attachment_file_name"
|
||||
t.string "attachment_content_type"
|
||||
t.integer "attachment_file_size"
|
||||
t.datetime "attachment_updated_at"
|
||||
t.boolean "public", :default => true
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.boolean "public"
|
||||
end
|
||||
|
||||
create_table "event_people", :force => true do |t|
|
||||
|
|
@ -104,11 +104,11 @@ ActiveRecord::Schema.define(:version => 20130107114930) do
|
|||
t.string "logo_content_type"
|
||||
t.integer "logo_file_size"
|
||||
t.datetime "logo_updated_at"
|
||||
t.text "proposal_additional_speakers"
|
||||
t.integer "track_id"
|
||||
t.integer "room_id"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.text "proposal_additional_speakers"
|
||||
end
|
||||
|
||||
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.date "arrival"
|
||||
t.date "departure"
|
||||
t.text "additional_speakers"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
end
|
||||
|
|
@ -206,11 +207,12 @@ ActiveRecord::Schema.define(:version => 20130107114930) do
|
|||
end
|
||||
|
||||
create_table "versions", :force => true do |t|
|
||||
t.string "item_type", :null => false
|
||||
t.integer "item_id", :null => false
|
||||
t.string "event", :null => false
|
||||
t.string "item_type", :null => false
|
||||
t.integer "item_id", :null => false
|
||||
t.string "event", :null => false
|
||||
t.string "whodunnit"
|
||||
t.text "object"
|
||||
t.text "object_changes"
|
||||
t.datetime "created_at"
|
||||
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
|
||||
rails/index.png: rails-a3386665c05a2d82f711a4aaa72d247c.png
|
||||
ui-bg_flat_0_aaaaaa_40x100.png: ui-bg_flat_0_aaaaaa_40x100-7d1197a52442bc56fcad60d0390f4b32.png
|
||||
ui-bg_flat_0_aaaaaa_40x100/index.png: ui-bg_flat_0_aaaaaa_40x100-7d1197a52442bc56fcad60d0390f4b32.png
|
||||
ui-bg_flat_55_fbec88_40x100.png: ui-bg_flat_55_fbec88_40x100-6bd1905222cab173dc4996f12b7a07cb.png
|
||||
ui-bg_flat_55_fbec88_40x100/index.png: ui-bg_flat_55_fbec88_40x100-6bd1905222cab173dc4996f12b7a07cb.png
|
||||
ui-bg_glass_75_d0e5f5_1x400.png: ui-bg_glass_75_d0e5f5_1x400-d4e12d9ce6e2b20ae0aadf27c8dcd12c.png
|
||||
ui-bg_glass_75_d0e5f5_1x400/index.png: ui-bg_glass_75_d0e5f5_1x400-d4e12d9ce6e2b20ae0aadf27c8dcd12c.png
|
||||
ui-bg_glass_85_dfeffc_1x400.png: ui-bg_glass_85_dfeffc_1x400-d1dabcb9501a4ed8c9bfc1b19c966022.png
|
||||
ui-bg_glass_85_dfeffc_1x400/index.png: ui-bg_glass_85_dfeffc_1x400-d1dabcb9501a4ed8c9bfc1b19c966022.png
|
||||
ui-bg_glass_95_fef1ec_1x400.png: ui-bg_glass_95_fef1ec_1x400-ab58fbcd66af992f067fcbc7c6488996.png
|
||||
ui-bg_glass_95_fef1ec_1x400/index.png: ui-bg_glass_95_fef1ec_1x400-ab58fbcd66af992f067fcbc7c6488996.png
|
||||
ui-bg_gloss-wave_55_5c9ccc_500x100.png: ui-bg_gloss-wave_55_5c9ccc_500x100-b9ac529234515ff4971dee7e7281c14b.png
|
||||
ui-bg_gloss-wave_55_5c9ccc_500x100/index.png: ui-bg_gloss-wave_55_5c9ccc_500x100-b9ac529234515ff4971dee7e7281c14b.png
|
||||
ui-bg_inset-hard_100_f5f8f9_1x100.png: ui-bg_inset-hard_100_f5f8f9_1x100-ad5cffb7206618b1667599d7c6c24e00.png
|
||||
ui-bg_inset-hard_100_f5f8f9_1x100/index.png: ui-bg_inset-hard_100_f5f8f9_1x100-ad5cffb7206618b1667599d7c6c24e00.png
|
||||
ui-bg_inset-hard_100_fcfdfd_1x100.png: ui-bg_inset-hard_100_fcfdfd_1x100-9f0c2e70b06a9eaec77d569b25b04d7e.png
|
||||
ui-bg_inset-hard_100_fcfdfd_1x100/index.png: ui-bg_inset-hard_100_fcfdfd_1x100-9f0c2e70b06a9eaec77d569b25b04d7e.png
|
||||
ui-icons_217bc0_256x240.png: ui-icons_217bc0_256x240-2f9a30594e6475d5f34e3e43d6447b41.png
|
||||
ui-icons_217bc0_256x240/index.png: ui-icons_217bc0_256x240-2f9a30594e6475d5f34e3e43d6447b41.png
|
||||
ui-icons_2e83ff_256x240.png: ui-icons_2e83ff_256x240-2ea4c160a75c1992daa2eeac86255b99.png
|
||||
ui-icons_2e83ff_256x240/index.png: ui-icons_2e83ff_256x240-2ea4c160a75c1992daa2eeac86255b99.png
|
||||
ui-icons_469bdd_256x240.png: ui-icons_469bdd_256x240-232cd1e8416c1a5e7bbc316084708d2c.png
|
||||
ui-icons_469bdd_256x240/index.png: ui-icons_469bdd_256x240-232cd1e8416c1a5e7bbc316084708d2c.png
|
||||
ui-icons_6da8d5_256x240.png: ui-icons_6da8d5_256x240-d155be4d851213e810cb13fc5e009fbf.png
|
||||
ui-icons_6da8d5_256x240/index.png: ui-icons_6da8d5_256x240-d155be4d851213e810cb13fc5e009fbf.png
|
||||
ui-icons_cd0a0a_256x240.png: ui-icons_cd0a0a_256x240-c0c1ec6a8bcf48fec40303e975a4dfa6.png
|
||||
ui-icons_cd0a0a_256x240/index.png: ui-icons_cd0a0a_256x240-c0c1ec6a8bcf48fec40303e975a4dfa6.png
|
||||
ui-icons_d8e7f3_256x240.png: ui-icons_d8e7f3_256x240-e5dd5fb46ca349d167fbabdcb57e8f7c.png
|
||||
ui-icons_d8e7f3_256x240/index.png: ui-icons_d8e7f3_256x240-e5dd5fb46ca349d167fbabdcb57e8f7c.png
|
||||
ui-icons_f9bd01_256x240.png: ui-icons_f9bd01_256x240-08305efda447dd00f0eaf5e34994bc92.png
|
||||
ui-icons_f9bd01_256x240/index.png: ui-icons_f9bd01_256x240-08305efda447dd00f0eaf5e34994bc92.png
|
||||
application.js: application-9016673953cb4aa8c7ea06dc4da2482a.js
|
||||
application/index.js: application-9016673953cb4aa8c7ea06dc4da2482a.js
|
||||
application.css: application-35f07b325acce0c59f42ac76f4921a19.css
|
||||
application/index.css: application-35f07b325acce0c59f42ac76f4921a19.css
|
||||
fontawesome-webfont.eot: fontawesome-webfont-86a6da438b901860c3a54e21f9098bf8.eot
|
||||
fontawesome-webfont/index.eot: fontawesome-webfont-86a6da438b901860c3a54e21f9098bf8.eot
|
||||
fontawesome-webfont.svg: fontawesome-webfont-c3f3594758768fbb43eae746d18b3b50.svg
|
||||
fontawesome-webfont/index.svg: fontawesome-webfont-c3f3594758768fbb43eae746d18b3b50.svg
|
||||
fontawesome-webfont.ttf: fontawesome-webfont-89ca9bd89cea7c74302ae94f18d4ec3e.ttf
|
||||
fontawesome-webfont/index.ttf: fontawesome-webfont-89ca9bd89cea7c74302ae94f18d4ec3e.ttf
|
||||
fontawesome-webfont.woff: fontawesome-webfont-8255009c90d86ee3458a13f5db9a6ed0.woff
|
||||
fontawesome-webfont/index.woff: fontawesome-webfont-8255009c90d86ee3458a13f5db9a6ed0.woff
|
||||
twitter/bootstrap/glyphicons-halflings-white.png: twitter/bootstrap/glyphicons-halflings-white-6cccd17a7aed91dbc0157d343c68c0d9.png
|
||||
twitter/bootstrap/glyphicons-halflings-white/index.png: twitter/bootstrap/glyphicons-halflings-white-6cccd17a7aed91dbc0157d343c68c0d9.png
|
||||
twitter/bootstrap/glyphicons-halflings.png: twitter/bootstrap/glyphicons-halflings-2851b489e8c39f8fad44fc10efb99c3e.png
|
||||
twitter/bootstrap/glyphicons-halflings/index.png: twitter/bootstrap/glyphicons-halflings-2851b489e8c39f8fad44fc10efb99c3e.png
|
||||
loading.gif: loading-b7ff30d20adcf2b850f420d17048930c.gif
|
||||
loading/index.gif: loading-b7ff30d20adcf2b850f420d17048930c.gif
|
||||
progressbar.gif: progressbar-bc538af0ba6ff3d792217a96651cd58a.gif
|
||||
progressbar/index.gif: progressbar-bc538af0ba6ff3d792217a96651cd58a.gif
|
||||
person_large.png: person_large.png
|
||||
person_large/index.png: person_large.png
|
||||
person_small.png: person_small.png
|
||||
person_small/index.png: person_small.png
|
||||
person_tiny.png: person_tiny.png
|
||||
person_tiny/index.png: person_tiny.png
|
||||
rails.png: rails.png
|
||||
rails/index.png: rails.png
|
||||
ui-bg_flat_0_aaaaaa_40x100.png: ui-bg_flat_0_aaaaaa_40x100.png
|
||||
ui-bg_flat_0_aaaaaa_40x100/index.png: ui-bg_flat_0_aaaaaa_40x100.png
|
||||
ui-bg_flat_55_fbec88_40x100.png: ui-bg_flat_55_fbec88_40x100.png
|
||||
ui-bg_flat_55_fbec88_40x100/index.png: ui-bg_flat_55_fbec88_40x100.png
|
||||
ui-bg_glass_75_d0e5f5_1x400.png: ui-bg_glass_75_d0e5f5_1x400.png
|
||||
ui-bg_glass_75_d0e5f5_1x400/index.png: ui-bg_glass_75_d0e5f5_1x400.png
|
||||
ui-bg_glass_85_dfeffc_1x400.png: ui-bg_glass_85_dfeffc_1x400.png
|
||||
ui-bg_glass_85_dfeffc_1x400/index.png: ui-bg_glass_85_dfeffc_1x400.png
|
||||
ui-bg_glass_95_fef1ec_1x400.png: ui-bg_glass_95_fef1ec_1x400.png
|
||||
ui-bg_glass_95_fef1ec_1x400/index.png: ui-bg_glass_95_fef1ec_1x400.png
|
||||
ui-bg_gloss-wave_55_5c9ccc_500x100.png: ui-bg_gloss-wave_55_5c9ccc_500x100.png
|
||||
ui-bg_gloss-wave_55_5c9ccc_500x100/index.png: ui-bg_gloss-wave_55_5c9ccc_500x100.png
|
||||
ui-bg_inset-hard_100_f5f8f9_1x100.png: ui-bg_inset-hard_100_f5f8f9_1x100.png
|
||||
ui-bg_inset-hard_100_f5f8f9_1x100/index.png: ui-bg_inset-hard_100_f5f8f9_1x100.png
|
||||
ui-bg_inset-hard_100_fcfdfd_1x100.png: ui-bg_inset-hard_100_fcfdfd_1x100.png
|
||||
ui-bg_inset-hard_100_fcfdfd_1x100/index.png: ui-bg_inset-hard_100_fcfdfd_1x100.png
|
||||
ui-icons_217bc0_256x240.png: ui-icons_217bc0_256x240.png
|
||||
ui-icons_217bc0_256x240/index.png: ui-icons_217bc0_256x240.png
|
||||
ui-icons_2e83ff_256x240.png: ui-icons_2e83ff_256x240.png
|
||||
ui-icons_2e83ff_256x240/index.png: ui-icons_2e83ff_256x240.png
|
||||
ui-icons_469bdd_256x240.png: ui-icons_469bdd_256x240.png
|
||||
ui-icons_469bdd_256x240/index.png: ui-icons_469bdd_256x240.png
|
||||
ui-icons_6da8d5_256x240.png: ui-icons_6da8d5_256x240.png
|
||||
ui-icons_6da8d5_256x240/index.png: ui-icons_6da8d5_256x240.png
|
||||
ui-icons_cd0a0a_256x240.png: ui-icons_cd0a0a_256x240.png
|
||||
ui-icons_cd0a0a_256x240/index.png: ui-icons_cd0a0a_256x240.png
|
||||
ui-icons_d8e7f3_256x240.png: ui-icons_d8e7f3_256x240.png
|
||||
ui-icons_d8e7f3_256x240/index.png: ui-icons_d8e7f3_256x240.png
|
||||
ui-icons_f9bd01_256x240.png: ui-icons_f9bd01_256x240.png
|
||||
ui-icons_f9bd01_256x240/index.png: ui-icons_f9bd01_256x240.png
|
||||
application.js: application.js
|
||||
application/index.js: application.js
|
||||
application.css: application.css
|
||||
application/index.css: application.css
|
||||
fontawesome-webfont.eot: fontawesome-webfont.eot
|
||||
fontawesome-webfont/index.eot: fontawesome-webfont.eot
|
||||
fontawesome-webfont.svg: fontawesome-webfont.svg
|
||||
fontawesome-webfont/index.svg: fontawesome-webfont.svg
|
||||
fontawesome-webfont.ttf: fontawesome-webfont.ttf
|
||||
fontawesome-webfont/index.ttf: fontawesome-webfont.ttf
|
||||
fontawesome-webfont.woff: fontawesome-webfont.woff
|
||||
fontawesome-webfont/index.woff: fontawesome-webfont.woff
|
||||
twitter/bootstrap/glyphicons-halflings-white.png: twitter/bootstrap/glyphicons-halflings-white.png
|
||||
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