diff --git a/app/controllers/admin/communication/websites_controller.rb b/app/controllers/admin/communication/websites_controller.rb index d19a50c9583e6113cb2a1e5fcdb3e123577e0620..796e197834980f45cde6a6f05b01b0c58cdb6e31 100644 --- a/app/controllers/admin/communication/websites_controller.rb +++ b/app/controllers/admin/communication/websites_controller.rb @@ -89,7 +89,7 @@ class Admin::Communication::WebsitesController < Admin::Communication::Websites: :name, :url, :repository, :about_type, :about_id, :in_production, :git_provider, :git_endpoint, :git_branch, :plausible_url, :feature_posts, :feature_agenda, - :social_mastodon, :social_x, :social_linkedin, :social_youtube, :social_vimeo, :social_peertube, :social_instagram, :social_facebook, + :social_mastodon, :social_x, :social_linkedin, :social_youtube, :social_vimeo, :social_peertube, :social_instagram, :social_facebook, :social_tiktok, :deployment_status_badge, :autoupdate_theme, language_ids: [] ] attribute_names << :access_token unless params[:communication_website][:access_token].blank? diff --git a/app/models/communication/website.rb b/app/models/communication/website.rb index cc5ab95cf40c2835baac9336a9640d9b94e4baaf..8ba01a97bcf0b70c4838a65a6c1ec80d0f35691e 100644 --- a/app/models/communication/website.rb +++ b/app/models/communication/website.rb @@ -21,6 +21,7 @@ # social_linkedin :string # social_mastodon :string # social_peertube :string +# social_tiktok :string # social_vimeo :string # social_x :string # social_youtube :string diff --git a/app/models/communication/website/configs/base.rb b/app/models/communication/website/configs/base.rb index d0e38d1b8ab65805c2430026fa7241be393daf46..9b7fa604c17341528509a83ffc6ab87097f34fe4 100644 --- a/app/models/communication/website/configs/base.rb +++ b/app/models/communication/website/configs/base.rb @@ -21,6 +21,7 @@ # social_linkedin :string # social_mastodon :string # social_peertube :string +# social_tiktok :string # social_vimeo :string # social_x :string # social_youtube :string diff --git a/app/models/communication/website/configs/default_languages.rb b/app/models/communication/website/configs/default_languages.rb index fb7e5ecfe90e144aa6f9c0f1c5d55e0dc9b8fe5a..47d7ec2edff86fc8bd2237d2e01fa24d342d1ea5 100644 --- a/app/models/communication/website/configs/default_languages.rb +++ b/app/models/communication/website/configs/default_languages.rb @@ -21,6 +21,7 @@ # social_linkedin :string # social_mastodon :string # social_peertube :string +# social_tiktok :string # social_vimeo :string # social_x :string # social_youtube :string diff --git a/app/models/communication/website/configs/default_permalinks.rb b/app/models/communication/website/configs/default_permalinks.rb index e02be68d9762c55bd556b011c7ef17fde1a1df6f..20b02d54915db8cc4869ae6dc9c6ccb906685b33 100644 --- a/app/models/communication/website/configs/default_permalinks.rb +++ b/app/models/communication/website/configs/default_permalinks.rb @@ -21,6 +21,7 @@ # social_linkedin :string # social_mastodon :string # social_peertube :string +# social_tiktok :string # social_vimeo :string # social_x :string # social_youtube :string diff --git a/app/models/communication/website/configs/development_config.rb b/app/models/communication/website/configs/development_config.rb index 23456e16c688093ecb126591e9d5022db706225e..25cdeed1bf74674465bc71db1929252e61c22415 100644 --- a/app/models/communication/website/configs/development_config.rb +++ b/app/models/communication/website/configs/development_config.rb @@ -21,6 +21,7 @@ # social_linkedin :string # social_mastodon :string # social_peertube :string +# social_tiktok :string # social_vimeo :string # social_x :string # social_youtube :string diff --git a/app/models/communication/website/configs/production_config.rb b/app/models/communication/website/configs/production_config.rb index ba78f3b54ef89382c05bbc4ec6c9874f13087064..8f3a51424c4dad862237f24fdbc11a907a873be8 100644 --- a/app/models/communication/website/configs/production_config.rb +++ b/app/models/communication/website/configs/production_config.rb @@ -21,6 +21,7 @@ # social_linkedin :string # social_mastodon :string # social_peertube :string +# social_tiktok :string # social_vimeo :string # social_x :string # social_youtube :string diff --git a/app/views/admin/communication/websites/_form.html.erb b/app/views/admin/communication/websites/_form.html.erb index 8504f11ed026d064dff84b1c5001c5fc481daf7a..b984f5fa72cb650d99f28662624baf2993c91cf7 100644 --- a/app/views/admin/communication/websites/_form.html.erb +++ b/app/views/admin/communication/websites/_form.html.erb @@ -58,6 +58,7 @@ <%= f.input :social_vimeo %> <%= f.input :social_instagram %> <%= f.input :social_facebook %> + <%= f.input :social_tiktok %> <% end %> </div> </div> diff --git a/app/views/admin/communication/websites/static.html.erb b/app/views/admin/communication/websites/static.html.erb index b1a2217009cc2e74006a740acc733acca7c1df6e..dfa54600cf947b8d94ee71c9e5b9bb4c575c0c84 100644 --- a/app/views/admin/communication/websites/static.html.erb +++ b/app/views/admin/communication/websites/static.html.erb @@ -6,7 +6,7 @@ external_domains: <% end %> social: <% -[:mastodon, :peertube, :x, :linkedin, :youtube, :vimeo, :instagram, :facebook].each do |network| +[:mastodon, :peertube, :x, :linkedin, :youtube, :vimeo, :instagram, :facebook, :tiktok].each do |network| value = @website.send "social_#{network}" next if value.blank? %> diff --git a/config/locales/communication/en.yml b/config/locales/communication/en.yml index ff65e7fb09e5cda7a728319392e8caf62c2536a0..c566584512b3f4c882b95d5152e880f56bbba6a0 100644 --- a/config/locales/communication/en.yml +++ b/config/locales/communication/en.yml @@ -155,6 +155,7 @@ en: social_linkedin: "LinkedIn (private, belongs to Microsoft)" social_mastodon: Mastodon (free) social_peertube: Peertube (free) + social_tiktok: "TikTok (private)" social_vimeo: "Vimeo (private)" social_x: "X, ex-Twitter (private)" social_youtube: "Youtube (private, belongs to Google)" diff --git a/config/locales/communication/fr.yml b/config/locales/communication/fr.yml index 6bebc525b6619a5fb2cd1f76e3cafb1988785e7a..58b5c9cdfa6eb0d479f0a43c84c64dafd4f6c8f2 100644 --- a/config/locales/communication/fr.yml +++ b/config/locales/communication/fr.yml @@ -155,6 +155,7 @@ fr: social_linkedin: "LinkedIn (privatif, appartient à Microsoft)" social_mastodon: Mastodon (libre) social_peertube: Peertube (libre) + social_tiktok: "TikTok (privatif)" social_vimeo: "Vimeo (privatif)" social_x: "X, ex-Twitter (privatif)" social_youtube: "Youtube (privatif, appartient à Google)" diff --git a/db/migrate/20230914101635_add_tiktok_to_communication_websites.rb b/db/migrate/20230914101635_add_tiktok_to_communication_websites.rb new file mode 100644 index 0000000000000000000000000000000000000000..a3cbdaab5ba8bff42050e243c38626b8079e5d62 --- /dev/null +++ b/db/migrate/20230914101635_add_tiktok_to_communication_websites.rb @@ -0,0 +1,5 @@ +class AddTiktokToCommunicationWebsites < ActiveRecord::Migration[7.0] + def change + add_column :communication_websites, :social_tiktok, :string + end +end diff --git a/db/schema.rb b/db/schema.rb index efca9222d003c9d0f67e1c42a38e438b48cd412e..3e8dc7af3adc319cb87945af495598ef110547d5 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema[7.0].define(version: 2023_09_13_130910) do +ActiveRecord::Schema[7.0].define(version: 2023_09_14_101635) do # These are extensions that must be enabled in order to support this database enable_extension "pgcrypto" enable_extension "plpgsql" @@ -558,6 +558,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_09_13_130910) do t.string "social_peertube" t.string "social_instagram" t.string "social_facebook" + t.string "social_tiktok" t.index ["about_type", "about_id"], name: "index_communication_websites_on_about" t.index ["default_language_id"], name: "index_communication_websites_on_default_language_id" t.index ["university_id"], name: "index_communication_websites_on_university_id" diff --git a/test/fixtures/communication/websites.yml b/test/fixtures/communication/websites.yml index 423109ff0d7fdbab46d126eb8b8c8e22a55e4cc4..e4a7fe2de9e4f78663e7a3fb0453d4defbef5be2 100644 --- a/test/fixtures/communication/websites.yml +++ b/test/fixtures/communication/websites.yml @@ -21,6 +21,7 @@ # social_linkedin :string # social_mastodon :string # social_peertube :string +# social_tiktok :string # social_vimeo :string # social_x :string # social_youtube :string