diff --git a/app/assets/javascripts/services/socialNetworks.coffee b/app/assets/javascripts/services/socialNetworks.coffee index ca8d90b4b..cca205acb 100644 --- a/app/assets/javascripts/services/socialNetworks.coffee +++ b/app/assets/javascripts/services/socialNetworks.coffee @@ -2,5 +2,5 @@ # list the social networks supported in the user's profiles Application.Services.factory 'SocialNetworks', [ -> - ['facebook', 'twitter', 'google_plus', 'viadeo', 'linkedin', 'instagram', 'youtube', 'vimeo', 'dailymotion', 'github', 'echosciences', 'website'] + ['facebook', 'twitter', 'google_plus', 'viadeo', 'linkedin', 'instagram', 'youtube', 'vimeo', 'dailymotion', 'github', 'echosciences', 'website', 'pinterest', 'lastfm', 'flickr'] ] diff --git a/app/assets/templates/shared/_member_form.html.erb b/app/assets/templates/shared/_member_form.html.erb index 8f3387ff8..390b96d32 100644 --- a/app/assets/templates/shared/_member_form.html.erb +++ b/app/assets/templates/shared/_member_form.html.erb @@ -432,6 +432,51 @@ +
+
+ + +
+
+ +
+
+ + +
+
+ +
+
+ + +
+
+
@@ -444,6 +489,9 @@
d
E
+
+
+
diff --git a/app/controllers/api/members_controller.rb b/app/controllers/api/members_controller.rb index ff4670148..c5dbdcd63 100644 --- a/app/controllers/api/members_controller.rb +++ b/app/controllers/api/members_controller.rb @@ -140,14 +140,14 @@ class API::MembersController < API::ApiController if current_user.id == params[:id].to_i params.require(:user).permit(:username, :email, :password, :password_confirmation, :group_id, :is_allow_contact, profile_attributes: [:id, :first_name, :last_name, :gender, :birthday, :phone, :interest, :software_mastered, :website, - :facebook, :twitter, :google_plus, :viadeo, :linkedin, :instagram, :youtube, :vimeo, :dailymotion, :github, :echosciences, + :facebook, :twitter, :google_plus, :viadeo, :linkedin, :instagram, :youtube, :vimeo, :dailymotion, :github, :echosciences, :pinterest, :lastfm, :flickr, :user_avatar_attributes => [:id, :attachment, :_destroy], :address_attributes => [:id, :address]]) elsif current_user.is_admin? params.require(:user).permit(:username, :email, :password, :password_confirmation, :invoicing_disabled, :is_allow_contact, :group_id, training_ids: [], tag_ids: [], profile_attributes: [:id, :first_name, :last_name, :gender, :birthday, :phone, :interest, :software_mastered, :website, - :facebook, :twitter, :google_plus, :viadeo, :linkedin, :instagram, :youtube, :vimeo, :dailymotion, :github, :echosciences, + :facebook, :twitter, :google_plus, :viadeo, :linkedin, :instagram, :youtube, :vimeo, :dailymotion, :github, :echosciences, :pinterest, :lastfm, :flickr, user_avatar_attributes: [:id, :attachment, :_destroy], address_attributes: [:id, :address]]) end diff --git a/app/views/api/members/show.json.jbuilder b/app/views/api/members/show.json.jbuilder index 512f939d8..1b0b95e25 100644 --- a/app/views/api/members/show.json.jbuilder +++ b/app/views/api/members/show.json.jbuilder @@ -20,7 +20,7 @@ json.profile do end if @member.profile.address json.phone @member.profile.phone json.website @member.profile.website - json.extract! @member.profile, :facebook, :twitter, :google_plus, :viadeo, :linkedin, :instagram, :youtube, :vimeo, :dailymotion, :github, :echosciences + json.extract! @member.profile, :facebook, :twitter, :google_plus, :viadeo, :linkedin, :instagram, :youtube, :vimeo, :dailymotion, :github, :echosciences, :pinterest, :lastfm, :flickr end json.subscribed_plan do json.partial! 'api/shared/plan', plan: @member.subscribed_plan diff --git a/db/migrate/20160526095550_add_socials_to_profile.rb b/db/migrate/20160526095550_add_socials_to_profile.rb new file mode 100644 index 000000000..606612445 --- /dev/null +++ b/db/migrate/20160526095550_add_socials_to_profile.rb @@ -0,0 +1,7 @@ +class AddSocialsToProfile < ActiveRecord::Migration + def change + add_column :profiles, :pinterest, :string + add_column :profiles, :lastfm, :string + add_column :profiles, :flickr, :string + end +end diff --git a/db/schema.rb b/db/schema.rb index d2029b5e3..bad6a7aa2 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20160516124056) do +ActiveRecord::Schema.define(version: 20160526095550) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -323,6 +323,9 @@ ActiveRecord::Schema.define(version: 20160516124056) do t.string "github" t.string "echosciences" t.string "website" + t.string "pinterest" + t.string "lastfm" + t.string "flickr" end add_index "profiles", ["user_id"], name: "index_profiles_on_user_id", using: :btree