From ba380e4ca3288db59d8f82df4f1b903f99eac4d2 Mon Sep 17 00:00:00 2001 From: "fabricio.albarnaz" Date: Mon, 8 Oct 2018 16:33:46 -0300 Subject: [PATCH 01/12] Add new attribute instagram_placeholder to local yml --- config/locales/en.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/config/locales/en.yml b/config/locales/en.yml index de1222902eb..952f0ef9228 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -771,6 +771,7 @@ en: close_date: Close Date social: twitter_placeholder: eg. @the_prof + instagram_placeholder: eg. @the_prof stripe_connect: connect_with_stripe: "Connect with Stripe" stripe_connect_intro: "To accept payments using credit card, you will need to connect your stripe account to the Open Food Network. Use the button to the right to get started." From 8238a1fd838fc38f81ab6c1aba41667fdd5ae130 Mon Sep 17 00:00:00 2001 From: "fabricio.albarnaz" Date: Mon, 8 Oct 2018 16:49:11 -0300 Subject: [PATCH 02/12] Add placeholder to instagram link input --- app/views/admin/enterprises/form/_social.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/admin/enterprises/form/_social.html.haml b/app/views/admin/enterprises/form/_social.html.haml index 11939739c1d..24047ec20c9 100644 --- a/app/views/admin/enterprises/form/_social.html.haml +++ b/app/views/admin/enterprises/form/_social.html.haml @@ -7,7 +7,7 @@ .alpha.three.columns = f.label :instagram, 'Instagram' .omega.eight.columns - = f.text_field :instagram + = f.text_field :instagram, { placeholder: t('.instagram_placeholder') } .row .alpha.three.columns = f.label :linkedin, 'LinkedIn' From cb2e8e00c95eb88d2bb496965e2a4c7105b07df4 Mon Sep 17 00:00:00 2001 From: "fabricio.albarnaz" Date: Mon, 8 Oct 2018 17:33:59 -0300 Subject: [PATCH 03/12] Add migration to fix wrong instagram links --- db/migrate/20181008201815_update_instagram_data.rb | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 db/migrate/20181008201815_update_instagram_data.rb diff --git a/db/migrate/20181008201815_update_instagram_data.rb b/db/migrate/20181008201815_update_instagram_data.rb new file mode 100644 index 00000000000..b4e343f2d73 --- /dev/null +++ b/db/migrate/20181008201815_update_instagram_data.rb @@ -0,0 +1,9 @@ +class UpdateInstagramData < ActiveRecord::Migration + def change + enterprises = Enterprise.where("instagram like ?", "%instagram.com%") + enterprises.each do |e| + e.instagram = "@#{e.instagram.split('/').last}" + e.save + end + end +end From d0f0bbd6843a604e8a874e267aaeebd6ac6591a6 Mon Sep 17 00:00:00 2001 From: "fabricio.albarnaz" Date: Mon, 8 Oct 2018 17:40:22 -0300 Subject: [PATCH 04/12] Add new attribute facebook_placeholder to local yml --- config/locales/en.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/config/locales/en.yml b/config/locales/en.yml index 952f0ef9228..27eb91a1ffc 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -772,6 +772,7 @@ en: social: twitter_placeholder: eg. @the_prof instagram_placeholder: eg. @the_prof + facebook_placeholder: "eg. www.facebook.com/PageNameHere" stripe_connect: connect_with_stripe: "Connect with Stripe" stripe_connect_intro: "To accept payments using credit card, you will need to connect your stripe account to the Open Food Network. Use the button to the right to get started." From ee9f96f06020f249b40df4264033962ca9bb9100 Mon Sep 17 00:00:00 2001 From: "fabricio.albarnaz" Date: Mon, 8 Oct 2018 17:41:04 -0300 Subject: [PATCH 05/12] Add placeholder to facebook link input --- app/views/admin/enterprises/form/_social.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/admin/enterprises/form/_social.html.haml b/app/views/admin/enterprises/form/_social.html.haml index 24047ec20c9..1e5459d8c41 100644 --- a/app/views/admin/enterprises/form/_social.html.haml +++ b/app/views/admin/enterprises/form/_social.html.haml @@ -2,7 +2,7 @@ .alpha.three.columns = f.label :facebook, 'Facebook' .omega.eight.columns - = f.text_field :facebook + = f.text_field :facebook, { placeholder: t('.facebook_placeholder') } .row .alpha.three.columns = f.label :instagram, 'Instagram' From 6df2018587135970dbff2b1d575d6a5615a809dd Mon Sep 17 00:00:00 2001 From: "fabricio.albarnaz" Date: Mon, 8 Oct 2018 17:42:47 -0300 Subject: [PATCH 06/12] Add new attribute linkedin_placeholder to local yml --- config/locales/en.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/config/locales/en.yml b/config/locales/en.yml index 27eb91a1ffc..32ed9af5dd7 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -773,6 +773,7 @@ en: twitter_placeholder: eg. @the_prof instagram_placeholder: eg. @the_prof facebook_placeholder: "eg. www.facebook.com/PageNameHere" + linkedin_placeholder: "eg. www.linkedin.com/in/YourNameHere" stripe_connect: connect_with_stripe: "Connect with Stripe" stripe_connect_intro: "To accept payments using credit card, you will need to connect your stripe account to the Open Food Network. Use the button to the right to get started." From c08704ab81a442b9fc02eaafa20398a2614b5f8d Mon Sep 17 00:00:00 2001 From: "fabricio.albarnaz" Date: Mon, 8 Oct 2018 17:47:03 -0300 Subject: [PATCH 07/12] Add placeholder to linkedin link input --- app/views/admin/enterprises/form/_social.html.haml | 2 +- config/locales/en.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/admin/enterprises/form/_social.html.haml b/app/views/admin/enterprises/form/_social.html.haml index 1e5459d8c41..0df88d7d467 100644 --- a/app/views/admin/enterprises/form/_social.html.haml +++ b/app/views/admin/enterprises/form/_social.html.haml @@ -12,7 +12,7 @@ .alpha.three.columns = f.label :linkedin, 'LinkedIn' .omega.eight.columns - = f.text_field :linkedin + = f.text_field :linkedin, { placeholder: t('.linkedin_placeholder') } .row .alpha.three.columns = f.label :twitter diff --git a/config/locales/en.yml b/config/locales/en.yml index 32ed9af5dd7..f7ccf89a4ee 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -772,8 +772,8 @@ en: social: twitter_placeholder: eg. @the_prof instagram_placeholder: eg. @the_prof - facebook_placeholder: "eg. www.facebook.com/PageNameHere" - linkedin_placeholder: "eg. www.linkedin.com/in/YourNameHere" + facebook_placeholder: eg. www.facebook.com/PageNameHere + linkedin_placeholder: eg. www.linkedin.com/in/YourNameHere stripe_connect: connect_with_stripe: "Connect with Stripe" stripe_connect_intro: "To accept payments using credit card, you will need to connect your stripe account to the Open Food Network. Use the button to the right to get started." From c3b166f5bc1eedbefb38565428b8bfab330f3186 Mon Sep 17 00:00:00 2001 From: "fabricio.albarnaz" Date: Tue, 9 Oct 2018 11:11:48 -0300 Subject: [PATCH 08/12] Change each for find_each in migration --- db/migrate/20181008201815_update_instagram_data.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/db/migrate/20181008201815_update_instagram_data.rb b/db/migrate/20181008201815_update_instagram_data.rb index b4e343f2d73..eeb4d694a0f 100644 --- a/db/migrate/20181008201815_update_instagram_data.rb +++ b/db/migrate/20181008201815_update_instagram_data.rb @@ -1,7 +1,6 @@ class UpdateInstagramData < ActiveRecord::Migration def change - enterprises = Enterprise.where("instagram like ?", "%instagram.com%") - enterprises.each do |e| + Enterprise.where("instagram like ?", "%instagram.com%").find_each do |e| e.instagram = "@#{e.instagram.split('/').last}" e.save end From 04d695ff19e9b854ee172def6a422d430c99083c Mon Sep 17 00:00:00 2001 From: "fabricio.albarnaz" Date: Mon, 8 Oct 2018 16:33:46 -0300 Subject: [PATCH 09/12] Add new attribute instagram_placeholder to local yml --- config/locales/en.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/en.yml b/config/locales/en.yml index f7ccf89a4ee..0d34a772d63 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -771,7 +771,7 @@ en: close_date: Close Date social: twitter_placeholder: eg. @the_prof - instagram_placeholder: eg. @the_prof + instagram_placeholder: eg. the_prof facebook_placeholder: eg. www.facebook.com/PageNameHere linkedin_placeholder: eg. www.linkedin.com/in/YourNameHere stripe_connect: From 74f3e3575e85b801cf0dcf394ec5ecb5d8f6b0c8 Mon Sep 17 00:00:00 2001 From: "fabricio.albarnaz" Date: Mon, 8 Oct 2018 17:33:59 -0300 Subject: [PATCH 10/12] Add migration to fix wrong instagram links --- db/migrate/20181008201815_update_instagram_data.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/migrate/20181008201815_update_instagram_data.rb b/db/migrate/20181008201815_update_instagram_data.rb index eeb4d694a0f..d1a45dc1558 100644 --- a/db/migrate/20181008201815_update_instagram_data.rb +++ b/db/migrate/20181008201815_update_instagram_data.rb @@ -1,7 +1,7 @@ class UpdateInstagramData < ActiveRecord::Migration def change Enterprise.where("instagram like ?", "%instagram.com%").find_each do |e| - e.instagram = "@#{e.instagram.split('/').last}" + e.instagram = e.instagram.split('/').last e.save end end From 83e9905d92eb32077163291e98ad594fa8de81e2 Mon Sep 17 00:00:00 2001 From: "fabricio.albarnaz" Date: Mon, 8 Oct 2018 17:42:47 -0300 Subject: [PATCH 11/12] Add new attribute linkedin_placeholder to local yml --- config/locales/en.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/config/locales/en.yml b/config/locales/en.yml index 0d34a772d63..67c655fae2e 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -771,9 +771,15 @@ en: close_date: Close Date social: twitter_placeholder: eg. @the_prof +<<<<<<< HEAD instagram_placeholder: eg. the_prof facebook_placeholder: eg. www.facebook.com/PageNameHere linkedin_placeholder: eg. www.linkedin.com/in/YourNameHere +======= + instagram_placeholder: eg. @the_prof + facebook_placeholder: "eg. www.facebook.com/PageNameHere" + linkedin_placeholder: "eg. www.linkedin.com/in/YourNameHere" +>>>>>>> Add new attribute linkedin_placeholder to local yml stripe_connect: connect_with_stripe: "Connect with Stripe" stripe_connect_intro: "To accept payments using credit card, you will need to connect your stripe account to the Open Food Network. Use the button to the right to get started." From 36b564f807109e0055ad2cc7ae9e6e37f7564292 Mon Sep 17 00:00:00 2001 From: "fabricio.albarnaz" Date: Mon, 8 Oct 2018 17:47:03 -0300 Subject: [PATCH 12/12] Add placeholder to linkedin link input --- config/locales/en.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/config/locales/en.yml b/config/locales/en.yml index 67c655fae2e..0d34a772d63 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -771,15 +771,9 @@ en: close_date: Close Date social: twitter_placeholder: eg. @the_prof -<<<<<<< HEAD instagram_placeholder: eg. the_prof facebook_placeholder: eg. www.facebook.com/PageNameHere linkedin_placeholder: eg. www.linkedin.com/in/YourNameHere -======= - instagram_placeholder: eg. @the_prof - facebook_placeholder: "eg. www.facebook.com/PageNameHere" - linkedin_placeholder: "eg. www.linkedin.com/in/YourNameHere" ->>>>>>> Add new attribute linkedin_placeholder to local yml stripe_connect: connect_with_stripe: "Connect with Stripe" stripe_connect_intro: "To accept payments using credit card, you will need to connect your stripe account to the Open Food Network. Use the button to the right to get started."